agents.rag.multi_agent_rag.graded_rag_workflows_v2

Graded RAG Workflows V2 - Using Enhanced State Schemas.

This version uses state schemas with built-in configuration support, providing a cleaner approach to managing agent-specific parameters.

Classes

FLAREAgentV2Example

FLARE Agent V2 example using enhanced state schema.

FullyGradedRAGAgentV2

Fully Graded RAG V2 - Uses enhanced state schema with configuration support.

MultiCriteriaGradedRAGAgentV2

Multi-Criteria Graded RAG V2 - Configuration stored in state schema.

Functions

build_custom_graph()

Build custom graph for graded RAG workflows v2.

create_graded_rag_agent([workflow_type, ...])

Factory function to create graded RAG agents with proper configuration.

Module Contents

class agents.rag.multi_agent_rag.graded_rag_workflows_v2.FLAREAgentV2Example(uncertainty_threshold=0.3, max_retrieval_rounds=3, **kwargs)

Bases: haive.agents.multi.base.MultiAgent, haive.agents.rag.multi_agent_rag.enhanced_state_schemas.StateConfigMixin

FLARE Agent V2 example using enhanced state schema.

Init .

Parameters:
  • uncertainty_threshold (float) – [TODO: Add description]

  • max_retrieval_rounds (int) – [TODO: Add description]

build_custom_graph()

Build custom graph.

Return type:

Any

class agents.rag.multi_agent_rag.graded_rag_workflows_v2.FullyGradedRAGAgentV2(relevance_threshold=0.5, **kwargs)

Bases: haive.agents.multi.base.MultiAgent, haive.agents.rag.multi_agent_rag.enhanced_state_schemas.StateConfigMixin

Fully Graded RAG V2 - Uses enhanced state schema with configuration support.

Init .

Parameters:

relevance_threshold (float) – [TODO: Add description]

async ainvoke(inputs)

Override to inject configuration into state.

Parameters:

inputs (dict[str, Any])

Return type:

dict[str, Any]

build_custom_graph()

Build the custom graph with state initialization.

Return type:

Any

class agents.rag.multi_agent_rag.graded_rag_workflows_v2.MultiCriteriaGradedRAGAgentV2(grading_criteria=None, **kwargs)

Bases: haive.agents.multi.base.MultiAgent, haive.agents.rag.multi_agent_rag.enhanced_state_schemas.StateConfigMixin

Multi-Criteria Graded RAG V2 - Configuration stored in state schema.

Init .

Parameters:

grading_criteria (list[str] | None) – [TODO: Add description]

async ainvoke(inputs)

Override to inject configuration.

Parameters:

inputs (dict[str, Any])

Return type:

dict[str, Any]

agents.rag.multi_agent_rag.graded_rag_workflows_v2.build_custom_graph()

Build custom graph for graded RAG workflows v2.

Returns:

Graph configuration or None for default behavior

Return type:

Any

agents.rag.multi_agent_rag.graded_rag_workflows_v2.create_graded_rag_agent(workflow_type='fully_graded', relevance_threshold=0.5, grading_criteria=None, **kwargs)

Factory function to create graded RAG agents with proper configuration.

Parameters:
  • workflow_type (str)

  • relevance_threshold (float)

  • grading_criteria (list[str] | None)

Return type:

haive.agents.multi.base.MultiAgent