Skip to main content

Crate rag

Crate rag 

Source

Re-exports§

pub use embeddings::EmbeddingModel;
pub use embeddings::HttpEmbeddingModel;
pub use embeddings::OpenAIEmbeddingModel;
pub use embeddings::EmbeddingRequest;
pub use embeddings::OllamaEmbeddingModel;
pub use vector_store::JsonPersistentVectorStore;
pub use vector_store::VectorStore;
pub use vector_store::InMemoryVectorStore;
pub use vector_store::MinimalVectorDB;
pub use vector_store::Document;
pub use vector_store::Similarity;
pub use vector_store::MetadataFilter;
pub use vector_store::load_all_documents;
pub use retriever::Retriever;
pub use chunker::TextChunker;
pub use chunker::FixedSizeChunker;
pub use chunker::ParagraphChunker;
pub use chunker::SentenceChunker;
pub use errors::RagError;
pub use errors::Result;
pub use mcp::RagMcpServer;
pub use index::DistanceMetric;
pub use index::FlatIndex;
pub use index::Index;
pub use index_ivf::IvfflatIndex;
pub use ingestion::Source;
pub use ingestion::ExtractedDocument;
pub use ingestion::PdfSource;
pub use ingestion::CodebaseSource;
pub use ingestion::WikiSource;
pub use graph::GraphStore;
pub use graph::GraphNode;
pub use graph::GraphEdge;
pub use graph::GraphPath;
pub use graph::Community;
pub use graph::GraphPersisted;
pub use graph_rag::EntityExtractor;
pub use graph_rag::ExtractedEntity;
pub use graph_rag::GraphInfo;
pub use graph_rag::GraphRagEngine;
pub use graph_rag::GraphRagResult;
pub use graph_rag::GraphRagSnapshot;
pub use graph_rag::SeedEntityExtractor;
pub use graph_rag::SimpleEntityExtractor;
pub use graph_rag::EntityInfo;
pub use keyword::tokenize;
pub use keyword::Bm25Index;
pub use hybrid::merge_hybrid;
pub use dedup::content_jaccard;
pub use dedup::dedup_similarities;
pub use rerank::SimilarityReranker;
pub use rerank::PassthroughReranker;
pub use rerank::rerank_similarities;

Modules§

chunker
dedup
Near-duplicate suppression using word-set Jaccard similarity on chunk text.
embeddings
errors
graph
graph_rag
hybrid
Combine vector similarity hits with BM25 keyword scores.
index
index_ivf
Inverted-file (IVF) index: cluster vectors by nearest centroid, probe top clusters only.
ingestion
keyword
Okapi BM25-style lexical scoring over in-memory documents.
mcp
rerank
Optional re-ranking hook for similarity lists (default: identity).
retriever
vector_store