/** * TermSearch — 精确匹配前置 + 向量语义检索 * 查询文本与术语名/别名完全匹配时直接返回,不走语义检索。 * 语义检索使用 BGE embedding cosine similarity 评分。 */ import type { KnowledgeEntry } from '../types/index.js'; import type { StorageAdapter } from '../storage/storage-types.js'; import type { ScoredEntry } from '../injection/relevance-scorer.js'; export interface TermSearchOptions { store: StorageAdapter; /** 可选:自定义 Ollama 配置。默认使用 localhost:11434 bge-m3 */ ollamaBaseUrl?: string; ollamaModel?: string; } export declare class TermSearch { private readonly store; private readonly embedder; constructor(options: TermSearchOptions); /** * 精确匹配:term 或 alias 完全匹配(大小写不敏感) * 命中时直接返回,不走语义检索 */ exactMatch(query: string, scope?: string): Promise; /** * 按 domain 检索术语,返回带评分的结果。 * 使用 BGE 向量余弦相似度评分。 */ searchByDomain(query: string, topK?: number): Promise; private queryActiveTerms; } //# sourceMappingURL=term-search.d.ts.map