Skip to main content

Module graph_rag

Module graph_rag 

Source
Expand description

Graph-RAG: Graph-enhanced Retrieval Augmented Generation

This module provides graph-based enrichment for semantic search results. It uses the entity graph to:

  • Expand query context with related entities
  • Find structural connections between search results
  • Add causal chains and relationship paths

§Example

let config = GraphRagConfig::default();
let enricher = GraphRagEnricher::new(config);
let enriched = enricher.enrich_results(&graph, query, results).await;

Structs§

GlobalGraphInsights
Global insights from graph analysis
GraphEnrichment
Result of graph enrichment for a single search result
GraphRagConfig
Configuration for Graph-RAG enrichment
GraphRagEnricher
Graph-RAG enricher that adds graph context to search results
RelationInfo
Information about a single relation