|
Continuum C++ API
Unified runtime for token + tensor execution
|
#include <hit_verifier.hpp>
Public Member Functions | |
| virtual | ~HitVerifier ()=default |
| virtual bool | verify (const std::string &cached_prompt, const std::string &new_prompt, float similarity) const =0 |
| True to serve the cached answer, false to treat the lookup as a miss. | |
| virtual std::string | name () const =0 |
| Stable name, for metrics and logs. | |
Second-stage check on a semantic-cache candidate: is it safe to serve the answer cached for cached_prompt to new_prompt?
Embedding similarity measures topical closeness, not "has the same
answer": near-miss edits ("enable" vs "disable", "Australia" vs "Austria", "5" vs "50") score as high as paraphrases. A verifier runs only on candidates that already cleared the similarity threshold. Implement it in C++ or subclass continuum._native.HitVerifier in Python (e.g. an LLM judge).
|
virtualdefault |
|
pure virtual |
Stable name, for metrics and logs.
Implemented in continuum::runtime::LexicalNearMissVerifier.
|
pure virtual |
True to serve the cached answer, false to treat the lookup as a miss.
Implemented in continuum::runtime::LexicalNearMissVerifier.