Skip to main content

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.

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.

How Standard Vector Search Works

Without a knowledge graph, retrieval follows a straightforward path:
  1. User submits a query
  2. The query is embedded into a vector
  3. Chunks with the most similar vectors are returned
  4. Those chunks are sent to the LLM as context
This works well for direct, single-concept questions — “What is our refund policy?” But it struggles when the answer requires connecting information across multiple entities or documents.

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:
  1. User submits a query
  2. The query is used for vector search (semantic and/or keyword) to find relevant chunks
  3. Entities mentioned in or linked to those chunks are identified in the graph
  4. The graph is traversed to find related entities and their connected chunks
  5. Results are reranked considering both vector similarity and graph relevance
  6. The enriched result set is sent to the LLM as context
The key difference: standard search finds chunks that look similar to the query. Graph-enhanced search also finds chunks that are structurally connected to the answer through entity relationships, even when those chunks use different vocabulary.

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 find regulation 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 connects diagnosis 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:
ToolWhat it does
Graph Database Cypher QueryExecutes Cypher queries against a specific data source’s knowledge graph
Graph Multi Data Store Cypher QueryExecutes Cypher queries across multiple data sources’ knowledge graphs
These tools allow the LLM to query the graph directly — formulating Cypher queries to traverse entity relationships, count nodes, find paths, and retrieve structured data from the graph. The LLM combines graph query results with vector search results to construct comprehensive answers.

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
This layered approach means you don’t have to choose between vector search and graph search. They reinforce each other.

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.