Skip to content
LakeSharkDocumentation
ANSWERSETS / DOCUMENTATION

Understand AnswerSet scoring

Interpret Knowledge match confidence, answer-quality scores, thresholds, missing scores, and scoring limits.

AnswerSets expose more than one signal about an answer. Knowledge routing confidence, answer quality, and learning proposal confidence describe different decisions. They must not be interpreted as interchangeable measurements of factual accuracy.

The score is computed using LakeShark’s deterministic, versioned scoring logic. Answer-quality scoring does not itself ask a second AI model to judge the result.

The three separate signals

Signal What it answers Where it is useful
Knowledge match / routing confidence How strongly does the question match eligible approved Knowledge? Decide whether to reuse Knowledge directly, or use provider fallback
Answer quality (answer_quality) Where an eligible approved reference exists, how closely does this response agree with it? Track agreement with approved examples and detect potential regressions
Learning proposal confidence How confident is a proposed configuration or Knowledge improvement? Decide whether a proposal may qualify for automatic approval under the configured learning policy

A routing score of 0.90 and an answer-quality score of 0.90 are not the same measurement. A learning confidence of 0.90 is not a substitute for either.

How Knowledge matching works

LakeShark examines eligible, approved Knowledge in the AnswerSet and determines whether a question is a sufficiently confident match.

The decision considers normalized wording, matching concepts, relevant approved answer context, differences that could change the intent, and whether competing Knowledge items support different answers.

Outcome What happens
Exact An unambiguous normalized question matches an approved Knowledge entry
Matched A non-exact match is sufficiently strong and distinct from competing answers to reuse Knowledge
Candidate A reference is usable for comparison but is not confident enough to return directly
Ambiguous Competing approved outcomes prevent a safe direct match or comparison
Unknown No eligible reference meets the applicable requirements

A direct Knowledge answer avoids the provider call for that resolution. A question that is not safe to answer directly can continue to provider fallback, subject to applicable AnswerSet rules and GovernanceSets.

In the API, routing evidence may include route_confidence, route_runner_up_confidence, route_margin, route_decision, and scoring_version. These explain why Knowledge was or was not reused. The route confidence is a matching signal, not a calibrated probability that the answer is true.

How answer quality is evaluated

Answer-quality scoring compares a result with a qualified reference from approved Knowledge. The scoring method depends on the AnswerSet output type.

Output type High-level comparison
Text Normalized language overlap and similarity, with safeguards for changed numbers, negations, and comparison terms
Number Numeric agreement rather than matching the text spelling of the number
Yes/No Boolean agreement
Single approved choice Agreement with the normalized choice
List of items Overlap between normalized items; reordering by itself does not reduce the score
JSON Structural comparison of keys and values, including nested data; object key order does not affect the result

The output is a value from 0.0 to 1.0. Higher values indicate stronger agreement with the eligible approved reference. The score is not a proof of real-world correctness, completeness, safety, or compliance. A reference can be outdated or wrong; source approval and continuous review remain necessary.

Why a known answer can score 1.0

A successfully reused approved Knowledge answer is recorded with score: 1.0 because it is the approved answer itself. This means consistent with the approved reference, not independently verified by a fact checker.

For provider-generated answers, quality scoring requires an eligible reference for the question and compatible configuration. If no trustworthy reference is available, LakeShark should not invent a quality score.

A missing score is not a failed score

score: null means the particular response was not independently comparable to eligible Knowledge under the current scoring policy. It does not mean 0.0 or that the answer was necessarily incorrect.

For example:

  • A provider answers a previously unseen question and there is no eligible ground truth: quality is unscored.
  • Two conflicting approved outcomes are equally plausible: direct reuse and reference-based quality scoring are withheld for that ambiguous match.
  • The provider response contradicts an eligible approved reference: an answer-quality score can be computed and may be low.
  • A direct approved Knowledge match is returned: the response records full agreement with its own approved reference.

When viewing averages, remember that the quality metric covers scored runs. It does not represent all responses, and its scored population can change as Knowledge coverage grows. Review score coverage alongside scores, source, and provider activity.

Thresholds, passes, and behavior

The default AnswerSet answer-quality threshold is 0.82 (on the 0.0 to 1.0 scale). It can be configured through AnswerSet scoring rules. If several valid answer_quality rules apply, the highest threshold is used.

For an eligible scored result, LakeShark exposes a comparison such as:

{
  "score_metric": "answer_quality",
  "score": 0.76,
  "score_threshold": 0.82,
  "score_passed": false
}

This example means the response is below the configured quality threshold. It does not by itself mean the system blocked or refused to return the provider answer. Runtime output contracts, strict-answer restrictions, and GovernanceSets are separate enforcement mechanisms.

For an unscored result, score and score_passed may be null. Do not interpret missing values as a pass or failure.

Knowledge match thresholds are separate from the answer-quality threshold. Changing the quality threshold does not automatically change which questions can be answered directly from Knowledge.

Learning auto-approval thresholds are also separate. An auto-approved proposal is not a statement that a generated answer scored above the AnswerSet’s quality threshold. Review learning and Auto Seed before enabling automatic promotions.

Diagnose an individual run

  1. Open the AnswerSet’s Test / Try it out area and ask a known question.
  2. Inspect the response source: approved Knowledge or provider fallback.
  3. Compare the routing decision and routing confidence with the reported answer-quality score.
  4. If score is null, check whether approved, nonconflicting Knowledge covers the intent.
  5. If the score is below the threshold, verify the approved reference, output format, relevant differences, and any stricter output rules.
  6. Review the AnswerSet’s Results and the workspace Dashboards for patterns. Keep source mix, coverage, and version changes in view.

Management clients can query GET /v1/answer-sets/{id}/runs and GET /v1/answer-sets/{id}/metrics through the Answers API. The Question API returns the resolved answer and applicable scoring metadata. Available evidence fields can vary by route and response type.

Transparency, versioning, and limitations

LakeShark documents what is measured, which references qualify, the direction of the scale, applicable thresholds, missing-score behavior, and how to investigate decisions. Exact weighting coefficients, normalization tables, and internal ranking implementation are not part of the public scoring contract.

A response may include a scoring_version. That allows scoring behavior changes to be identified over time; do not assume scores across different algorithm versions are perfectly comparable without validation.

Scoring is a decision-support signal, not a security boundary. Use explicit output validation, governance, independently verified source data, authorization, and human approval where the consequences require them. Keeping coefficients private must never be relied upon as protection against prompt injection, policy bypass, or fraudulent inputs.

For related workflows see Knowledge, Auto Seed and learning, GovernanceSets, and Dashboards.