Recursive self-verification that catches hallucinations before your users do.
They generate highly plausible but factually incorrect statements with complete confidence.
We force the model into an isolated, recursive interrogation loop to detect mathematical instability in its own logic.
Varity was recently benchmarked against a rigorous dataset of common AI hallucinations, historical misconceptions, and scientific myths.
| Statement | Expected | Varity Result |
|---|---|---|
| India got its independence in 1998. | hallucination | [OK] Flagged |
| The Great Wall of China can be visible from space. | hallucination | [OK] Flagged |
| Einstein won the Nobel Prize for Relativity. | hallucination | [OK] Flagged |
| Water boils at 100 degrees Celsius at sea level. | factual | [OK] Verified |
* Tested via varity.checker.Varity on openai/gpt-4o-mini
from varity import Varity
v = Varity(provider="anthropic", api_key="your-key")
result = v.check(
prompt="When was the Eiffel Tower built?",
response="The Eiffel Tower was built in 1887."
)
# Shows the wrong date flagged via VSS flip detection
print(result.flagged_claims)
# Auto-corrected string strictly constrained to verified facts
print(result.corrected_response) # "The Eiffel Tower was built in 1889."
import { Varity } from "varity";
const v = new Varity({ provider: "anthropic", apiKey: "your-key" });
const result = await v.check(prompt, response);
console.log(result.flaggedClaims);
varity check --prompt "..." --response "..." --provider anthropic --key sk-...
Claims that constantly flip verdicts across recursive depth interrogations fall cleanly to the left. Claims that resolutely maintain their boolean state aggregate to the right.
Goes much deeper than surface semantic checks. Varity actively forces the LLM to verify its own verification until stability is achieved.
Your key, your cost, your control. Works natively natively with Claude, GPT, and Gemini API standard endpoints. No middle-man routers.
100% MIT Licensed. No proprietary SaaS servers to pay for. Running it against Gemini's free tier costs literally $0.