
When relationships matter
Retrieval-augmented generation, or RAG, supplies a language model with information relevant to a question. A vector search can find passages about a supplier. A graph can make the relationship between that supplier, a component and an affected customer explicit.
Consider an illustrative question: "Which customers received a component from the recalled batch?" The answer needs a path from batch to shipment to customer, plus evidence that the shipment records are current. Finding a paragraph about the recall is only one part of the task.
Text retrieval can carry source dates, permissions and links too. A graph offers a way to represent and query those connections directly; its value depends on the quality of the model and the records behind it.
What GraphRAG means
Graph-based retrieval has several forms. A system may query a maintained business graph, extract a graph from documents, or combine structured results with text passages.
Microsoft's GraphRAG extracts entities and relationships from text and builds community summaries. Its query modes include local search combining graph information with source passages, global search over community reports, and basic vector search. It does not replace every retrieval task with a graph traversal.
Legra provides a governed knowledge workspace that an AI client can query. Connecting that client through MCP does not install Microsoft's GraphRAG pipeline or demonstrate a retrieval-quality improvement. Those are separate integration and evaluation choices.
Keep the answer tied to evidence
For the recall example, return the customer, shipment and batch identifiers alongside the result. Retain the source and the version consulted, and let a reviewer inspect the same records. If a shipment has no batch identifier, report that gap instead of inferring a match from a similar description.
A graph does not make a statement true. Extracted relationships can be wrong, source records can be stale, and a language model can still invent an answer or misrepresent a citation. Check that every material claim follows from the retrieved evidence. When evidence is insufficient, the system should say so.
Rules and ontologies can derive additional facts. Those conclusions depend on their premises and rules; they need the same review of source quality and scope as directly recorded facts.
Evaluate the retrieval choice
Start with questions from the actual task. Include direct lookups, questions that cross relationships, ambiguous names and questions whose answer is absent. Compare text, graph and hybrid retrieval against the same reviewed answers and permissions.
Measure answer correctness, citation support, missed evidence, latency and cost. Also test whether unauthorized records can reach the prompt. Record the dataset version, retrieval settings, model and prompt so a later run can explain what changed.
The graph brings work of its own: mapping sources, resolving identities, maintaining relationships and handling updates. Choose it when that work improves the task enough to justify its cost. A short document lookup may need only text search.
Give agents a review path
Reading evidence and changing it are different operations. Keep proposed changes on a branch, inspect their effects, and review them before merging. Agent guardrails describe the governing model. The client still needs appropriate permissions and explicit tool approvals.
Try it in Legra
Begin with the SPARQL query guide and its small named-graph example. Then connect your AI client through MCP. Ask it to explain which graph and branch it queried, inspect the returned rows, and compare its answer with those rows before trusting the explanation.