Skip to content

API Reference parrot.security.groundedness.scorer

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.security.groundedness.scorer

View source

Deterministic groundedness scorer.

Classifies each answer atom against the turn's :class:EvidenceIndex (FEAT-398, spec §3 Module 2): exact normalized match -> supported; numeric match within a precision-aware tolerance (half a unit of the answer's last stated significant digit) -> supported; same-magnitude numeric outside that tolerance but within contradicted_band -> contradicted; otherwise -> unsupported.

Pure, synchronous, deterministic — no LLM, no network call.

Alias Atom

Re-exported from parrot.security.groundedness.models.Atom.

Alias AtomKind

Re-exported from parrot.security.groundedness.models.AtomKind.

Alias AtomVerdict

Re-exported from parrot.security.groundedness.policy.AtomVerdict.

Alias EvidenceIndex

Re-exported from parrot.security.groundedness.evidence.EvidenceIndex.

Alias GroundednessPolicy

Re-exported from parrot.security.groundedness.policy.GroundednessPolicy.

Alias GroundednessReport

Re-exported from parrot.security.groundedness.policy.GroundednessReport.

Class GroundednessScorer

Scores an answer's hard-data atoms against a turn's evidence.

Parameter Type Default Description
policy GroundednessPolicy | None None The scoring policy. Defaults to GroundednessPolicy().

Method GroundednessScorer.score

Score answer_text against evidence.

score(answer_text: str, evidence: EvidenceIndex) -> GroundednessReport

Parameter Type Default Description
answer_text str The agent's final answer text for this turn.
evidence EvidenceIndex The turn's :class:EvidenceIndex, built from ToolCall.result payloads.

Returns: GroundednessReport — The assembled :class:GroundednessReport.

Alias count_significant_digits

Re-exported from parrot.security.groundedness.normalize.count_significant_digits.

Alias extract_atoms

Re-exported from parrot.security.groundedness.extractors.extract_atoms.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally