Repository navigation
0.9.0: integrations report unserved hits through a judge (label_method="judge") - #15
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 storedverification_idof the matching unserved hit (same query and cached answer) on its own.feedback(label_method="human"|"judge")is added on bothCacheVerifierandLocalVerifier. It is sent only when"judge", so existing requests are unchanged. The judge reporter always sends"judge".Why
label_methodThe 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.