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ΒΆ
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:
- 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