Graph and Structured Retrieval
Graph and Structured Retrieval
Key jargon
| Term | Plain-language meaning |
|---|---|
| Knowledge graph | Entities and relationships represented as nodes and edges. |
| Entity | A distinct object such as a person, system, document, or organization. |
| Relationship | A typed connection between entities. |
| Multi-hop query | A question requiring traversal across multiple relationships or evidence items. |
Key concepts
- Graphs make explicit relationships queryable, while text retrieval retains narrative detail.
- Graph extraction can introduce incorrect entities or edges, so preserve links back to source passages.
Concept map
flowchart LR
A["Extract entities and relations"] --> B["Build provenance-linked graph"]
B --> C["Traverse for candidates"]
C --> D["Ground answer in source text"]Vector search answers “what is semantically similar?” Structured retrieval answers questions such as “which customer owns this order?” or “what depends on this service?” using database or graph semantics.
Architecture choices
- Query relational data through approved, parameterized interfaces.
- Use knowledge graphs when entity relationships and paths are primary.
- Combine graph/metadata filtering with vector retrieval for narrative evidence.
- Preserve row/entity-level authorization in every query.
- Validate generated query languages before execution and default to read-only.
Exercise
Model five services, owners, and dependencies as a small graph. Answer a two-hop impact question using graph traversal, then compare a text-only vector search result.
Misconception
“GraphRAG” is not one standard architecture. Product implementations, graph construction, community detection, and query strategies differ; evaluate the actual system.