When Knowledge Graph Extraction is enabled on a data source, retrieval goes beyond matching text chunks by semantic similarity. The knowledge graph adds a structured layer of entities and relationships that the retrieval system uses to find more relevant, more connected results. This page explains how graph-enhanced retrieval works and when it makes a difference.Documentation Index
Fetch the complete documentation index at: https://explore.airia.com/llms.txt
Use this file to discover all available pages before exploring further.
How Standard Vector Search Works
Without a knowledge graph, retrieval follows a straightforward path:- User submits a query
- The query is embedded into a vector
- Chunks with the most similar vectors are returned
- Those chunks are sent to the LLM as context
How Graph-Enhanced Retrieval Works
With Knowledge Graph Extraction enabled, the retrieval system has access to both vector embeddings and the entity-relationship graph. This enables richer retrieval:- User submits a query
- The query is used for vector search (semantic and/or keyword) to find relevant chunks
- Entities mentioned in or linked to those chunks are identified in the graph
- The graph is traversed to find related entities and their connected chunks
- Results are reranked considering both vector similarity and graph relevance
- The enriched result set is sent to the LLM as context
When Graph-Enhanced Retrieval Helps
Cross-Document Reasoning
Example: “Which regulations affect our manufacturing processes in the EU?” Without a graph, vector search returns chunks that mention “regulations” and “manufacturing” and “EU” together. If no single chunk contains all three concepts, results may be incomplete. With a graph, the system can findregulation entities linked to manufacturing_process entities linked to region entities — traversing relationships across documents to assemble a complete answer.
Entity-Specific Queries
Example: “What treatments have been prescribed for patients with diagnosis X?” The graph directly connectsdiagnosis entities to treatment entities to patient_id entities. Rather than relying on semantic similarity to find relevant chunks, the system follows explicit relationships to retrieve precisely the right information.
Disambiguation
Example: “Tell me about Mercury” Vector search alone cannot distinguish between Mercury the planet, Mercury the element, and Mercury the Roman deity without additional context. If your knowledge graph has typed entities (chemical_element, celestial_body), the system can use entity types to filter and rank results appropriately.
Graph Retrieval Tools
When using the MCP Multi-Hop Retrieval (agentic retrieval via MCP), the following graph-specific tools are available to your agent:| Tool | What it does |
|---|---|
| Graph Database Cypher Query | Executes Cypher queries against a specific data source’s knowledge graph |
| Graph Multi Data Store Cypher Query | Executes Cypher queries across multiple data sources’ knowledge graphs |
Combining Graph with Hybrid Search and Reranking
Graph-enhanced retrieval works alongside the other search capabilities:- Hybrid search finds initial candidates using both semantic and keyword matching
- Graph traversal expands the candidate set by following entity relationships to connected chunks
- Reranking (automatically enabled with Knowledge Graph Extraction) re-scores all candidates — vector matches and graph-connected chunks alike — to produce the final ranked results
Best Practices
- Enable Knowledge Graph Extraction before ingestion. The graph is built during ingestion. If you enable it after documents are already ingested, you’ll need to re-ingest for the graph to include those documents.
- Choose specific entity types. The more precisely your entity types match your domain, the more useful the graph connections will be for retrieval. See Knowledge Graph Extraction for guidance.
- Use the MCP Multi-Hop Retrieval for complex queries. The agentic retrieval pattern lets the LLM combine vector search and graph queries dynamically. For simple lookups, the Data Search Step with graph reranking may be sufficient.
- Review the graph after ingestion. From the Data Sources list, click the three-dot menu (…) on your graph-enabled data source and select View Graph to verify that entity types and relationships were extracted as expected before relying on graph-enhanced retrieval in production.
