Interface HydeConfig

interface HydeConfig {
    enabled?: boolean;
    initialThreshold?: number;
    minThreshold?: number;
    thresholdStep?: number;
    adaptiveThreshold?: boolean;
    maxHypothesisTokens?: number;
    hypothesisSystemPrompt?: string;
    fullAnswerGranularity?: boolean;
    hypothesisCount?: number;
}

Properties

enabled?: boolean

Enable HyDE retrieval. Default: false.

initialThreshold?: number

Initial similarity threshold. Default: 0.7.

minThreshold?: number

Minimum threshold to step down to. Default: 0.3.

thresholdStep?: number

Step size for adaptive thresholding. Default: 0.1.

adaptiveThreshold?: boolean

Use adaptive thresholding (step down when no results). Default: true.

maxHypothesisTokens?: number

Max tokens for hypothesis generation. Default: 200.

hypothesisSystemPrompt?: string

Custom system prompt for hypothesis generation.

fullAnswerGranularity?: boolean

Use full-answer granularity (recommended by research). Default: true.

hypothesisCount?: number

Number of diverse hypothetical documents to generate per query.

Multi-hypothesis HyDE generates N hypotheses from different perspectives (technical, practical/example, overview) and searches with each embedding. Results are deduplicated by chunk ID, keeping the highest score.

Higher values improve recall at the cost of additional LLM calls.

  • 1: Original single-hypothesis HyDE (fastest)
  • 3: Recommended default (good diversity/cost tradeoff)
  • 5: Maximum diversity (highest recall, most expensive)

Default: 3.