//#region src/integrations/braintrust-experiment.d.ts /** * Turns Braintrust experiment rows into one offline-eval document. * One experiment is one model. Score names become evaluators. A null score * is left out, so a missing label is not stored as a pass. Polarity is set * only when the caller names issue labels. A numeric score is not guessed * to be better when it is higher. * * Rows join across arms on the dataset record they came from, not on the * experiment event `id`, which is unique per event and never matches across * experiments. */ interface BraintrustExperimentRow { /** The experiment event id. Unique per event, so it is not used as the row id. */ id?: string; /** The dataset record this event was run on (`origin.id` when `origin.object_type` is `dataset`). */ origin?: { object_type?: string; object_id?: string; id?: string; }; /** Legacy dataset record id that older Braintrust SDKs logged on experiment events. */ dataset_record_id?: string; input?: unknown; expected?: unknown; scores?: Record; metrics?: { start?: number; end?: number; }; } interface BraintrustExperiment { id: string; name: string; model?: string; /** The model provider, for example `openai`. Left unset when unknown. */ provider?: string; promptText?: string; promptVersion?: string; baseline?: boolean; rows: BraintrustExperimentRow[]; } declare function braintrustExperimentsToDocument(input: { datasetName: string; experiments: BraintrustExperiment[]; ranAt?: string; gitSha?: string; /** `smoke`, `full`, or the dataset version. Part of the default idempotency key. Defaults to `full`. */ slice?: string; idempotencyKey?: string; issueLabels?: Record>; /** Names the dataset row of an event that has no `origin.id` or `dataset_record_id`. */ rowKey?: (row: BraintrustExperimentRow) => string | undefined; }): Record; //#endregion export { BraintrustExperiment, BraintrustExperimentRow, braintrustExperimentsToDocument }; //# sourceMappingURL=braintrust-experiment.d.ts.map