AI Agent Hub
Back to skills
Anti-Hallucination v2 Cognitive Sandbox icon

Anti-Hallucination v2 Cognitive Sandbox

AI Agent Updated 2026.08.29

Paste the following prompt into your AI chat to install this skill:

Please follow https://skillhub.cn/install/skillhub.md to install @user_0ecf7c29/anti-hallucination-v2.

About this skill

Problem

In research writing and code generation, the main risk is not total ignorance. The model can present unverified APIs, citations, dates, or facts as certain. In long sessions, one unchecked error can propagate into later conclusions, while generic disclaimers leave no auditable trail.

How It Works

The skill turns hallucination control into an operational workflow:

  • Before output, query the cognitive sandbox with verify_fact.py query against verified_knowledge.json; if a fact is verified, mark it 🟢.
  • Annotate numbers, dates, people, organizations, and non-standard library APIs with 🟢🟡🔴 confidence labels, and use uncertainty templates instead of completing unverifiable content.
  • In code tasks, add API risk notes after code blocks and run pre-generation checks.
  • After self-review, record issues such as fabricated_citation, invented_api, or false_fact through hallucination_logger.py.
  • When the user supplies authoritative sources, promote 🟡/🔴 facts to 🟢 with verify_fact.py add, creating a reusable verified-knowledge base across sessions.

Boundaries

It suits technical documentation, research reports, third-party library usage, and tasks requiring traceable facts. The skill does not eliminate hallucination or replace source verification; when authoritative user-supplied evidence is missing, uncertain content should still be explicitly flagged.

Use Cases

  • Annotate dates, organization names, and numeric claims in a technical research article with confidence labels.
  • Check non-standard third-party library APIs before code generation and add API risk notes after code blocks.
  • After drafting a report, run self-review and log hallucination events such as fabricated citations.
  • When the user supplies authoritative sources, add pending facts to the cognitive sandbox and update labels.

Best For

  • Engineers writing technical research documents and needing confidence labels for sources.
  • Backend engineers generating code and needing third-party API checks with risk notes.
  • Agent developers who need cross-session hallucination stats and verified knowledge accumulation.
  • Research assistants converting user materials into reports without fabricated citations.