agents.rag.factories.compatible_rag_factory_simple

Simplified Compatible RAG Factory.

Simplified version without legacy functions that have import issues.

Classes

CompatibleRAGFactory

Factory for building RAG workflows with I/O schema compatibility.

RAGComponent

Available RAG component types for plug-and-play composition.

WorkflowPattern

Pre-defined workflow patterns.

Functions

create_plug_and_play_component(component_type, documents)

Create any RAG component as a standalone agent.

get_component_compatibility_info(component_type)

Get I/O schema information for a component type.

Module Contents

class agents.rag.factories.compatible_rag_factory_simple.CompatibleRAGFactory(documents, llm_config=None, name='Compatible RAG Workflow')

Factory for building RAG workflows with I/O schema compatibility.

Initialize factory with documents and configuration.

Parameters:
  • documents (list[langchain_core.documents.Document])

  • llm_config (haive.core.models.llm.base.LLMConfig | None)

  • name (str)

classmethod create_graded_hyde_workflow(documents, llm_config=None, enable_search_tools=False, **kwargs)

Create workflow with HyDE and document grading.

Parameters:
  • documents (list[langchain_core.documents.Document])

  • llm_config (haive.core.models.llm.base.LLMConfig | None)

  • enable_search_tools (bool)

Return type:

haive.agents.multi.base.SequentialAgent

classmethod create_simple_workflow(documents, llm_config=None, **kwargs)

Create simple RAG workflow.

Parameters:
  • documents (list[langchain_core.documents.Document])

  • llm_config (haive.core.models.llm.base.LLMConfig | None)

Return type:

haive.agents.multi.base.SequentialAgent

class agents.rag.factories.compatible_rag_factory_simple.RAGComponent(*args, **kwds)

Bases: enum.Enum

Available RAG component types for plug-and-play composition.

class agents.rag.factories.compatible_rag_factory_simple.WorkflowPattern(*args, **kwds)

Bases: enum.Enum

Pre-defined workflow patterns.

agents.rag.factories.compatible_rag_factory_simple.create_plug_and_play_component(component_type, documents, llm_config=None, **kwargs)

Create any RAG component as a standalone agent.

Parameters:
  • component_type (RAGComponent)

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

  • llm_config (haive.core.models.llm.base.LLMConfig | None)

Return type:

haive.agents.simple.agent.SimpleAgent | haive.agents.rag.base.agent.BaseRAGAgent

agents.rag.factories.compatible_rag_factory_simple.get_component_compatibility_info(component_type)

Get I/O schema information for a component type.

Parameters:

component_type (RAGComponent)

Return type:

dict[str, list[str]]