Expand description
Query preprocessing strategies for improved retrieval.
This module provides preprocessing techniques to enhance query effectiveness:
- HyDE (Hypothetical Document Embeddings): Generate hypothetical answers for better matching
- Multi-query expansion: Expand a single query into multiple related queries
Structs§
- Anthropic
Hypothetical Generator - Anthropic-backed HyDE generator using Claude API.
- Chained
Preprocessor - Chained preprocessor that applies multiple preprocessors in sequence.
- Hyde
Preprocessor - HyDE (Hypothetical Document Embeddings) preprocessor.
- Keyword
Expander - Keyword-based query expander.
- Mock
Hypothetical Generator - Mock HyDE generator for testing that creates a simple hypothetical answer.
- Multi
Query Preprocessor - Multi-query expansion preprocessor.
- Passthrough
Preprocessor - No-op preprocessor that returns the query unchanged.
- Query
Analysis - Analysis result for a query.
- Query
Analyzer - Query analyzer that extracts structured information from queries.
- Synonym
Expander - Synonym-based query expander.
Enums§
- Query
Intent - Detected intent of a query.
Traits§
- Hypothetical
Generator - Trait for generating hypothetical documents from queries.
- Query
Expander - Trait for expanding queries into multiple related queries.
- Query
Preprocessor - A query preprocessor that transforms or expands queries before retrieval.