Documentation
¶
Overview ¶
Package grounding is the harness's free, deterministic quality check: did the model invent values not present in the source? No inference, sub-millisecond string ops. It is the keystone label generator for the self-learning loop (conformal calibration, health monitoring, router training all train on it).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
Check reports whether structured output is grounded in the source input. ok=false means grounding does not apply (classify/triage are grammar-pinned to a label set, nothing to verify; or the output has no checkable values).
- extract: every leaf string/number value must appear in the source (extraction is verbatim — a value not in the source is a hallucination).
- summarize: every NUMBER in the summary must appear in the source (the clearest invented-fact signal; entity paraphrasing is intentionally not flagged to avoid false positives).
The pipeline ACTS on a false result only for extract (retry/escalate); for summarize it is logged as a quality signal but not actioned.
func CheckFields ¶
CheckFields is the per-field variant of Check for extract: it returns the list of TOP-LEVEL field names whose value is not grounded in the source. ok=false means grounding does not apply (non-extract task). Nested values are attributed to their top-level key. Used to name offenders in a targeted corrective re-prompt (lightweight atomic-claim verification).
Types ¶
This section is empty.