agents.rag.multi_agent_rag.simple_enhanced_workflows

Simple Enhanced Multi-Agent RAG Workflows.

Clean implementation of advanced RAG patterns without complex dependencies.

Classes

DocumentGradingAgent

Agent that grades retrieved documents for relevance.

RequeryDecisionAgent

Agent that decides if requerying is needed based on document grades.

SimpleCorrectiveRAGAgent

Simple Corrective RAG implementation using sequential processing.

SimpleHYDERAGAgent

Simple HYDE RAG agent that generates hypothetical documents before retrieval.

Functions

create_simple_rag_workflow([workflow_type, documents])

Factory function to create simple RAG workflows.

Module Contents

class agents.rag.multi_agent_rag.simple_enhanced_workflows.DocumentGradingAgent

Bases: haive.agents.base.agent.Agent

Agent that grades retrieved documents for relevance.

build_graph()

Build graph that grades each retrieved document.

Return type:

haive.core.graph.state_graph.base_graph2.BaseGraph

class agents.rag.multi_agent_rag.simple_enhanced_workflows.RequeryDecisionAgent

Bases: haive.agents.base.agent.Agent

Agent that decides if requerying is needed based on document grades.

build_graph()

Build graph that analyzes grades and decides on requerying.

Return type:

haive.core.graph.state_graph.base_graph2.BaseGraph

class agents.rag.multi_agent_rag.simple_enhanced_workflows.SimpleCorrectiveRAGAgent(documents=None, **kwargs)

Bases: haive.agents.multi.base.SequentialAgent

Simple Corrective RAG implementation using sequential processing.

Init .

Parameters:
  • config – [TODO: Add description]

  • documents (list[langchain_core.documents.Document] | None)

class agents.rag.multi_agent_rag.simple_enhanced_workflows.SimpleHYDERAGAgent(documents=None, **kwargs)

Bases: haive.agents.multi.base.SequentialAgent

Simple HYDE RAG agent that generates hypothetical documents before retrieval.

Init .

Parameters:
  • config – [TODO: Add description]

  • documents (list[langchain_core.documents.Document] | None)

agents.rag.multi_agent_rag.simple_enhanced_workflows.create_simple_rag_workflow(workflow_type='crag', documents=None, **kwargs)

Factory function to create simple RAG workflows.

Parameters:
  • workflow_type (str) – Type of workflow (“crag”, “hyde”)

  • documents (list[langchain_core.documents.Document] | None) – Documents for retrieval

  • **kwargs – Additional arguments

Returns:

Configured RAG agent

Return type:

haive.agents.base.agent.Agent