Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

ds4-eval: strict grader marks correct answer INCOMPLETE when output ends with "</think>E" (no "Answer:" line)

Open Beginner friendly
#1,195 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
c
Domain
testing-qa

Research direction

Start in ds4_eval.c at find_case_answer_strict() around line 3323, and compare its last-line handling with the lenient find_answer_letter() extractor. Run the deterministic reproduction command in the issue before and after the change. Done means the glued </think>E case is graded as E rather than INCOMPLETE, without changing the behavior for other outputs.

Written by the indexing model from the issue text.

Description

Summary

find_case_answer_strict() requires the final line of the output to contain an
Answer: marker. When the model closes thinking and emits the bare answer glued
to the tag (e.g. ...</think>E), the grader returns INCOMPLETE even though the
letter is correct.

Repro (deterministic)

./ds4-eval --plain --case-id 4a1d1780a93f4093b6fb7d3c314cbea8

Model: DeepSeek V4 Flash Q2 (ds4flash.gguf), Metal, M5 Max 128GB, temp 0
(eval default). The model deterministically ends its output with:

...So answer E.</think>E

Result: INCOMPLETE got ? expected E. --retry-incomplete does not help — the
retry produces the same 183-token output.

Root cause

find_case_answer_strict() (ds4_eval.c, ~line 3323):

  1. trims trailing whitespace, takes the last line;
  2. requires answer_payload(line) (an "Answer:" marker) — otherwise returns
    false → EVAL_INCOMPLETE.

The lenient extractor (find_answer_letter() reverse scan) would catch the
bare E, but it is only used by --regrade-trace, not live runs.

Suggested fix

In the strict path, when the last line has no Answer: marker but contains
</think> followed by non-empty text, grade the text after the tag. A minimal
local patch of ~10 lines does this and flips the case to PASSED.

Why it matters

INCOMPLETE is meant to separate "did not follow the format" from "answered
wrong". A correct bare answer glued to </think> is a common, benign deviation;
counting it as INCOMPLETE understates the model and wastes a retry budget.

Dominant language
C
Stars
23.6k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from antirez/ds4

All issues in antirez/ds4

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.