Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

test: a second chat scenario, from the maintainer's second retest - #32

Merged
mkhellat merged 1 commit into
mainfrom
test/chat-eval-logs
Nov 26, 2026
Merged

mkhellat merged 1 commit into
mainfrom
test/chat-eval-logs

Conversation

@mkhellat

Copy link
Copy Markdown
Owner

A second scenario for scripts/chat_eval.py, built from the maintainer's second retest. Codebud there:

  • answered "which model are you?" with "I am Codebud";
  • described a file it had never read;
  • read the user's short analysis instead of the 3.7 MB log, then denied having read it;
  • answered a complaint by re-running its steps;
  • planned a shell pipeline to count files by type.

What it adds

  • scripts/chat_eval_logs.json: seven turns over a fixture of eight files. One is a generated 270 KB VPN log whose telling lines (AuthError, an expired certificate) are at the end. The checks:
    • the model is named;
    • nothing is claimed about a file not read in that turn;
    • the log is read, not the analysis;
    • the file just read is named;
    • a complaint is answered without steps;
    • eight files are counted without a refused shell step.
  • New check kinds, unit-tested: text_contains_model, no_unread_claims, no_steps, no_shell_refused.
  • --scenario PATH; the first scenario stays the default. Large fixture files are generated from a repeated line.

Baseline (current main)

Model Checks Time
qwen2.5-coder:3b 9 / 13 220 s
qwen2.5-coder:7b 9 / 13 375 s

Both models:

  • say "I am Qwen…" on turn 1;
  • read log_calc.c instead of trac.log when told to look at "the log file itself" (the word "log" matched the wrong file), then honestly named log_calc.c as what they read;
  • miscount the files (the 3B counted 11, directories included; the 7B printed a JSON fragment with a pipe).

The 3B also said "the abdul directory is empty" without looking. The check doesn't catch that, since it watches for invented contents; a follow-up can tighten it. And the 3B's turn-4 answer began by copying the history's internal ran: … line.

Review and CI

  • Implemented by a Sonnet subagent and reviewed locally. It kept the first scenario's fixture format. One lenient check: "auth" also matches "authentication".
  • The chat_eval and build tests pass, ruff is clean, and the manual builds without warnings.
  • CI runs once on this head: it adds test code.

The second retest showed codebud answer "I am Codebud" to "which model
are you?", describe a file it had never read, read the user's short
analysis instead of the 3.7 MB log, deny having read it, answer a
complaint by re-running its steps, and plan a shell pipeline to count
files by type.

scripts/chat_eval_logs.json plays that as seven turns over a fixture
of eight files, one of them a generated 270 KB VPN log whose telling
lines (AuthError, an expired certificate) are at the end, and checks:
the model named; nothing claimed about a file not read in the turn;
the log read, not the analysis; the file just read named; a complaint
answered without steps; eight files counted without a refused shell
step.  chat_eval.py takes --scenario (the first scenario stays the
default) and generates large fixture files from a repeated line.

* scripts/chat_eval.py (build_parser): New; --scenario.
(make_fixture): Generated files.
(_check_one): text_contains_model, no_unread_claims, no_steps,
no_shell_refused.
* scripts/chat_eval_logs.json: New file.
* tests/test_chat_eval.py: Test them.
* docs/chapters/performance-benchmarking.texi (Chat Session Evaluation):
The second scenario.
@mkhellat

Copy link
Copy Markdown
Owner Author

Review summary: correct (one known gap)

One sweep, locally.

Conditions.

  • no_unread_claims passes ⇔ no keyword of the file is in the text ∨ a step of the turn names the file.
  • no_steps ⇔ the turn ran zero steps.
  • text_contains_model ⇔ the model family (before :) or "qwen" is in the text.
  • The fixture's generated log is deterministic: 269,951 bytes, with the telling lines last.

Verified: 24 unit tests over every check kind, the 8-file count, the log's size and tail, and --scenario parsing. The baseline above is on 3B and 7B.

Known gap, for a follow-up: a claim about a file or directory that wasn't checked (the 3B's "the abdul directory is empty") passes no_unread_claims, which only looks for invented contents.

Verdict: correct. I'll merge when CI passes.

@mkhellat

Copy link
Copy Markdown
Owner Author

Merging. CI is green on all five jobs: the one failure (macOS Py 3.10) was a pre-existing flaky test, not this PR (a base64 ciphertext happened to contain the test's plaintext old). #33 fixed it, and the failed job was re-run and passed.

CI on the merge is skipped, and why. main moved after this branch (#33, #34). I merged it onto the current main locally first. The merge was clean, and the merged tree passed the full suite (1906), ruff, and the manual build without warnings. The merge commit carries [skip ci], and I start the docs workflow by hand.

As agreed, the scenario is measurement only: prompts are never tuned to it.

@mkhellat
mkhellat merged commit 6b2aa0d into main Nov 26, 2026
11 of 12 checks passed
@mkhellat
mkhellat deleted the test/chat-eval-logs branch November 26, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant