gitwtfhub

wtf is hallucinatoff?

ojki74/hallucinatoff — explained in plain English

Analysis updated 2026-07-25

5PythonAudience · developerComplexity · 3/5Setup · moderate

TL;DR

A Python middleware that checks AI chatbot responses for hallucinations before they reach the user. It uses eight different checks to decide whether to pass the response through, add a warning, rewrite it, or block it entirely.

Mindmap

mindmap
  root((repo))
    What it does
      Intercepts AI responses
      Eight structural checks
      Picks from eight actions
    How it works
      Omega metric scoring
      Operative action matrix
      Tracks multi-turn drift
    Tech stack
      Python
      Middleware layer
    Use cases
      Safer chatbot responses
      Hallucination benchmarks
      Conversation drift detection
    Status
      20-case benchmark
      Meta-observer unfinished
      Contributions invited

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Add a safety layer to an existing chatbot to catch hallucinated responses before users see them.

REASON 2

Run the included 20-case benchmark to evaluate how well the system detects constructed hallucination scenarios.

REASON 3

Detect when a multi-turn conversation has drifted away from its original topic.

REASON 4

Extend the framework by implementing the unfinished second-order meta-observer component.

What's in the stack?

Python

How it stacks up

ojki74/hallucinatoff1ncendium/aibusteraaronmayeux/ha-hurricane-tracker
Stars555
LanguagePythonPythonPython
Setup difficultymoderatemoderateeasy
Complexity3/53/52/5
Audiencedeveloperops devopsgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires an existing large language model setup to sit between, the middleware needs to be wired into your LLM's response pipeline.

Wtf does this do

HALLUCINATIOFF is a Python middleware layer that sits between a large language model and the person using it. Instead of retraining or modifying the model itself, it inspects each candidate response before it reaches the user and decides what to do with it. The possible actions include emitting the response as-is, emitting it with a caution, reformulating it, asking for more context, reducing its intensity, referring it elsewhere, pausing, or blocking it entirely. The project's distinguishing idea is what it calls second-order observation. Most safeguarding systems check whether a response is coherent on a first pass. HALLUCINATIOFF attempts to go further: it watches whether the coherence criterion itself is becoming unstable over time. The framework originates from a clinical body-based practice called SIIPP, developed by the author, who is a psychologist rather than a machine learning engineer. Under the hood, the system runs eight structural readings on each candidate response: contextual sufficiency, internal coherence, external verifiability, entry ambiguity, uncertainty level, response risk, semantic drift, and premise interrogation. These readings feed into a metric called Omega, which an operative matrix then maps to one of the eight possible actions. The drift detection works across multi-turn conversations, so the system can flag when a discussion has wandered off its original topic. The project includes a benchmark of 20 synthetic cases with six readings, achieving 95% accuracy. The single failure involved a factual error where external verifiability scored falsely high, causing the system to emit a response that should have carried a caution. The author is clear that this benchmark validates the architecture on constructed cases but does not prove production readiness. Several pieces remain unfinished. The second-order meta-observer, which would track variance in the system's own coherence judgments over time, is specified but not yet implemented. The project needs real multi-turn conversational data where drift occurs naturally, along with mathematical formalization of phase coupling and attractor concepts from system dynamics. The author invites contributions from anyone who can help with these three gaps.

Yoink these prompts

Prompt 1
I want to add a hallucination safety layer to my Python chatbot. How do I integrate HALLUCINATIOFF as middleware between my LLM and the user so it can intercept and evaluate each response?
Prompt 2
Help me understand the eight structural readings in HALLUCINATIOFF (contextual sufficiency, internal coherence, external verifiability, etc.) and how the Omega metric maps each one to an action like emit, caution, reformulate, or block.
Prompt 3
I want to contribute to HALLUCINATIOFF. Help me get started on implementing the second-order meta-observer that tracks variance in the system's coherence judgments over time.
Prompt 4
How can I run the HALLUCINATIOFF benchmark with its 20 synthetic test cases and interpret the accuracy results and the known failure modes?

Frequently asked questions

wtf is hallucinatoff?

A Python middleware that checks AI chatbot responses for hallucinations before they reach the user. It uses eight different checks to decide whether to pass the response through, add a warning, rewrite it, or block it entirely.

What language is hallucinatoff written in?

Mainly Python. The stack also includes Python.

How hard is hallucinatoff to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is hallucinatoff for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.