agents.rag.hyde.agentΒΆ
HyDE (Hypothetical Document Embeddings) RAG Agent.
from typing import Any Bridges query-document semantic gap by generating hypothetical documents. Implements architecture from rag-architectures-flows.md: Query -> Generate Hypothetical Doc -> Embed -> Retrieve Real Docs -> Generate
ClassesΒΆ
HyDE RAG using hypothetical document generation for better retrieval. |
Module ContentsΒΆ
- class agents.rag.hyde.agent.HyDERAGAgentΒΆ
Bases:
haive.agents.multi.MultiAgent
HyDE RAG using hypothetical document generation for better retrieval.
- classmethod from_documents(documents, llm_config=None, **kwargs)ΒΆ
Create HyDE RAG from documents.
- Parameters:
documents (list[langchain_core.documents.Document]) β Documents to index
llm_config (haive.core.models.llm.base.LLMConfig | None) β Optional LLM configuration
**kwargs β Additional arguments
- Returns:
HyDERAGAgent instance