The usual way to catch a hallucination is to pay for more model calls: RAGAS faithfulness asks an LLM to check each claim (docs), and SelfCheckGPT samples the answer again and compares (paper). The model already reported how sure it was about every token, and most apps never ask: in OpenAI's Chat Completions API, logprobs is off unless you turn it on (API reference). This tool reads those logprobs and shows which words of an AI answer to double-check, with no second LLM call: 9.0 ms for a 4,000-token answer.
- Reads the model's own token logprobs.
- Highlights the words it was unsure about.
- Shows what it almost said instead.
- Outputs terminal, HTML, Markdown or JSON.
- Fails CI with
--fail-on-flag.
cargo install --locked llm-token-visualizerNo Rust? Download for Windows (.exe).
llm-token-visualizer --logprobs-file answer.json --threshold 0.6Reference · docs.rs · Site · Releases
License: MIT, see LICENSE.
More: docs/DETAILS.md