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
[!NOTE]
_call_llmis exported but private-namedself_improving_rag/__init__.pyre-exports_call_llmin__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,EvaluationResultfields,DomainSpecificRAGrelevance). 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_ragdefinesAgenticRAGError→RetrievalError/GenerationError/MaxIterationsExceeded;self_improving_ragdefines a parallelRAGSystemError→LLMCallError/RetrievalErrorhierarchy. These twoRetrievalErrorclasses are distinct types in different modules — don't conflate them inexceptclauses across subsystems.