Skip to content

fix(graders): guard judge against unverifiable SDK-shape claims#126

Open
frederikprijck wants to merge 1 commit into
mainfrom
fix/judge-prompt-hallucination-guard
Open

fix(graders): guard judge against unverifiable SDK-shape claims#126
frederikprijck wants to merge 1 commit into
mainfrom
fix/judge-prompt-hallucination-guard

Conversation

@frederikprijck

Copy link
Copy Markdown
Member

What

Hardens the shared LLM-judge system prompt (packages/evals-core/src/graders/prompts/default.md) so the judge stops failing correct code over SDK-shape claims it cannot verify from the code in front of it.

Why

The judge produced false negatives by asserting, from stale/incorrect model memory, that valid code was broken. Two confirmed cases from the latest matrix:

  • fastapi: judge claimed from fastapi_plugin import Auth0FastAPI "would cause an ImportError." Verified against auth0-fastapi-api==1.0.0b7: fastapi_plugin is the correct public import; auth0_fastapi_api (what the judge said was right) does not exist. The agent's own runtime import main succeeded in the trace.
  • nuxt: judge called useAuth0, getSession, and { accessToken } destructuring "invented." Verified against @auth0/auth0-nuxt@1.1.0: all three are real (useAuth0(event): Auth0Client, getSession(): Promise<SessionData | undefined>, getAccessToken(): Promise<TokenSet> where TokenSet.accessToken: string).

These verdicts sank otherwise-correct runs (fastapi 84.2 was the only sub-85 run in the matrix, driven partly by these two judge failures).

Change

Adds guidance to default.md instructing the judge to grade only what the code shows and not to assert an import path is wrong, that a package exposes a symbol under a different module name, or that a signature is invalid unless the code itself contradicts the question — because a package's public import surface often differs from its internal module name.

default.md is the source for prompts.generated.ts (gitignored, regenerated on build via scripts/generate-prompts.mjs).

Verification

  • npm run build ✓ (5/5 packages)
  • npm test ✓ (all tasks; 484 tests in evals-core)
  • npm run lint ✓ / npm run format ✓ (unchanged)

Notes

Companion to fix/quickstart-env-prompt-wording (#125), which addresses the separate hardcoded-secret failures. Independent — either can merge first.

The LLM judge was producing false negatives by asserting, from stale
model memory, that valid code was broken — e.g. claiming
'from fastapi_plugin import Auth0FastAPI' would raise ImportError (it is
the correct public import for auth0-fastapi-api, verified against 1.0.0b7),
and calling useAuth0/getSession/{ accessToken } 'invented' when all three
are real in @auth0/auth0-nuxt 1.1.0. These sank otherwise-correct runs.

Instruct the judge to grade only what the code shows and not to fail code
over import-path, module-name, or method-signature claims it cannot verify
from the code in front of it, since a package's public import surface often
differs from its internal module name.

default.md feeds prompts.generated.ts (gitignored, rebuilt on build).
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@frederikprijck, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 72e2f86e-cc3d-4e1f-b08d-b1ec4d9e5292

📥 Commits

Reviewing files that changed from the base of the PR and between 3e91dfe and d68fa34.

📒 Files selected for processing (1)
  • packages/evals-core/src/graders/prompts/default.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/judge-prompt-hallucination-guard

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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