agents.rag.multi_agent_rag.state¶
Enhanced RAG State Schema for Multi-Agent RAG Systems.
This module provides comprehensive state management for complex RAG workflows, supporting document processing, grading, multi-step retrieval, and conditional routing.
Classes¶
Result of document grading process. |
|
Comprehensive state schema for multi-agent RAG systems. |
|
Status of query processing. |
|
Types of RAG operations that can be performed. |
|
Represents a single step in the RAG workflow. |
Module Contents¶
- class agents.rag.multi_agent_rag.state.DocumentGradingResult(/, **data)¶
Bases:
pydantic.BaseModel
Result of document grading process.
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.state.MultiAgentRAGState(/, **data)¶
Bases:
haive.core.schema.state_schema.StateSchema
Comprehensive state schema for multi-agent RAG systems.
Supports complex RAG workflows with document grading, multi-step retrieval, conditional routing, and state tracking across multiple agents.
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)
- add_workflow_step(operation_type, agent_name, input_data=None, output_data=None)¶
Add a new workflow step.
- get_latest_step(operation_type=None)¶
Get the most recent workflow step, optionally filtered by operation type.
- Parameters:
operation_type (RAGOperationType | None)
- Return type:
RAGStep | None
- get_relevant_documents(min_score=0.5)¶
Get documents that passed relevance threshold.
- update_quality_metrics()¶
Update quality metrics based on current state.
- Return type:
None
- class agents.rag.multi_agent_rag.state.QueryStatus¶
-
Status of query processing.
Initialize self. See help(type(self)) for accurate signature.
- class agents.rag.multi_agent_rag.state.RAGOperationType¶
-
Types of RAG operations that can be performed.
Initialize self. See help(type(self)) for accurate signature.
- class agents.rag.multi_agent_rag.state.RAGStep(/, **data)¶
Bases:
pydantic.BaseModel
Represents a single step in the RAG workflow.
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)