Skip to content

Graphorin API reference v0.4.0


Graphorin API reference / @graphorin/evals / / parseScore

Function: parseScore()

ts
function parseScore(text): number | null;

Defined in: evals/src/scorers/llm/judge.ts:107

EB-7: parse the score from the LAST SCORE: <n> (or SCORE = <n>) marker in the reply. Anchoring on a deliberate, trailing marker — rather than the first integer anywhere — means a number the judge echoes from the candidate, or a refusal that mentions the 0-10 range, cannot be mistaken for the grade. Returns null when no marker is present (the caller treats that as an error).

Parameters

ParameterType
textstring

Returns

number | null