/** * Query Expansion — LLM-based synonym / paraphrase generation for BM25. * * Natural language questions ("how does the billing flow work?") share little * vocabulary with card text. HyDE handles the SEMANTIC leg by generating a * hypothetical document and embedding it; this module handles the KEYWORD leg * by generating 2-3 alternative keyword-focused queries that BM25 can match. * * Results are cached in a 100-entry in-process LRU to avoid re-calling the * LLM for repeated identical queries (common in interactive MCP sessions). * * Falls back to an empty array (= no expansion, original query only) if: * - The query is short or identifier-style (BM25 already handles those well) * - The LLM is unavailable or not configured * - The LLM call times out after 3 seconds */ /** * Expands a natural-language query into 0-3 alternative keyword-focused queries. * * The returned queries are intended for additional BM25 passes alongside the * original query. Results for all queries are merged, keeping the best rank * per card across all keyword searches. * * @returns Array of alternative queries (may be empty if expansion was skipped). */ export declare function expandQuery(query: string): Promise; //# sourceMappingURL=query-expander.d.ts.map