Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions evals/src/autoevals.eval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
DEFAULT_MODEL,
Factuality,
NumericDiff,
Score,
} from "autoevals";

const experimentNamePrefix = process.env.EXPERIMENT_NAME;
Expand Down Expand Up @@ -77,15 +76,13 @@ Eval("Autoevals", {
tags: [...(tags ?? []), name],
}));
}),
task: async (input, hooks) => {
task: async (input) => {
const { scorer, ...rest } = input;
let result: Score | null = null;
try {
result = await runScorerT(scorer, rest);
} catch (e) {
hooks.meta({ error: `${e}` });
const result = await runScorerT(scorer, rest);
if (result.score === null) {
throw new Error(`Scorer ${scorer} did not return a score.`);
}
return result?.score ?? -1;
return result.score;
},
scores: [NumericDiff],
experimentName: experimentNamePrefix ?? undefined,
Expand Down
4 changes: 1 addition & 3 deletions js/llm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export type LLMArgs = {
temperature?: number;
} & OpenAIAuth;

export const DEFAULT_MODEL = "gpt-4o";
export const DEFAULT_MODEL = "gpt-5-mini";

const PLAIN_RESPONSE_SCHEMA = {
properties: {
Expand Down Expand Up @@ -217,7 +217,6 @@ export function LLMClassifierFromTemplate<RenderArgs>({
const prompt =
promptTemplate + "\n" + (useCoT ? COT_SUFFIX : NO_COT_SUFFIX);

const maxTokens = 512;
const messages: ChatCompletionMessageParam[] = [
{
role: "user",
Expand All @@ -231,7 +230,6 @@ export function LLMClassifierFromTemplate<RenderArgs>({
choiceScores,
classificationTools: buildClassificationTools(useCoT, choiceStrings),
model,
maxTokens,
temperature,
__choices: choiceStrings,
...runtimeArgs,
Expand Down
Loading