ns-ui
Hand-hatched underlines under low-confidence tokens, stroke density mapping straight to logprob doubt in three buckets, with a hover/focus popover naming what the model almost said instead.
Use when the doubt on display is the model's own token-level uncertainty from a single generation's logprobs, and the useful detail is what it almost said instead, so hatch density under a token maps to its bucket and a popover names the alternatives; pick citation-grounding-hatch instead when the question is whether a retrieved source backs the sentence, which is a different failure from the model being unsure of a word.
Install
npx shadcn add https://design.helpmarq.com /r/confidence-logprob-hatch.jsonGenerated reply · per-token confidence
According to the shipping manifest, the package left the warehouse on March 12 with a declared weight of 42.6 kg, and was signed for on receipt by Dana Whitfield†.
Hover or focus a hatched word to see what the model almost said instead. Selecting an alternative rewrites the word in place and clears its marks.
| Prop | Type | Default | Description |
|---|---|---|---|
| segments | PencilHedgeSegment[] | — | Prose as an ordered mix of plain strings (confident text, rendered verbatim) and DoubtToken objects (hatched spans). |
| daggerOnHighestDoubt? | boolean | — | Appends a decorative, aria-hidden superscript dagger to the highest-doubt bucket. Default false. |
| verbose? | boolean | — | Opts this passage into verbose screen-reader descriptions (names alternatives + percentages). Default false — the terse form. |
| className? | string | — | — |