Back to notes
The Tesseract MemoryTechnical note

Checking what an AI answer says, not just what retrieval found

AI Core scores passages for relevance, then checks individual statements and quiz answers against them before returning support decisions to Laravel.

Topics

A relevant passage can still disagree with a claim

The reranker starts with the retrieval, vector and lexical scores supplied by Laravel. It adds phrase and keyword matches, titles, source type and query intent, then removes duplicates, can cap repeated results from one lesson and returns ranking details. It doesn't load an embedding model.

Verification asks a different question: does the selected material support what the answer actually says? Claim extraction separates the assistant's lead, list items and closing text. For a study pack, it separates the takeaway, must-know points, quiz explanations and correct answers.

The scorer combines keyword overlap with stemmed-token overlap, character trigrams and sentence comparisons. It also checks details such as numbers, dates, names, quoted text, sequence and negation. The component named semantic similarity is built from these heuristics, not a neural entailment model.

Return enough detail for the caller to act

Thresholds and conflict penalties produce a status, scores and supporting chunk IDs for each unit. The assistant verifier can keep supported units, prune others or report weak support. Study-pack verification also checks that enough required material is supported, including both a quiz explanation and its correct option.

A weak-support response can still contain the original lead text. Laravel therefore reads the outcome, not just the text field: it can substitute review suggestions and checks citations against the support map before constructing the learner response.

Skip modes remain explicit. Tests cover selected ranking and unsupported-answer cases, not a general accuracy rate. Even a correctly matched claim only establishes agreement with the supplied material; it doesn't prove the source itself is true.

From retrieved chunks to a supported answer

Ranking selects evidence candidates; verification checks generated claims, and Laravel decides what reaches the learner.

Direct callResponse / return
Evidence selection
Python support checks
Laravel output policy

Scroll or drag the background to move. Use the zoom buttons to resize.Arrow keys move between components. Enter selects.

Choose a component to explore

Select a numbered component on the map or use the component menu. Its details and connections will appear here.

No component selected.

All connections (7)
  1. 01 · Scoped current chunks02 · Weighted rerankerSelect retrieval candidates · Direct call
  2. 02 · Weighted reranker03 · Structured generated answerUse retained evidence · Direct call
  3. 03 · Structured generated answer04 · Extract claim unitsSend structured output · Direct call
  4. 04 · Extract claim units05 · Score support and detail conflictsEvaluate units · Direct call
  5. 01 · Scoped current chunks05 · Score support and detail conflictsSupply source text · Direct call
  6. 05 · Score support and detail conflicts06 · Return outcome and source mapCollect decisions · Direct call
  7. 06 · Return outcome and source map07 · Apply citation and response policyInterpret, do not blindly display · Response / return