/** * prefixes.ts — the input-prefix convention table. * * Mirrors resources/embeddings-provider.ts's Phase 2 behavior (flair#504): * HFE 0.3.0's engine prepends a literal `"search_document: "` / * `"search_query: "` string ahead of the text it hands to the model, for * nomic-family models trained on that asymmetric-prefix convention. flair- * bench talks to node-llama-cpp directly (no HFE in the loop — see the * package README for why), so it has to replicate that string-prepend * itself rather than pass an `inputType` option through to a wrapper that * does it. * * KEYED ON MODEL FILENAME, for now — nomic is the only convention flair * ships today, and there's exactly one production model family to match. * This table is the seam for adding more: a future entry keys on another * filename pattern (or, if a GGUF ever carries a documented convention-id * in its own metadata, that becomes the preferred match — filename is a * pragmatic fallback, not a design commitment). Nomic upstream has a request * to carry this in the GGUF/HFE registration surface itself rather than * every consumer re-deriving it from a filename convention — see * harper-fabric-embeddings#4 (upstream proposal, not yet merged as of this * writing). * * A model whose filename matches no entry gets `undefined` from * `resolvePrefixConvention()` — texts are embedded unprefixed, and the * result is labeled accordingly rather than silently guessing. */ export interface PrefixConvention { /** Human-readable id, surfaced in output so a reader knows which convention (if any) applied. */ id: string; documentPrefix: string; queryPrefix: string; } /** Resolve the prefix convention for a GGUF file, by basename. `undefined` = no known convention (embed unprefixed). */ export declare function resolvePrefixConvention(fileName: string): PrefixConvention | undefined; export declare function applyDocumentPrefix(text: string, convention: PrefixConvention | undefined): string; export declare function applyQueryPrefix(text: string, convention: PrefixConvention | undefined): string;