API Reference — Overview

On this page

This section documents every public symbol exported (via each package's __init__.py __all__ list) by the ten subsystems in types. Private members (leading underscore) are omitted from the public surface but are referenced in "Internal Workflow" sections where they materially affect documented behavior, since understanding them is often necessary to use the public API correctly (e.g. knowing that _normalise_docs accepts multiple input shapes tells you what your backend is allowed to return).

Subsystem pages

PageExported symbols (__all__)
Agentic RAGAgenticRAG, AgenticConfig, AgenticResult, AgentAction, ReasoningDepth, ActionStep, Document, TTLCache, AgenticRAGError, RetrievalError, GenerationError, MaxIterationsExceeded
Conversational RAGConversationalRAG, RAGConfigConverstion, ConversationTurn, ConversationHistory
Domain-Specific RAGDomainDefinition, PRESET_DOMAINS, DomainSpecificRAG, DomainMetrics
Federated RAGFederatedRAG, AggregationMethod
Graph RAGGraphRAG, GraphEdge, GraphNode, KnowledgeGraph, ConfigGraphRAG
Hybrid SearchHybridSearchRAG, SearchConfig, BM25Scorer, TFIDFScorer, StanzaTokenizer
Multi-Document RAGMultiDocumentRAGSystem
Multi-Hop RAGMultiHopRAG, HopStrategy, ReasoningState, HopResult, QueryDecomposer
Self-Improving RAGSelfIRAG, HyDERAG, RecursiveRAG, SelfRAGConfig, RecursiveRAGConfig, RecursiveRAGResult, HyDEResult, SelfRAGResult, LLMCallError, RetrievalError, RAGSystemError, _call_llm
Streaming RAGStreamingRAG, StreamEvent, StreamConfig, SyncStreamableLLM, AsyncStreamableLLM, EventType

[!NOTE] _call_llm is exported but private-named self_improving_rag/__init__.py re-exports _call_llm in __all__ despite the leading underscore. It is documented on the Self-Improving RAG page as an internal helper, since its name signals it isn't meant for direct use, but it is technically importable.

Cross-cutting conventions

  • Confidence/relevance scores are floats normalized to the [0, 1] range throughout every module (e.g. Document.score, EvaluationResult fields, DomainSpecificRAG relevance).
  • to_dict() is implemented on nearly every result dataclass (AgenticResult, SelfRAGResult, HyDEResult, RecursiveRAGResult, GraphEdge, GraphNode, ConversationTurn) for JSON-serializable output.
  • Exceptions are subsystem-scoped: agentic_rag defines AgenticRAGError → RetrievalError / GenerationError / MaxIterationsExceeded; self_improving_rag defines a parallel RAGSystemError → LLMCallError / RetrievalError hierarchy. These two RetrievalError classes are distinct types in different modules — don't conflate them in except clauses across subsystems.

Related pages