Skip to content

0.9.0: integrations report unserved hits through a judge (label_method="judge") - #15

Merged
imxinchengyou merged 1 commit into
mainfrom
feat/integrations-report-rejected-hits
Nov 27, 2026
Merged

imxinchengyou merged 1 commit into
mainfrom
feat/integrations-report-rejected-hits

Conversation

@imxinchengyou

Copy link
Copy Markdown
Owner

What

  • VerifiedCache(judge=...) (LangChain): when a hit is rejected or audited and the model answers instead, the fresh answer is judged when LangChain stores it (update/aupdate), and the verdict is sent as feedback linked to that verdict. The report runs in a background thread with a bounded pending map, so it stays off the request path. Judge and report errors are logged, not raised. close() waits for queued reports.
  • CacheVerifierEvaluation.report_feedback (GPTCache) attaches the stored verification_id of the matching unserved hit (same query and cached answer) on its own.
  • feedback(label_method="human"|"judge") is added on both CacheVerifier and LocalVerifier. It is sent only when "judge", so existing requests are unchanged. The judge reporter always sends "judge".

Why label_method

The service (cacheverifier-service #168, deployed) trains on judge labels, but keeps them out of the audit risk bound, the audited CRC threshold and ACI until a judge can be validated. This means an audit answered only by the judge still counts as unreported; the README says so.

Testing

76 passed, 1 skipped; ruff and mypy are clean.

…nt as label_method="judge" (0.9.0)

- VerifiedCache (LangChain) takes judge=: rejected/audited hits are
  remembered, and when LangChain stores the fresh answer the judge's verdict
  is sent as feedback linked to the verdict, in a background thread.
- CacheVerifierEvaluation.report_feedback attaches the matching unserved
  hit's verification_id on its own.
- feedback() takes label_method ("human" default, sent only when "judge").
  Judge labels train fine-tunes; the service keeps them out of its
  certified numbers.
@imxinchengyou
imxinchengyou merged commit 7eff3a4 into main Nov 27, 2026
7 checks passed
@imxinchengyou
imxinchengyou deleted the feat/integrations-report-rejected-hits branch November 27, 2026 08:20
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