|
Continuum C++ API
Unified runtime for token + tensor execution
|
#include <hit_verifier.hpp>
Classes | |
| struct | Verdict |
Public Member Functions | |
| bool | verify (const std::string &cached_prompt, const std::string &new_prompt, float similarity) const override |
| True to serve the cached answer, false to treat the lookup as a miss. | |
| std::string | name () const override |
| Stable name, for metrics and logs. | |
Public Member Functions inherited from continuum::runtime::HitVerifier | |
| virtual | ~HitVerifier ()=default |
Static Public Member Functions | |
| static Verdict | explain (const std::string &cached_prompt, const std::string &new_prompt) |
Default verifier: rejects candidates that are a minimal edit of the cached prompt, the signature of a near-miss, while letting rewordings through.
Prompts are lowercased and tokenized; stopwords are dropped and simple suffixes normalized. The candidate is rejected when:
It is conservative by design: a reworded paraphrase that happens to differ by a single synonym swap ("cancel" vs "end") is also rejected, costing a cache miss rather than serving a wrong answer. Measured in benchmarks/reports/semantic-false-hits.md.
|
static |
|
inlineoverridevirtual |
Stable name, for metrics and logs.
Implements continuum::runtime::HitVerifier.
|
overridevirtual |
True to serve the cached answer, false to treat the lookup as a miss.
Implements continuum::runtime::HitVerifier.