# Should AI highlight the parts of its output it's unsure about?

Yes, if the highlights mark what's likely wrong: highlighting likely-to-be-edited code sped people up, but highlighting raw low-probability tokens didn't help.

Evidence: Moderate (Promising, test it with your users) · LLM fit: Medium (Tested in lab or early LLM studies, likely carries over) (https://aiuxevidence.com/how-we-rate)
One small controlled study and two crowd experiments with LLM tools.

## Design it like this

Highlight the specific parts most likely to need fixing, not raw token probabilities.

- Base highlights on what users are likely to change, not generation probability. [from the study]
- Keep highlights granular, informative and not overwhelming. [from the study]
- Use confidence colour-coding on uncertain facts in answers. [from the study]
- Explain what a highlight means on hover. [our reading]

## What they found

### Vasconcelos et al. (2024), experiment

Mixed-methods study with 30 programmers comparing code completions with no highlighting, highlighting the lowest-probability tokens, or highlighting tokens most likely to be edited. Highlighting likely-to-be-edited tokens led to faster task completion and more targeted edits and was preferred; highlighting by generation probability gave no benefit over no highlighting.

> “highlighting tokens according to their probability of being generated does not provide any benefit over the baseline with no highlighting” (Abstract)

### Spatharioti et al. (2023), experiment

Two online experiments (90 and 120 MTurk participants) on product-comparison decisions, randomly using an LLM-based search tool or traditional search. LLM users finished faster with fewer but more complex queries and were more satisfied, with similar accuracy when the LLM was right, but they over-relied on it when it erred. In experiment 2, colour-coded confidence highlighting substantially increased how often people spotted incorrect information.

> “this confidence-based highlighting substantially increases the rate at which users spot incorrect information, improving the accuracy of their overall decisions while leaving most other measures unaffected” (Abstract)

## Trade-offs and when it doesn't apply

- 30 programmers in one study.
- Building an edit-likelihood model takes data.
- Too many highlights become noise.

## What it looks like

- Do: Two lines of generated code underlined “likely needs editing”.
- Don't: Every low-probability token tinted, covering half the code.

## How to check it in your product

Compare time-to-correct and missed errors with and without highlighting.

## Open questions

- What signal best predicts errors in prose rather than code?
- How many highlights per answer is too many?
- Do highlights reduce checking of unhighlighted parts?

## FAQ

### Does highlighting low-probability tokens help programmers?

No. Vasconcelos et al. (30 programmers) found it gave no benefit over no highlighting.

### What kind of highlighting helps?

Highlighting tokens most likely to be edited led to faster completion and more targeted edits.

## Related questions

- [Do hallucination warnings help users spot AI errors?](https://aiuxevidence.com/e/hallucination-warnings)
- [How should AI show confidence or uncertainty to users?](https://aiuxevidence.com/e/show-confidence)
- [Do inline AI suggestions like Copilot cost users time?](https://aiuxevidence.com/e/inline-suggestions)

## Sources

1. Helena Vasconcelos, Gagan Bansal, Adam Fourney, Q. Vera Liao, Jennifer Wortman Vaughan (2024). Generation Probabilities Are Not Enough: Uncertainty Highlighting in AI Code Completions. ACM TOCHI (preprint, arXiv:2302.07248v3, Nov 2024). https://doi.org/10.1145/3702320
2. Sofia Eleni Spatharioti, David M. Rothschild, Daniel G. Goldstein, Jake M. Hofman (2023). Comparing Traditional and LLM-based Search for Consumer Choice: A Randomized Experiment. arXiv:2307.03744v2 (Nov 2023). https://arxiv.org/abs/2307.03744

Canonical: https://aiuxevidence.com/e/highlight-uncertainty
