Skip to content

Handle unexpected retrieved data with a null-only results schema - #47

Open
mkh-welsch wants to merge 1 commit into
ServiceNow:mainfrom
mkh-welsch:codex/nullable-response-normalization
Open

mkh-welsch wants to merge 1 commit into
ServiceNow:mainfrom
mkh-welsch:codex/nullable-response-normalization

Conversation

@mkh-welsch

@mkh-welsch mkh-welsch commented Oct 3, 2026 •

Copy link
Copy Markdown

A retrieval task with results_schema: {"type": "null"} crashes during evaluation when the actual response contains data: the evaluator passes it to the array normalizer, which rejects the null-only schema. Expected null already bypasses normalization correctly.

Preserve nonempty actual data for the existing retrieved_data_unexpected assertion so it produces a normal failed evaluation. Keep strict rejection of nonempty expected data and existing empty/missing-data behavior. No response schema, dataset, prompt, or status policy changes are included.

Validation on exact commit567fbcb4c039b22ff3e024786b679f0b2f669476:20synthetic parametrized tests passed using Python3.12.13/pydantic2.12.0 and isolated uv.lock-pinned test dependencies. Cases cover valid null, empty/missing data, unexpected values including zero and false, wrong status, invalid expected data, and ordinary array normalization. Existing evaluator environment unchanged. git diff --check passed. No historical benchmark response or evaluation changed or rescored.

@mkh-welsch
mkh-welsch marked this pull request as ready for review October 3, 2026 07:35

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