
Node Details
- Name: HydeRetriever
- Type: HydeRetriever
- Version: 3.0
- Category: Retrievers
- Base Classes: HydeRetriever, BaseRetriever
Input Parameters
-
Language Model (required)
- Type: BaseLanguageModel
- Description: The language model used to generate hypothetical documents.
-
Vector Store (required)
- Type: VectorStore
- Description: The vector store to retrieve documents from.
-
Query (optional)
- Type: string
- Description: Specific query to retrieve documents. If not provided, the user’s question will be used.
-
Select Defined Prompt (required)
- Type: options
- Description: Pre-defined prompt templates for different use cases.
- Options: websearch, scifact, arguana, trec-covid, fiqa, dbpedia-entity, trec-news, mr-tydi
- Default: websearch
-
Custom Prompt (optional)
- Type: string
- Description: A custom prompt template that overrides the defined prompt if provided.
-
Top K (optional)
- Type: number
- Description: Number of top results to fetch.
- Default: 4
Outputs
-
HyDE Retriever
- Type: HydeRetriever
- Description: The configured HyDE Retriever object.
-
Document
- Type: Document[]
- Description: An array of retrieved document objects containing metadata and page content.
-
Text
- Type: string
- Description: Concatenated string of page content from all retrieved documents.
Usage
The HyDE Retriever is particularly useful in scenarios where traditional keyword-based retrieval might fall short. It’s effective for:- Answering complex questions that require contextual understanding
- Retrieving documents for topics with limited or ambiguous keywords
- Improving retrieval performance in domain-specific applications