MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / process_documents

Method process_documents

methods/graph_rag.py:495–504  ·  view source on GitHub ↗

Process documents and build knowledge graph.

(self, documents: List[Document])

Source from the content-addressed store, hash-verified

493 self.query_engine = None
494
495 def process_documents(self, documents: List[Document]) -> None:
496 """Process documents and build knowledge graph."""
497 splits, vector_store = self.document_processor.process_documents(documents)
498 self.knowledge_graph.build_graph(splits, self.llm, self.embedding_model)
499 self.query_engine = QueryEngine(
500 vector_store,
501 self.knowledge_graph,
502 self.llm,
503 retrieve_num=self.retrieve_num
504 )
505
506 def query(self, query: str) -> Tuple[str, str]:
507 """Query the system and return answer with context."""

Callers 1

memorizeMethod · 0.45

Calls 2

QueryEngineClass · 0.85
build_graphMethod · 0.80

Tested by

no test coverage detected