Skip to content

Add opt-in Unicode character facts for Tier 3 judges - #242

Merged
rng1995 merged 8 commits into
NVIDIA:mainfrom
mavericksea-ai:feat/judge-character-facts
Oct 30, 2026
Merged

rng1995 merged 8 commits into
NVIDIA:mainfrom
mavericksea-ai:feat/judge-character-facts

Conversation

@mavericksea-ai

@mavericksea-ai mavericksea-ai commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

An LLM judge can confuse U+00A0 with an ordinary space even when that distinction decides whether an answer is correct. This follows #241, found while maintaining Driftproof.

Add the operator-controlled, opt-in SKILL_EVAL_JUDGE_CHARACTER_FACTS=1 setting for the accuracy, goal-accuracy, and behavior-check judges. Both the Python implementation and the standalone Harbor verifier append bounded character metadata outside the original evidence: code points, Unicode names, positions, and ASCII-escaped context for non-ASCII whitespace and format characters. Existing prompts remain unchanged when the setting is unset. The helper is bundled with staged verifiers, and the setting is forwarded only to standard verifier jobs and recorded in run_config.json.

Enabling the option selects the prompt-based goal judge, which can include this metadata, in place of the optional RAGAS route. Documentation explains this comparison consideration, the additional prompt tokens, coordinate semantics, and detection limits. Character presence does not itself imply incorrectness. This does not normalize evidence or guarantee correct model judgments; executable checks remain preferable for requirements they can verify.

Verification

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests
  • Updated documentation for user-visible changes
  • Ran make lint
  • Ran make test
  • Ran make build
  • Did not add credentials, private datasets, or proprietary benchmark content

Validation uses Python 3.12.14 and uv sync --all-extras --locked, matching CI's dependency selection. The standard serial make test PYTHON=.venv/bin/python passed: 14,634 passed, 23 skipped, 9 deselected by the repository's default configuration. There are 61 new focused test cases, plus expanded existing forwarding and isolation matrices. They cover exact character identity, bounded output, unchanged evidence/default prompts, both judge implementations, compacted evidence coordinates, standalone helper packaging, operator-only forwarding, and rejection of skill-authored overrides.

make lint, source/wheel builds, and fern check passed. Fern reports its existing unauthenticated redirect-audit warning; the local config/link check has zero errors.

Eight live checks on the initial implementation (b0faf3f) used the correct and incorrect NBSP fixtures with Claude Sonnet 5.5 and Haiku 5.5, fresh contexts, and opaque random case directories. All eight returned the expected achieved judgment. The host API returned the expected 0/1 scores in all four cases. The staged verifier returned 0.95 and 0.90 for the correct answers and 0.02 for both incorrect answers; its scores are continuous, so these are not described as exact 0/1 results. Requests used a local OpenAI-compatible bridge to authenticated Claude Code. No verdicts were mocked. This does not test native vendor API behavior or an entire Docker/Harbor agent workload, and does not establish real-world prevalence.

Review fix 2c7c219 adds 23 regression cases for numeric, nullable, boolean, and container fields, prompt-formatting semantics, both judge implementations, and JSON/YAML loading through native verifier reward production. An independent session passed 78 focused tests and exercised 32 isolated executions of the copied standalone verifier with fixed HTTP responses. It reproduced 10 failures with the original helper, verified unchanged default-off results, and verified unchanged reward artifacts when metadata was enabled. These are deterministic integration checks, not additional live-model measurements.

Addresses #241.

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

Additional evidence and limits — 28 October 2026

The follow-up in #241 shows that character facts can correct false goal judgments and change native verifier scores on one NBSP task. That pilot used the unchanged v0.6.0 verifier with a separate facts intervention, so it is not additional validation of this PR’s implementation.

The setting remains default-off. Further validation should include correct-answer controls, repeated judgments, legitimate Unicode, and actual tool-using Harbor jobs. Numeric scores, achieved flags, and malformed responses should be reported separately.

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Automated review: 1 findings (0 P1, 0 P2, 1 P3); 1 posted inline.

