agents.rag.simple.enhanced_v3.retriever_agentΒΆ

Specialized Retriever Agent for SimpleRAG V3.

This module provides a specialized retriever agent that extends BaseRAGAgent with enhanced features for use in Enhanced MultiAgent V3 workflows.

ClassesΒΆ

RetrieverAgent

Specialized retriever agent for SimpleRAG V3.

Module ContentsΒΆ

class agents.rag.simple.enhanced_v3.retriever_agent.RetrieverAgentΒΆ

Bases: haive.agents.rag.base.agent.BaseRAGAgent

Specialized retriever agent for SimpleRAG V3.

This agent extends BaseRAGAgent with enhanced features: - Performance tracking and timing - Debug information collection - Enhanced document metadata - Quality scoring for retrieved documents - Configurable retrieval parameters

Designed to work as the first agent in Enhanced MultiAgent V3 sequential pattern: RetrieverAgent β†’ SimpleAnswerAgent

Examples

Basic usage:

retriever = RetrieverAgent(
    name="document_retriever",
    engine=vector_store_config,
    top_k=5,
    score_threshold=0.7
)

result = await retriever.arun("What is machine learning?")

With performance tracking:

retriever = RetrieverAgent(
    name="enhanced_retriever",
    engine=vector_store_config,
    performance_mode=True,
    debug_mode=True
)
async arun(input_data, debug=False, **kwargs)ΒΆ

Enhanced retrieval with performance tracking and debug info.

Parameters:
  • input_data (str | dict[str, Any]) – Query string or dict with β€˜query’ field

  • debug (bool) – Enable debug output

  • **kwargs – Additional retrieval parameters

Returns:

  • documents: List of retrieved documents

  • metadata: Retrieval metadata (if performance_mode)

  • debug_info: Debug information (if debug_mode)

  • performance_metrics: Timing and quality metrics

Return type:

Dict containing

get_retrieval_summary()ΒΆ

Get summary of retriever configuration.

Return type:

dict[str, Any]