@phren/cli
Version:
Knowledge layer for AI agents - CLI, MCP server, and data layer
34 lines (33 loc) • 1.26 kB
TypeScript
import { type SqlJsDatabase } from "../../shared/index.js";
import type { RecallResult } from "../types.js";
import { type RecallEvalCase } from "./cases.js";
import { type RecallJudgments } from "./judgments.js";
import { type RecallEvalRow, type RecallScore } from "./score.js";
export type { RecallEvalCase } from "./cases.js";
export type { RecallEvalRow, RecallScore } from "./score.js";
export type RecallRunner = (c: RecallEvalCase, ctx: {
phrenPath: string;
db: SqlJsDatabase;
}) => Promise<RecallResult>;
export declare function loadCases(file: string): RecallEvalCase[];
export interface RecallEvalReport {
score: RecallScore;
rows: RecallEvalRow[];
/** The judgments the score read, so unjudged pairs can be listed against the same cache. */
judgments: RecallJudgments;
}
export declare function runRecallEval(options: {
runner: RecallRunner;
cases?: RecallEvalCase[];
judgments?: RecallJudgments;
root?: string;
keep?: boolean;
}): Promise<RecallEvalReport>;
export declare function runRecallStoreEval(options: {
runner: RecallRunner;
cases: RecallEvalCase[];
judgments?: RecallJudgments;
phrenPath: string;
profile?: string;
embeddings?: boolean;
}): Promise<RecallEvalReport>;