Reviewed at b0faf3f. The opt-in flag follows the existing judge-env pattern: it reaches the verifier and the host judges, and it stays out of the agent runtime env and custom_only grading. tests/test_character_facts.py, the runner environment and skill isolation tests, and the tier3 judge tests all pass (1249 passed, 2 skipped). One comment below.

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for this contribution, @mavericksea-ai. Opt-in character facts give the Tier 3 judges a reliable way to see invisible and non-ASCII whitespace characters, and the feature stays off by default. You also turned the review finding around quickly, with a precise fix and solid regression coverage across the host and verifier judges.

Approving at e3521ab. The earlier finding is fixed and verified, and I found nothing new.

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Reviewed at 55ab899.

Verified locally:

  • Default off: with the setting unset, 0, off, or false, none of the three judges get a facts panel. Only 1/true/yes/on (trimmed, any case) turn it on.
  • Host/Harbor parity: with the setting on, llm_judge.py and the standalone eval.py append identical facts for accuracy, goal accuracy, and behavior check, including a numeric ground_truth. The Harbor goal judge skips the RAGAS route, as documented.
  • Forwarding follows the existing LLM_JUDGE_FALLBACK_MODELS pattern: verifier job layer only, stripped from the agent runtime env, dropped for custom_only, and rejected as a task-authored override.
  • Output stays bounded: 400k characters of CJK text with 200k U+3000 produce about 5.8 KB of facts in 0.04 s.
  • tests/test_character_facts.py, the runner-environment and skill-isolation tests, and tests/tier3 pass (6546 passed). ruff check is clean.

Two optional nits inline.

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-reviewed the full PR and all review discussions on the latest merged head. The numeric/nullable-field fix matches prompt formatting; unnamed controls now display (U+0085 verified directly). Main 935b162 was merged with both CHANGELOG additions retained. The optional prompt-position suggestion is documented in its thread without changing the established append behavior.

Validation: 255 focused character-facts/numeric/verifier/judge tests and 30 exact environment-forwarding/isolation tests passed; Ruff and wheel/sdist builds passed. The broader full-suite attempt was interrupted rather than reported green. Its two provider-configuration failures and Unix-socket sandbox failure reproduced unchanged on main; the external-policy alias golden failure passed isolated on both main and this branch. Initial shared-environment Harbor collection errors were resolved by using a private pinned Harbor 0.24.0/LiteLLM 1.93.2 environment. No additional live-model calls were made.

Approval is anchored to de591f9. All three inline threads are addressed. Platform CI is separate from this code approval.

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the conflict resolution at 515df6b against current main 618fc0f. The changelog retains both the Unicode-facts release note and the upstream reporting additions. The merged verifier preserves opt-in/default-off behavior, operator-only forwarding, numeric-field rendering, the unnamed-control fallback, and upstream shared-check staging/adapters.

Validation: all 176 focused character-facts, judge-artifact, and shared-adapter cases passed across the initial run and the corrected-PATH rerun of 13 generated custom-grader cases. Four local HTTP protocol cases passed with loopback binding allowed. Ruff and source/wheel builds passed. Isolated staged-verifier smoke checks passed on Python 3.9.6 and 3.12.13. An independent review of the merge resolution found no issues. GitHub reports this head mergeable.

@rng1995
rng1995 enabled auto-merge October 30, 2026 06:15
@rng1995
rng1995 merged commit 4227299 into NVIDIA:main Oct 30, 2026
20 checks passed
chrisknvidia pushed a commit that referenced this pull request Oct 30, 2026
* Add opt-in Unicode character facts for Tier 3 judges
* fix(tier3): preserve non-string judge evidence with character facts

Signed-off-by: mavericksea-ai <[email protected]>
chrisknvidia pushed a commit that referenced this pull request Oct 30, 2026
* fix(tier3): identify unnamed Unicode controls in judge facts

Signed-off-by: Narendran Raghavan <[email protected]>
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