Output verification for the Reactive Agents framework.
Reduces hallucinations by measuring semantic entropy (consistency across multiple samples) and decomposing claims into verifiable facts.
bun add @reactive-agents/verification| Technique | How it works |
|---|---|
| Semantic entropy | Samples the LLM N times; high variance → low confidence |
| Fact decomposition | Breaks output into atomic claims, checks each independently |
import { ReactiveAgents } from "reactive-agents";
const agent = await ReactiveAgents.create()
.withName("fact-checker")
.withProvider("anthropic")
.withVerification()
.build();
const result = await agent.run("What year did the Berlin Wall fall?");
console.log(result.metadata.confidence); // 0.0–1.0When confidence is below the threshold, the agent can re-sample or escalate to the user depending on the active interaction mode.
Full documentation at docs.reactiveagents.dev