Skip to main content

Crate graphrag

Crate graphrag 

Source
Expand description

§graphrag

Meta-crate that re-exports graphrag_core for library users and provides the graphrag binary (backed by graphrag_cli).

§Installation

cargo install graphrag

This installs the graphrag binary which is the full-featured TUI and CLI for GraphRAG operations.

§Library usage

[dependencies]
graphrag = "0.1"

All types from graphrag-core are re-exported:

use graphrag::GraphRAG;

Modules§

async_graphrag
Async GraphRAG implementation Async GraphRAG System
async_processing
Async processing pipelines Async processing utilities for GraphRAG operations
builder
Builder pattern implementations GraphRAG builder module
caching
Caching utilities for LLM responses High-performance LLM response caching system
config
Configuration management and loading
core
Core traits and types Core data structures and abstractions for GraphRAG
critic
RAG answer evaluation and criticism
embeddings
Embedding generation and providers Embedding generation for GraphRAG
entity
Entity extraction and management
evaluation
Evaluation framework for query results and pipeline validation Evaluation framework for GraphRAG system
generation
Text generation and LLM interactions (async feature only)
graph
Graph data structures and algorithms
incremental
Incremental graph updates Incremental Graph Updates
inference
Inference module for model predictions Implicit relationship inference system
lightrag
LightRAG dual-level retrieval optimization LightRAG: Simple and Fast Retrieval-Augmented Generation
monitoring
Monitoring, benchmarking, and performance tracking Monitoring and benchmarking utilities for GraphRAG
nlp
Natural language processing utilities Advanced NLP Module
ollama
Ollama LLM integration Ollama LLM integration
optimization
Graph optimization (weight optimization, DW-GRPO) Graph optimization module
parallel
Parallel processing utilities for GraphRAG
persistence
Persistence layer for knowledge graphs (workspace management always available) Persistence layer for GraphRAG knowledge graphs
pipeline
Data processing pipelines Pipeline Module
pipeline_executor
Composable pipeline executor for build-graph operations Composable pipeline executor for GraphRAG operations
prelude
Prelude module containing the most commonly used types
query
Query processing and execution
reranking
Reranking utilities for improving search result quality Reranking module for improving retrieval accuracy
retrieval
Retrieval strategies and implementations
rograg
ROGRAG (Robustly Optimized GraphRAG) implementation ROGRAG (Robustly Optimized GraphRAG) module - Reasoning on Graphs for RAG
storage
Storage backends and persistence Storage layer for GraphRAG
summarization
Text summarization capabilities
text
Text processing and chunking
vector
Vector operations and embeddings

Macros§

config_error
Helper macros for creating specific error types
generation_error
Creates a generation error with a message
retrieval_error
Creates a retrieval error with a message
storage_error
Creates a storage error with a message

Structs§

ChunkId
Unique identifier for text chunks
ConfidenceCrossEncoder
Confidence-based cross-encoder implementation (Restored Fallback)
Config
Configuration for the GraphRAG system
CrossEncoderConfig
Configuration for cross-encoder reranking
Document
A document in the system
DocumentId
Unique identifier for documents
DualLevelKeywords
Dual-level keywords for retrieval
DualLevelRetriever
LightRAG-style dual-level retriever
DualRetrievalConfig
Configuration for dual-level retrieval
DualRetrievalResults
Dual-level retrieval results
Entity
An entity extracted from text
EntityId
Unique identifier for entities
EntityMention
A mention of an entity in text
ErrorSuggestion
Structured suggestion for error recovery
Fact
Fact triple for knowledge graph
GraphRAG
Main GraphRAG system
GraphRAGBuilder
Builder for GraphRAG instances
HierarchicalCommunities
Hierarchical community detection results
HippoRAGConfig
Configuration for HippoRAG PPR retrieval
HippoRAGRetriever
HippoRAG retrieval system using Personalized PageRank
KeywordExtractor
Keyword extractor for dual-level retrieval
KeywordExtractorConfig
Configuration for keyword extraction
KnowledgeGraph
Knowledge graph containing entities and their relationships
LeidenCommunityDetector
Leiden community detection algorithm
LeidenConfig
Configuration for Leiden algorithm
MemoryStorage
In-memory storage implementation for development and testing
PageRankConfig
Configuration for PageRank algorithm
PageRankRetrievalSystem
High-performance PageRank-based retrieval system implementing fast-GraphRAG approach
PersonalizedPageRank
Personalized PageRank implementation with optimizations for graph retrieval
RankedResult
Result of cross-encoder reranking with confidence score
Relationship
Relationship between entities
RerankingStats
Statistics about reranking performance
ScoredResult
A result with multiple scoring signals
TextChunk
A chunk of text from a document

Enums§

ErrorSeverity
Error severity levels for logging and monitoring
GraphRAGError
Main error type for the GraphRAG system
MergeStrategy
Strategy for merging high and low level results

Traits§

CrossEncoder
Cross-encoder trait for reranking retrieved results
Embedder
Text embedding abstraction for converting text to vector representations
EntityExtractor
Entity extraction abstraction for identifying entities in text
ErrorContext
Trait for adding context to errors
GraphStore
Graph operations abstraction for knowledge graph management
LanguageModel
Large Language Model abstraction for text generation
Retriever
Text retrieval abstraction for finding relevant content
SemanticSearcher
Semantic search interface that combines embedder and vector store
Storage
Core storage abstraction for persisting and retrieving entities, documents, and graph data
VectorStore
Vector similarity search abstraction for finding similar embeddings

Type Aliases§

Result
Convenient Result type alias