1pub mod keyword;
2pub mod hybrid;
3pub mod dedup;
4pub mod rerank;
5pub mod index_ivf;
6pub mod diversify;
7pub mod aggregation;
8pub mod fuzzy;
9pub mod sparse;
10#[cfg(feature = "http")]
11pub mod rerank_external;
12#[cfg(feature = "http")]
13pub mod query_rewriting;
14#[cfg(feature = "http")]
15pub mod contextual;
16
17pub mod embeddings;
18pub mod vector_store;
19pub mod retriever;
20pub mod chunker;
21pub mod errors;
22#[cfg(feature = "mcp")]
23pub mod mcp;
24pub mod index;
25#[cfg(feature = "hnsw")]
26pub mod index_hnsw;
27pub mod ingestion;
28pub mod graph;
29pub mod graph_rag;
30
31pub use embeddings::EmbeddingModel;
32#[cfg(feature = "http")]
33pub use embeddings::{HttpEmbeddingModel, OpenAIEmbeddingModel, EmbeddingRequest, OllamaEmbeddingModel};
34pub use vector_store::{
35 JsonPersistentVectorStore, VectorStore, InMemoryVectorStore, MinimalVectorDB, Document,
36 Similarity, MetadataFilter, load_all_documents,
37};
38pub use retriever::Retriever;
39pub use chunker::{TextChunker, FixedSizeChunker, ParagraphChunker, SentenceChunker};
40pub use errors::{RagError, Result};
41#[cfg(feature = "mcp")]
42pub use mcp::RagMcpServer;
43pub use index::{DistanceMetric, FlatIndex, Index};
44#[cfg(feature = "hnsw")]
45pub use index_hnsw::HnswIndex;
46pub use index_ivf::IvfflatIndex;
47pub use ingestion::{Source, ExtractedDocument};
48#[cfg(feature = "pdf")]
49pub use ingestion::PdfSource;
50#[cfg(feature = "ingest")]
51pub use ingestion::CodebaseSource;
52#[cfg(feature = "http")]
53pub use ingestion::WikiSource;
54pub use graph::{GraphStore, GraphNode, GraphEdge, GraphPath, Community, GraphPersisted};
55pub use graph_rag::{
56 EntityExtractor, ExtractedEntity, GraphInfo, GraphRagEngine, GraphRagResult, GraphRagSnapshot,
57 SeedEntityExtractor, SimpleEntityExtractor, EntityInfo,
58};
59#[cfg(feature = "llm-extractor")]
60pub use graph_rag::LlmEntityExtractor;
61pub use keyword::{tokenize, Bm25Index, Bm25Config, FieldBm25Index};
62pub use hybrid::{merge_hybrid, rrf_fusion};
63pub use dedup::{content_jaccard, dedup_similarities};
64pub use rerank::{SimilarityReranker, PassthroughReranker, rerank_similarities};
65pub use diversify::diversify;
66pub use aggregation::{count_by, group_by, sum_by};
67pub use fuzzy::{levenshtein, is_fuzzy_match, fuzzy_filter};
68pub use sparse::{SparseVector, SparseIndex};
69#[cfg(feature = "http")]
70pub use rerank_external::{CohereReranker, VoyageReranker, MixedBreadReranker};
71#[cfg(feature = "http")]
72pub use query_rewriting::QueryRewriter;
73#[cfg(feature = "http")]
74pub use contextual::ContextualRetrieval;