Example from a public repositoryReview your own evals ↗Back to Keemlo
Evaluation review

A clearer path to better evaluations.

Retrieval relevance

Your code exposes retrieval evaluation routines alongside precision or recall routines. These metrics quantify matches against reference relevance labels.

Identified in calculate_precision_recall, evaluate_response_for_ir.

Failures

The returned score is recall although precision is also computed. Retrieving the expected documents alongside unrelated documents does not reduce that returned metric; extra context can still distract a document-answering assistant.

Code focus: tests/evals/eval.py:428 (evaluate_response_for_ir). The returned score: preserve precision alongside recall so irrelevant retrieved documents remain visible in the result.

Model-based judging

Routine names suggest model-based evaluation. Names alone do not confirm model execution or prompt use.

Identified in evaluate_response_with_gemini.

Failures

Reference input agent_references is not read in this evaluator body, which constructs an evaluation prompt. Its judgement cannot directly verify that an answer is supported by the supplied personal documents or web sources.

Code focus: tests/evals/eval.py:470 (evaluate_response_with_gemini). The evaluation prompt: connect the reference input to the judgement so source support can be assessed separately from answer agreement.

Answer matching

Your code exposes answer-matching routines. This approach compares an output or extracted answer with an expected reference.

Identified in evaluate_response_with_mcq_match.

Failures

The answer parser uses re.search inside a pattern loop with an early break. A response such as “Answer: A. Correction: Answer: B” can be graded from the earlier answer, mixing answer-format handling with reasoning quality.

Code focus: tests/evals/eval.py:450 (evaluate_response_with_mcq_match). The answer extraction loop: resolve an explicit final answer and distinguish conflicting or unparseable answers from incorrect ones.

Reported evaluation score

The result aggregation removes missing evaluation decisions before calculating their mean.

Identified in main.

Failures

Missing evaluation decisions are excluded before averaging. The reported score therefore describes only successfully judged cases and can hide evaluation-service failures on difficult requests.

Code focus: tests/evals/eval.py:680 (main). The dropna filter and the mean calculation: distinguish unavailable judgements from output failures and expose the scored denominator.

Turn your evaluation into
better decisions.

Share your report with us. We help you strengthen your evaluations and improve your workflow's quality, cost and speed.

Request access to work with Keemlo. This does not switch on any automatic optimisation.

Questions: contact@keemlo.com

Required for Request access. Optional for Download report.