Repository navigation
fix(evaluator): normalize strict response schemas - #14
Conversation
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
|
All contributors have signed the DCO ✍️ ✅ |
3mei
left a comment
There was a problem hiding this comment.
This does not depend on #15: evaluator/runtime.py imports only evaluator modules. Could it be restacked onto #12 or main so it can be reviewed on its own?
Non-blocking: _close_json_schema_objects sets additionalProperties: false on every object, including objects that declare a map (additionalProperties: {...}), and acall_llm applies it to every structured call for every provider. No current schema declares a map, but a future map-typed field could then only be {}. Could it leave objects that already declare additionalProperties unchanged?
|
I have read the DCO document and I hereby sign the DCO. |
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
Signed-off-by: Felipe Vieira Frujeri <[email protected]>
85c61e3 to
e0271ff
Compare
|
Rebased onto the current #15 head and removed the evaluator-runtime commits already absorbed there. The PR now contains only strict-schema normalization plus its regression test (2 files, 102 added lines). Focused validation: 19 passed; Ruff lint/format passed. |
4fd4c80 to
a4665b3
Compare
Brings in the external probe episode runtime from main, so this branch differs from main only by the strict response-schema normalization. Signed-off-by: Yev Meyer <[email protected]>
3mei
left a comment
There was a problem hiding this comment.
Approving. With main merged in, this PR is now just the strict-schema normalization in acall_llm and its test: every object gets additionalProperties: false, local $refs with sibling keywords are inlined, and the caller's schema is left untouched. The new test fails on main with KeyError: 'additionalProperties' and passes here, and the full suite passes (3699).
Signed-off-by: Yev Meyer <[email protected]>
What changed and why
Normalize JSON-schema response formats before UserSim sends evaluator calls to strict providers.
additionalProperties: false.$reftargets that also carry sibling constraints, preserving those siblings.This is now a focused two-file follow-up stacked on PR #15. The direct
TrajectoryEvaluatorRuntimeimplementation and tests were removed from this PR because #15 already contains them.How it was verified
uv run pytest tests/engine/core/test_llm.py tests/engine/evaluator/test_evaluator_runtime.py -q -o addopts=— 19 passeduv run ruff check src/usersim/engine/core/llm.py tests/engine/core/test_llm.py— passeduv run ruff format --check src/usersim/engine/core/llm.py tests/engine/core/test_llm.py— passedmake health-checkwas not run because this focused change does not modify a provider implementation.Results impact
Strict providers can accept nested evaluator schemas that they previously rejected. Evaluation axes and scoring semantics are unchanged.