Prodular UI

AI

ConfidenceAIPro

How sure the model is about an output, as a three bar meter and a label, with the reason in a hover card.

npx prodular-ui add confidence

Part of Prodular UI Pro. Preview and read the docs freely, install with a license. See pricing

Extracted fields

Next to each value the model extracted. Hover or focus a meter to read why.

INV-88412.pdf

ExtractedHover a meter to see why
Vendor
Lumen Cloud Services
High confidence 97%
Amount
$12,480.00
High confidence 94%
Due date
November 14, 2026
Medium confidence 68%
GL account
6120 Cloud hosting
Low confidence 41%

Levels

Pass a level, or a value from 0 to 1. Use hideLabel in dense tables.

High confidenceMedium confidenceLow confidence
High confidence 92%Medium confidence, 61%Low confidence 34%

Anatomy

<Confidence  level="high"  explanation="Based on 3 matching invoices from the same sender."/>

Guidance

Use it when

  • Use it next to values the model extracted, classified or predicted, where a person decides whether to trust them.
  • Explain the confidence in one sentence with the evidence: Based on 3 matching invoices.
  • Use low confidence to route people to review, for example a Review low confidence fields action.

Avoid

  • Showing confidence on every sentence of generated prose. It is for discrete outputs.
  • Exact percentages that are not calibrated. Pass a level instead of a value when the score is not meaningful.
  • Color alone. The label or the accessible name always says the level.

Rules for AI agents

Published in llms-full.txt and the registry, so coding agents follow them when they build with this component.

  • Always pass explanation with the concrete evidence behind the score. A confidence without a reason is not useful.
  • Pass level when the model returns a category, or value (0 to 1) when it returns a calibrated score. Defaults: 0.8 and above is high, 0.5 and above is medium.
  • Use hideLabel only where the column header already says Confidence. The accessible label is kept.
  • Never auto apply a low confidence output. Ask for review.

API

Confidence

PropTypeDefaultDescription
level"high" | "medium" | "low"Exposed as data-level.
valuenumberScore from 0 to 1. Derives the level when level is not set and shows a percentage.
explanationReactNodeWhy. A string renders in ConfidenceExplanation inside a hover card.
hideLabelbooleanfalseShow the meter only.

ConfidenceExplanation

PropTypeDefaultDescription
titleReactNodeReplaces the level as the heading of the hover card.