Lion Cipher Lab

Auto-score the faithfulness of an LLM's security summary with an NLI model — and gate the hallucinations

Why it matters

Analysts are already pasting incident logs, threat reports, and packet captures into an LLM and asking for a summary, because reading the raw artifact is slow and the summary is fast and fluent. The danger is that fluency and truth are unrelated: a large language model (LLM) is a system trained to produce text that READS well, and it will state a claim the source never supports — the wrong host as patient zero, an exfiltration that never happened, a CVE that was never mentioned — with exactly the same confident tone as the claims that are correct. That is a HALLUCINATION, and in security work…

What you'll learn

Steps in this lab

  1. The problem: an LLM summary can be fluent and false at the same time
  2. Set up a free, local NLI environment and the synthetic corpus
  3. Load the NLI model and score one claim — and never hardcode the label order
  4. Retrieval: score each claim against the RIGHT source line, not the whole blob
  5. Build the fail-closed hallucination gate
  6. MEASURE it: precision, recall, and the threshold tradeoff
  7. The named failure modes — where an NLI faithfulness gate goes wrong
  8. Where the gate fits — and where it must stop
  9. The way a pro does it — and what you actually built

Open the full interactive lab →