rag.core.backends.llamaindex.backend¶
LlamaIndex ingest + query over a strategy-scoped Chroma directory.
Classes¶
LlamaIndex |
Module Contents¶
- class rag.core.backends.llamaindex.backend.LlamaIndexBackend[source]¶
LlamaIndex
VectorStoreIndex+ Chroma backend.- ingest(*, config: rag.core.config.RagConfig, rebuild: bool = True, embed_model: object | None = None) rag.core.ingest.IngestResult[source]¶
Write PDFs into the LlamaIndex Chroma collection.
- Parameters:
config (RagConfig) – Paths, chunking, and model settings.
rebuild (bool) – When True, delete the existing collection before writing.
embed_model (object or None) – Optional LlamaIndex embedder (tests inject a stub).
- Returns:
Counts and paths for the run.
- Return type:
- ask(*, question: str, config: rag.core.config.RagConfig) rag.core.query.QueryResult[source]¶
Answer a paper-level question from the LlamaIndex query engine.
- Parameters:
question (str) – User question.
config (RagConfig) – Retrieval and model settings.
- Returns:
Answer and citations.
- Return type:
- is_ready(*, config: rag.core.config.RagConfig) bool[source]¶
Return True when the LlamaIndex Chroma collection is non-empty.
- Parameters:
config (RagConfig) – Index configuration.
- Returns:
True when at least one chunk is stored.
- Return type:
bool