Skip to content

API Reference parrot.eval.evaluators.groundedness

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

parrot.eval.evaluators.groundedness

View source

GroundednessMetric — offline FEAT-398 scoring over a Trajectory (FEAT-652, Module 3).

Alias EvalTask

Re-exported from parrot.eval.models.EvalTask.

Alias EvidenceIndex

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

Class GroundednessMetric

Score final-output hard facts against recorded tool-call evidence.

no_evidence and no_factual_content reports are neutral. Otherwise, a result passes only when it meets min_score and, by default, has no contradicted atoms.

Parameter Type Default Description
policy GroundednessPolicy | None None Evidence extraction and groundedness scoring policy.
min_score float 0.8 Minimum non-neutral groundedness score that passes.
fail_on_contradicted bool True Whether any contradicted atom fails a score.

Method GroundednessMetric.score

Score the persisted trajectory output against its tool evidence.

score(task: EvalTask, trajectory: Trajectory, sandbox: Sandbox | None = None) -> MetricScore

Parameter Type Default Description
task EvalTask Evaluation task that supplies the original user prompt.
trajectory Trajectory Persisted rollout to score offline.
sandbox Sandbox | None None Unused live sandbox, accepted for the metric contract.

Returns: MetricScore — A groundedness metric score, or a non-fatal failure score.

Alias GroundednessPolicy

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

Alias GroundednessReport

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

Alias GroundednessScorer

Re-exported from parrot.security.groundedness.GroundednessScorer.

Alias Metric

Re-exported from parrot.eval.evaluators.base.Metric.

Alias MetricScore

Re-exported from parrot.eval.models.MetricScore.

Alias Sandbox

Re-exported from parrot.eval.sandbox.base.Sandbox.

Alias ToolCall

Re-exported from parrot.models.basic.ToolCall.

Alias Trajectory

Re-exported from parrot.eval.models.Trajectory.

Attribute logger

Alias register_metric

Re-exported from parrot.eval.registry.register_metric.

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