agents.rag.multi_agent_rag.advanced_workflows¶
Advanced RAG Workflows - Graph RAG and Agentic RAG Patterns.
This module implements the most sophisticated RAG architectures including Graph RAG, Agentic routing, speculative execution, and self-routing patterns.
Classes¶
Agentic Graph RAG - combines graph reasoning with agentic routing. |
|
Agentic RAG Router - intelligently routes queries to different RAG strategies. |
|
RAG state for agentic routing and planning. |
|
Graph RAG - uses knowledge graph construction and traversal. |
|
RAG state for graph-based approaches. |
|
Query Planning Agentic RAG - creates detailed execution plans. |
|
Self-Reflective Agentic RAG - continuously reflects on and improves. |
|
Self-Route RAG - dynamically routes itself to different reasoning. |
|
Speculative RAG - generates multiple possible answer hypotheses. |
Functions¶
Build custom graph for advanced workflows. |
Module Contents¶
- class agents.rag.multi_agent_rag.advanced_workflows.AgenticGraphRAGAgent(**kwargs)¶
Bases:
haive.agents.multi.base.MultiAgent
Agentic Graph RAG - combines graph reasoning with agentic routing. and dynamic planning for complex multi-step reasoning.
- build_custom_graph()¶
Build the custom graph for this multi-agent workflow.
- Return type:
Any
- class agents.rag.multi_agent_rag.advanced_workflows.AgenticRAGRouterAgent(**kwargs)¶
Bases:
haive.agents.multi.base.MultiAgent
Agentic RAG Router - intelligently routes queries to different RAG strategies. based on query type, complexity, and domain.
- build_custom_graph()¶
Build the custom graph for this multi-agent workflow.
- Return type:
Any
- class agents.rag.multi_agent_rag.advanced_workflows.AgenticRAGState(/, **data)¶
Bases:
haive.core.schema.prebuilt.rag_state.RAGState
RAG state for agentic routing and planning.
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.multi_agent_rag.advanced_workflows.GraphRAGAgent(**kwargs)¶
Bases:
haive.agents.multi.base.MultiAgent
Graph RAG - uses knowledge graph construction and traversal. for contextually rich retrieval and reasoning.
- build_custom_graph()¶
Build the custom graph for this multi-agent workflow.
- Return type:
Any
- class agents.rag.multi_agent_rag.advanced_workflows.GraphRAGState(/, **data)¶
Bases:
haive.core.schema.prebuilt.rag_state.RAGState
RAG state for graph-based approaches.
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.multi_agent_rag.advanced_workflows.QueryPlanningAgenticRAGAgent(**kwargs)¶
Bases:
haive.agents.multi.base.MultiAgent
Query Planning Agentic RAG - creates detailed execution plans. for complex queries requiring multiple reasoning steps.
- build_custom_graph()¶
Build the custom graph for this multi-agent workflow.
- Return type:
Any
- class agents.rag.multi_agent_rag.advanced_workflows.SelfReflectiveAgenticRAGAgent(**kwargs)¶
Bases:
haive.agents.multi.base.MultiAgent
Self-Reflective Agentic RAG - continuously reflects on and improves. its own reasoning and retrieval processes.
- build_custom_graph()¶
Build the custom graph for this multi-agent workflow.
- Return type:
Any
- class agents.rag.multi_agent_rag.advanced_workflows.SelfRouteRAGAgent(**kwargs)¶
Bases:
haive.agents.multi.base.MultiAgent
Self-Route RAG - dynamically routes itself to different reasoning. strategies based on intermediate results and confidence levels.
- build_custom_graph()¶
Build the custom graph for this multi-agent workflow.
- Return type:
Any
- class agents.rag.multi_agent_rag.advanced_workflows.SpeculativeRAGAgent(**kwargs)¶
Bases:
haive.agents.multi.base.MultiAgent
Speculative RAG - generates multiple possible answer hypotheses. in parallel and validates them against retrieved evidence.
- build_custom_graph()¶
Build the custom graph for this multi-agent workflow.
- Return type:
Any
- agents.rag.multi_agent_rag.advanced_workflows.build_custom_graph()¶
Build custom graph for advanced workflows.
This is a utility function for creating custom graphs for advanced RAG workflows in this module.
- Returns:
Graph configuration or None for default behavior
- Return type:
Any