agents.rag.multi_agent_rag.additional_workflows

Additional RAG Workflows - Extended Multi-Agent RAG Implementations.

from typing import Any This module implements additional RAG architectures beyond the simple enhanced workflows, including memory-based, multi-query, fusion, and advanced reasoning patterns.

Classes

MemoryRAGState

Extended RAG state with conversation memory.

MultiQueryRAGAgent

Multi-Query RAG - generates multiple diverse queries and retrieves documents.

MultiQueryRAGState

RAG state for multi-query approaches.

QueryDecompositionRAGAgent

Query Decomposition RAG - breaks complex queries into simpler sub-questions,.

RAGFusionAgent

RAG Fusion - combines multiple retrieval strategies and fuses results.

SelfRAGAgent

Self-RAG with reflection tokens - determines whether retrieval is needed.

SelfRAGState

RAG state with self-reflection capabilities.

SimpleRAGWithMemoryAgent

Simple RAG with Memory - incorporates conversation history and previous queries.

StepBackPromptingRAGAgent

Step-Back Prompting RAG - asks broader conceptual questions before.

Functions

build_custom_graph()

Build custom graph for additional workflows.

Module Contents

class agents.rag.multi_agent_rag.additional_workflows.MemoryRAGState(/, **data)

Bases: haive.core.schema.prebuilt.rag_state.RAGState

Extended RAG state with conversation memory.

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.additional_workflows.MultiQueryRAGAgent(**kwargs)

Bases: haive.agents.multi.base.MultiAgent

Multi-Query RAG - generates multiple diverse queries and retrieves documents. for each, then synthesizes results.

build_custom_graph()

Build the custom graph for this multi-agent workflow.

Return type:

Any

class agents.rag.multi_agent_rag.additional_workflows.MultiQueryRAGState(/, **data)

Bases: haive.core.schema.prebuilt.rag_state.RAGState

RAG state for multi-query 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.additional_workflows.QueryDecompositionRAGAgent(**kwargs)

Bases: haive.agents.multi.base.MultiAgent

Query Decomposition RAG - breaks complex queries into simpler sub-questions,. retrieves for each, then composes the final answer.

build_custom_graph()

Build the custom graph for this multi-agent workflow.

Return type:

Any

class agents.rag.multi_agent_rag.additional_workflows.RAGFusionAgent(**kwargs)

Bases: haive.agents.multi.base.MultiAgent

RAG Fusion - combines multiple retrieval strategies and fuses results. using reciprocal rank fusion and other techniques.

build_custom_graph()

Build the custom graph for this multi-agent workflow.

Return type:

Any

class agents.rag.multi_agent_rag.additional_workflows.SelfRAGAgent(**kwargs)

Bases: haive.agents.multi.base.MultiAgent

Self-RAG with reflection tokens - determines whether retrieval is needed. and reflects on the quality of generated answers.

build_custom_graph()

Build the custom graph for this multi-agent workflow.

Return type:

Any

class agents.rag.multi_agent_rag.additional_workflows.SelfRAGState(/, **data)

Bases: haive.core.schema.prebuilt.rag_state.RAGState

RAG state with self-reflection capabilities.

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.additional_workflows.SimpleRAGWithMemoryAgent(**kwargs)

Bases: haive.agents.multi.base.MultiAgent

Simple RAG with Memory - incorporates conversation history and previous queries. to provide contextually aware responses.

build_custom_graph()

Build the custom graph for this multi-agent workflow.

Return type:

Any

class agents.rag.multi_agent_rag.additional_workflows.StepBackPromptingRAGAgent(**kwargs)

Bases: haive.agents.multi.base.MultiAgent

Step-Back Prompting RAG - asks broader conceptual questions before. specific retrieval to get better context.

build_custom_graph()

Build the custom graph for this multi-agent workflow.

Return type:

Any

agents.rag.multi_agent_rag.additional_workflows.build_custom_graph()

Build custom graph for additional 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