Skip to content

fix: Python CoT suffix says "step-by-step manner", as in JS - #265

Open
Abhay Mettu (abhaymettu) wants to merge 1 commit into
braintrustdata:mainfrom
abhaymettu:fix/217-template-wording
Open

Abhay Mettu (abhaymettu) wants to merge 1 commit into
braintrustdata:mainfrom
abhaymettu:fix/217-template-wording

Conversation

@abhaymettu

Copy link
Copy Markdown

The Python COT_SUFFIX in py/autoevals/llm.py still says "in a step-by-step matter". #66 fixed the same typo only in js/llm.ts, so the Python and JS versions of every LLM judge send different prompts when use_cot is on. This change makes the Python text match JS ("manner", the wording of OpenAI's cot_classify prompt) and adds a test that pins it. Partly addresses #217.

The typo is not in templates/factuality.yaml, as the issue says. It is in the suffix that code appends to every template, Factuality included. I left the issue's other point alone. OpenAI's closedqa.yaml writes its CoT instruction inline as "your reasoning about the criterion". Autoevals uses one shared suffix for all templates instead, and that suffix also has to serve Factuality, Battle and the rest, so scoping it to "the criterion" would need a per-template suffix. That is a change to how prompts are built, not a typo fix. I also left the scoring weights alone.

Verification

  • uv run --extra dev --extra scipy pytest py/autoevals/test_llm.py -k cot_suffix: the new test fails on main (assert 'with your reasoning in a step-by-step manner to be sure' in "You are comparing ...") and passes with the fix.
  • uv run --extra dev --extra scipy pytest py/autoevals/test_llm.py: 16 passed, 5 failed both here and on main (15 passed before the new test). The 5 failures are test_openai, test_llm_classifier, test_nested_async, test_factuality and test_battle, which need a real OpenAI or Braintrust key (OpenAIError: Missing credentials). I did not run them with a key.
  • pnpm exec vitest run js/llm.test.ts: 11 passed. JS is unchanged.
  • uv run --extra dev pre-commit run --files py/autoevals/llm.py py/autoevals/test_llm.py: black, ruff, codespell and prettier pass.

The Python COT_SUFFIX still read "step-by-step matter", a typo braintrustdata#66 fixed
only in js/llm.ts, so Python and JS judges sent different prompts. Pin the
corrected wording with a test on the rendered Factuality prompt.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T16:19:41.699274Z dee91cb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
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