/** * Task Alignment signal. * * Measures how relevant a candidate is to the *task* the agent is doing — * not just to the query string. The query asks "what?"; the task says "why?". * Two strategies: * - Embedding cosine when both session and result carry embeddings (best). * - Token-overlap Jaccard as a cheap fallback that works with what we have today. */ import type { SearchResult } from "@massa-th0th/shared"; import type { AgentSession } from "../types.js"; /** * Compute a [0,1] alignment between a result and the session task. * Returns 0 when there is no taskContext. * * Optional `resultEmbedding` enables the embedding-cosine path; otherwise * the function falls back to token-overlap over `result.content`. */ export declare function computeTaskAlignment(result: SearchResult, session: AgentSession, resultEmbedding?: number[] | Float32Array): number; //# sourceMappingURL=task-alignment.d.ts.map