/** * Hedging classifier (spec §四.3, v0.2). * * regex 召回 → LLM 二次判定。把 extractHedgingSignals 的 candidate 句子送给小模型, * 让模型判断"这一句是知识层面的不确定,还是业务推理 / 假设 / 礼貌表达"。 * * 关键约束: * - cost 上限: 默认 maxCandidates=50, 超出截断 + warn * - cache: in-memory Map, 同句子不重复调用 * - 失败降级: 调用 / 解析失败 → 该 candidate 默认 isUncertainty=true (保守保留) */ import type { ExecutorFn, HedgingVerdict } from '../types/index.js'; export interface HedgingCandidate { sampleId: string; sentence: string; context: string; } export interface ClassifyOptions { model: string; maxCandidates?: number; batchSize?: number; } export interface ClassifyResult { verdicts: HedgingVerdict[]; costUSD: number; truncated: boolean; } export declare function clearHedgingCache(): void; /** * 对一批 candidate 做分类判定。返回与 input 等长的 verdicts。 * 失败降级:单批 LLM 调用 / 解析失败 → 该 batch 全部 isUncertainty=true (保守保留)。 */ export declare function classifyHedgingCandidates(candidates: HedgingCandidate[], executor: ExecutorFn, opts: ClassifyOptions): Promise;