rag.core.backends.protocol ========================== .. py:module:: rag.core.backends.protocol .. autoapi-nested-parse:: Backend protocol for ingest + query over a strategy-scoped index. Exceptions ---------- .. autoapisummary:: rag.core.backends.protocol.IngestNotSupportedError Classes ------- .. autoapisummary:: rag.core.backends.protocol.RagBackend Module Contents --------------- .. py:exception:: IngestNotSupportedError Bases: :py:obj:`RuntimeError` Raised when a strategy cannot ingest via ``papers-ingest``. .. py:class:: RagBackend Bases: :py:obj:`Protocol` Ingest and query one local (or remote) RAG strategy. .. py:method:: ingest(*, config: rag.core.config.RagConfig, rebuild: bool = True, embed_model: object | None = None) -> rag.core.ingest.IngestResult Write the PDF corpus into this strategy's index. .. py:method:: ask(*, question: str, config: rag.core.config.RagConfig) -> rag.core.query.QueryResult Answer a paper-level question from this strategy's index. .. py:method:: is_ready(*, config: rag.core.config.RagConfig) -> bool Return True when the local index can answer questions.