/** * Query Rewriter Service * * Provides centralized query rewriting logic for semantic search and discovery. * Handles ADR number recognition, query expansion, and synonym recognition. */ /** * Rewrites a query to improve semantic search results. * * Features: * - ADR number recognition and expansion (e.g., "ADR-0016" → "ADR 0016" + "0016") * - Synonym recognition (e.g., "migration" → "migrate", "migrated", "migrating") * - Query expansion for better embedding matches */ export declare class QueryRewriter { /** * Rewrites a query to improve semantic search results. * * @param query The original query string * @returns The rewritten query with expanded terms */ rewriteQuery(query: string): string; /** * Extracts ADR numbers from a query string. * * Recognizes patterns like: * - "ADR-0016" * - "ADR 0016" * - "0016" * - "16" (with context suggesting ADR) * * @param query The query string * @returns Array of extracted ADR numbers (without leading zeros) */ extractAdrNumbers(query: string): string[]; /** * Expands a query with ADR number variants. * * Adds variants like: * - "ADR 0016" * - "0016" * - "016" (with leading zero) * * @param query The original query * @param adrNumbers Array of ADR numbers to expand * @returns Expanded query string */ expandAdrQuery(query: string, adrNumbers: string[]): string; /** * Expands synonyms in a query. * * Currently handles common patterns: * - "migration" → "migrate", "migrated", "migrating" * - Can be extended with more synonym mappings * * @param query The query string * @returns Query with expanded synonyms */ private expandSynonyms; } //# sourceMappingURL=query-rewriter.d.ts.map