Zero-Hallucination Engine

Multi-Model AI Fact Verification

PythonasyncioOpenAI GPT-4oClaude 3.5 Sonnet
Gemini 1.5 ProspaCyscikit-learn

/ Overview

A verification layer for AI answers. The same question goes to GPT-4o, Claude 3.5 Sonnet and Gemini 1.5 Pro in parallel; their answers are compared semantically, entity by entity and number by number, and only the consensus comes back, with a trust score, a margin of error and a tamper-evident audit log.

/ Project Details

Name: Zero-Hallucination Engine

Type: Multi-Model AI Fact Verification

Stack: Python, asyncio, OpenAI GPT-4o, Claude 3.5 Sonnet, Gemini 1.5 Pro, spaCy, scikit-learn

Role: AI engineer: architecture and implementation

Platforms: Python service / API

/ The challenge

A single LLM can state a wrong figure or name with complete confidence. For finance, legal or research use, an answer needs to come with evidence of how reliable it is.

/ How I built it

01

Fan out each prompt to GPT-4o, Claude 3.5 Sonnet and Gemini 1.5 Pro concurrently with asyncio, with a 15-second timeout so one slow provider can't stall the response.

02

Measure agreement with embedding cosine similarity (scikit-learn) and compare the people, places and organisations each model mentions using spaCy NER.

03

Extract numbers from each answer and flag any claim where the models disagree by more than 2%.

04

Return a trust_score and margin_of_error with the consensus answer, and write a SHA-256 hashed audit record so every result can be traced later.

/ Results

What this build delivers. Key outcomes and capabilities shipped for Zero-Hallucination Engine.

/ Highlights

01

Three LLMs queried in parallel with a 15s timeout

02

Consensus via cosine similarity and named-entity matching

03

Numeric fact-check within a 2% margin

04

SHA-256 hashed audit log for every answer

Surge
Tangle Social
Caterbox
PMS Automation
PHIR
PITCHERS
Opportunist
Habbits Food
Surge
Tangle Social
Caterbox
PMS Automation
PHIR
PITCHERS
Opportunist