rag.core.strategy ================= .. py:module:: rag.core.strategy .. autoapi-nested-parse:: RAG orchestration strategies (one persist dir per strategy). Attributes ---------- .. autoapisummary:: rag.core.strategy.RAG_STRATEGY_ENV rag.core.strategy.INDEXES_DIR_NAME rag.core.strategy.INGEST_ALL Classes ------- .. autoapisummary:: rag.core.strategy.RagStrategy Functions --------- .. autoapisummary:: rag.core.strategy.index_dir_for Module Contents --------------- .. py:data:: RAG_STRATEGY_ENV :type: Final :value: 'RAG_STRATEGY' .. py:data:: INDEXES_DIR_NAME :type: Final :value: 'indexes' .. py:data:: INGEST_ALL :type: Final :value: 'all' .. py:class:: RagStrategy Bases: :py:obj:`enum.StrEnum` In-process orchestration library used to ingest and query the PDF corpus. .. py:attribute:: LLAMAINDEX :value: 'llamaindex' .. py:attribute:: LANGCHAIN :value: 'langchain' .. py:method:: ingestible() -> tuple[RagStrategy, Ellipsis] :classmethod: Return strategies that write a local index via ``papers-ingest``. :returns: Every in-process backend (LlamaIndex and LangChain). :rtype: tuple of RagStrategy .. py:function:: index_dir_for(*, repo_root: pathlib.Path, strategy: RagStrategy) -> pathlib.Path Return the default persist directory for a strategy. :param repo_root: Monorepo root. :type repo_root: Path :param strategy: Orchestration backend. :type strategy: RagStrategy :returns: ``{repo_root}/.data/indexes/{strategy}``. :rtype: Path