Repository navigation
fix(evals): require an explicit temperature of 1 on Gemini 3 steps - #187
adnanrhussain wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enforces Gemini 3 evaluator steps to explicitly set generation.temperature to 1 (instead of relying on omission via null), and updates existing evaluator configs to comply. It also trims and generalizes the schema documentation around temperature, moving model-specific enforcement into eval-config.
Changes:
- Add an
eval-configcross-file rule requiringgeneration.temperature == 1for LLM steps whose model name containsgemini-3. - Update two existing Gemini 3 evaluator configs to set
"temperature": 1. - Simplify the JSON Schema
temperaturedescription to remove stale model-family guidance.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scripts/checks/eval_config.py | Adds a new _check_generation rule enforcing explicit temperature 1 for Gemini 3 steps. |
| evals/_schemas/config.schema.json | Updates the temperature field description to be shorter and less model-specific. |
| evals/prompts/purpose/config.json | Changes Gemini 3 step temperature from 0 to 1 to satisfy the new check. |
| evals/literacy/qualitative-text-complexity/intertextuality/config.json | Changes Gemini 3 step temperature from 0.0 to 1 to satisfy the new check. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
a8c47c7 to
5340b65
Compare
5340b65 to
da30992
Compare
|
Closing: the premise doesn't hold. We deliberately do not honour Gemini 3's default temperature of 1 in most cases. Temperature 0 has been tested across the ela-reading evaluators and is the better choice for all of them except Organizational Structure (#176), which stays at 1. A blanket rule requiring an explicit 1 on every Gemini 3 step would reject #161, #173, #175 and #177. Model pins are intentional as they stand and are not changing here. One piece of this PR is still needed and should land separately. The
Filing that as its own change rather than carrying the rejected check along with it. |
Adds an
eval-configrule: any Gemini 3 step must pingeneration.temperatureto an explicit1. Also corrects thetemperaturedescription in the shared schema.Why
From Google's Gemini 3 developer guide — ai.google.dev/gemini-api/docs/gemini-3, section Temperature:
Confirmed against the API on both models we use. Each reports an advertised default of
1viaGET /v1beta/models/{model}, and each accepts omitted /1.0/0/nullwith a 200:gemini-3-flash-previewgemini-3.6-flash1(max2)1(max2)1.0/0/nullNothing rejects a bad value for us —
temperature: 0returns a clean 200 and quietly degrades — so this has to be caught by a lint rule rather than at runtime.nullis deliberately not accepted here. It would mean "omit", which is only as safe as the weakest client, and our TS provider'srequest.temperature ?? 0turns bothnullandundefinedinto0— the one value the guidance warns against.Changes
scripts/checks/eval_config.py— new_check_generation: model name containinggemini-3requirestemperature == 1. No model registry; the substring test mirrorslangchain_google_genai._is_gemini_3_or_laterand carries the same caveat about a future Gemini 4. The rationale and source link live in the code comment.evals/_schemas/config.schema.json— the previous description claimed Google "recommends removing the parameter" for Gemini 3. That is wrong; the guidance is to keep it at1.0. Rewritten, and cut from ~150 words to ~60. It now also states whennullis correct, which feat(evals): add Critical Thinking onto the shared evaluator contract #188 (Claude Opus 5) relies on — see Anthropic's model deprecations, wheretemperatureis deprecated for Opus 4.7 and later and the recommendation is to omit it.Sequencing
Blocked on #175 and #177. Two configs on
mainviolate the new rule —prompts/purpose(0) andqualitative-text-complexity/intertextuality(0.0) — and both files are deleted by those PRs, which already carrytemperature: 1at the new paths. Fixing them here would only create conflicts, soeval-configstays red until they land.Every other Gemini 3 evaluator is already compliant on its own branch (#159, #161, #173, #175, #176, #177).
Verification
strip-notebooks,eval-schemas,eval-fixtures,eval-notebook,eval-requirementspass.eval-configfails on exactly the two configs named above and nothing else.