Skip to content

test(chat): evals fail any "couldn't read" answer - #2450

Merged
gkhngyk merged 8 commits into
ansvisor:mainfrom
cihan-gyk:test/chat-no-give-up-evals
Nov 16, 2026
Merged

gkhngyk merged 8 commits into
ansvisor:mainfrom
cihan-gyk:test/chat-no-give-up-evals

Conversation

@cihan-gyk

@cihan-gyk cihan-gyk commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #2449 (fix/chat-never-give-up). Until it lands, this diff also shows its commits. #2448 and #2420 are merged.

Merged with main (16 Nov, evening): via the updated #2449, with no conflicts. The give-up check is now also asserted on #2445's action-by-code scenario: reading a page of the list and then saying "bulamadım" fails it, and "not found" after a read by code passes. tsc is clean, and 336 test files (4,843 tests) pass. The branch is 0 commits behind main and merges cleanly.

Summary

Chat's two test sets now fail any answer that gives up on data Chat could have read, in English and Turkish. The model eval gains four scenarios from the Chat page-data audit.

A long chip or "Ask about this" label (a prompt's text, up to 500 characters) made the message fail to send. It now sends, with the label cut to 200 characters.

Changes

  • A shared detector (testing/give-up.ts). It finds:
    • "couldn't read / reach / access", "read limit", "hit the limit", "rows", and a count of missing items ("38 are missing");
    • in Turkish: "okuyamadım", "ulaşamadım", "erişemedim", "okuma sınırı", "sınırına takıldım", "eksik" about the data, and "bulamadım".
  • What may still pass:
    • "Not found" or "bulamadım", only after a direct lookup (a read by code, id, words or address).
    • "Can't access" or "hit the limit", only after a true refusal (a denial, a missing connection, a spend cap).
    • "Eksik" about a page ("FAQ şeması eksik").
  • A must check, "never gives up on data it could read", on:
  • Four model-eval scenarios (rows 34–37), each with its own data:
    • action-past-first-page (Turkish): AC-63 is 53rd of 55 open actions. Chat must read the next page, or the action by its code, and name it.
    • long-list: 451 signals. The answer states the total.
    • other-page-data (Turkish, asked from Signals' panel): which prompts lost most visibility. Chat must read another page's data.
    • cut-by-size: a page of citations too big for one read. Chat reads on from next_offset, or states the total.
  • Runner (model-eval.test.ts): a scenario's reads answer with its own results; its page context is sent; each read's input is kept for the checks.
  • Long labels (engine.ts startRunInput):
    • A chip's label or value, or a reference's label, over 200 characters is now cut to 200 (never in half an emoji) instead of refused.
    • Over 2,000 is still refused.
    • The refusal came from the server's schema, so fixing it there covers the side panel and every other client. chat-thread-view.tsx is unchanged.
  • Help: no change. The panel's section is at its word limit, and a message that now sends as expected needs no new step.

How to test

  1. Run the scripted tests, which run in CI and call no billed model:
    cd web && yarn vitest run src/lib/chat/testing src/lib/chat/model-eval.test.ts src/lib/chat/long-labels.test.ts
  2. In the app, on Prompts, use Ask about this on a prompt over 200 characters and send. The message goes. Before this change it failed to send.
  3. Billed model eval: not run here. To run it: CHAT_MODEL_EVAL=… CHAT_MODEL_EVAL_ONLY=action-past-first-page,long-list,other-page-data,cut-by-size yarn vitest run src/lib/chat/model-eval.test.ts.

Checks

🤖 Generated with Claude Code

https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9

The writer was told to "say plainly when data is missing", and a read
that ran out of time told it to say the data "couldn't be read now".
Answers like "I couldn't read it", "I hit the read limit" or "38 actions
are missing" followed, about data Chat could have read.

- Rules: the reader looks an item up by what the person named, reads the
  next page of a list that has more (next_offset), reads the rest of a
  cut result or narrows it, and tries a failed or slow read once more,
  narrower. The writer reads on first, says "not found" only after a
  direct lookup, never offers substitutes, says what a partial answer
  covers ("the newest 50 of 451 signals"), and keeps "no" for a true
  refusal (plan, role, AI budget, an Admin setting, a feature that is
  off) with why and what to do. Neither ever writes "couldn't read",
  "couldn't reach", "read limit", "rows" or a count of missing items, in
  any language, Turkish named (READ_ON_RULES, NEVER_GIVE_UP_RULES).
- Messages: a timeout asks for one narrower try, never the same input,
  and a second timeout of the same read for none (a third call is refused
  without reading). A failed read says to try the same data another way
  once, and now reaches the writer's read log. Reads used up: answer for
  what was read and say what it covers; never "a limit". explain_change's
  partial line and the Why card's say causes come only from prompts whose
  answers were all compared. Step labels: "Not available right now",
  "Took too long this time".
- Budget: a next page of a list the run already read counts as a quarter
  of a read (PAGES_PER_READ 4), up to 12 next pages a run
  (MAX_NEXT_PAGES); the data budget still holds.
- Help: Use Chat gains "Long lists"; "When something goes wrong" and
  "What explains the change" say the new behaviour.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
The owner's rule (2026-11-16): an answer never says it couldn't read,
reach or find data Chat could have read. Both test sets now fail one.

- A shared detector (testing/give-up.ts) finds "couldn't read / reach /
  access", "read limit", "hit the limit", "rows", a count of missing
  items, and in Turkish "okuyamadım", "ulaşamadım", "erişemedim",
  "okuma sınırı / sınırına takıldım", "eksik" about the data and
  "bulamadım". "Not found" passes only after a direct lookup (a read by
  code, id, words or address); "can't access" or "hit the limit" only
  after a true refusal (a denial, a missing connection, a spend cap).
- A `must` check on every scenario of the model eval and on every agent
  and skill run of the agents' eval: "never gives up on data it could
  read".
- Four model-eval scenarios from the Chat page-data audit, each with its
  own data: an action past the list's first page, asked in Turkish
  (AC-63, 53rd of 55: read the next page or by its code); a list of 451
  signals (say the total); Signals' panel asked about prompts (read
  another page's data); a page of citations cut for size (read on from
  next_offset, or say the total). The runner gives a scenario's reads its
  own results, sends its page context and keeps each read's input.
- Scripted harness tests run in CI: a run that reads the next page
  passes, an answer that gives up fails in English and Turkish, and a
  page cut for size reaches the model with next_offset and no
  "{list}_more".
- A chip or "Ask about this" label over 200 characters (a prompt's text,
  up to 500) refused the message with a 400. startRunInput now cuts a
  page's label or value to 200 characters (no half emoji) and still
  refuses one past 2,000. The fix is in the server's schema, so
  chat-thread-view.tsx is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
gkhngyk
gkhngyk previously approved these changes Nov 16, 2026

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Note: give-up.ts ALWAYS patterns flag correct gap answers in the gated evals ("Your brand is missing from 12 AI answers", "3 sayfada FAQ şeması eksik", any "rows"), so real-model eval runs can report false failures; CI is unaffected.

@cihan-gyk
cihan-gyk dismissed gkhngyk’s stale review November 16, 2026 16:55

The merge-base changed after approval.

Brings in upstream main through the updated fix/chat-never-give-up. The
give-up check runs in gradeAgentRun for every scenario; the tests now
assert it for every agent and skill scenario, and for action-by-code
(a page read then "bulamadım" fails; "not found" after a codes read passes).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
gkhngyk
gkhngyk previously approved these changes Nov 16, 2026

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@cihan-gyk
cihan-gyk dismissed gkhngyk’s stale review November 16, 2026 17:32

The merge-base changed after approval.

@gkhngyk
gkhngyk merged commit 299a19e into ansvisor:main Nov 16, 2026
11 checks passed
cihan-gyk pushed a commit to cihan-gyk/ansvisor that referenced this pull request Nov 16, 2026
Brings in ansvisor#2449, ansvisor#2450, ansvisor#2457, ansvisor#2460 and ansvisor#2461 (Chat and MCP lookups by
code, id, words, domain or address; never give up on data it could read).

Conflicts, resolved as the union of both sides:
- agent-eval.ts: the scenario keeps askedSignals/askedDomains and checks;
  QUESTION_SCENARIOS holds action-by-code, signal-by-code,
  citation-by-domain and the three ai-revenue questions; every run gets
  "never gives up on data it could read" and then its scenario's checks.
- agent-eval-data.ts: EvalWorkspace is default, action_backlog,
  long_lists and conversions_off; both sides' imports.
- agent-eval.test.ts: both sides' imports.
- brand-scope.test.ts: the AI-revenue reads and the lookups.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
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.

3 participants