agents.rag.modular_chain¶
Modular RAG using ChainAgent.
Build configurable RAG pipelines with modular components.
Classes¶
Configuration for modular RAG. |
|
Available RAG modules. |
Functions¶
|
Create a comprehensive modular RAG with all modules. |
|
Create a custom modular RAG with specified modules. |
|
Create a modular RAG system with configurable components. |
|
Create a simple modular RAG with basic modules. |
Module Contents¶
- class agents.rag.modular_chain.ModularConfig(/, **data)¶
Bases:
pydantic.BaseModel
Configuration for modular RAG.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class agents.rag.modular_chain.RAGModule¶
-
Available RAG modules.
Initialize self. See help(type(self)) for accurate signature.
- agents.rag.modular_chain.create_comprehensive_modular_rag(documents, llm_config=None)¶
Create a comprehensive modular RAG with all modules.
- Parameters:
documents (list[langchain_core.documents.Document])
llm_config (haive.core.models.llm.base.LLMConfig | None)
- Return type:
haive.agents.chain.ChainAgent
- agents.rag.modular_chain.create_custom_modular_rag(documents, modules, llm_config=None)¶
Create a custom modular RAG with specified modules.
- agents.rag.modular_chain.create_modular_rag(documents, config, llm_config=None, name='Modular RAG')¶
Create a modular RAG system with configurable components.
- Parameters:
documents (list[langchain_core.documents.Document])
config (ModularConfig)
llm_config (haive.core.models.llm.base.LLMConfig | None)
name (str)
- Return type:
haive.agents.chain.ChainAgent