ATLAS: An AI Knowledge Integrity Auditor That Investigates Claims with Sanity
This is a submission for the Sanity Challenge, Path One: Ship an Agent That Queries Real Content What I Built ATLAS - AI Knowledge Integrity Auditor AI can answer almost any question in seconds. The harder
This is a submission for the Sanity Challenge, Path One: Ship an Agent That Queries Real Content
What I Built
ATLAS - AI Knowledge Integrity Auditor
AI can answer almost any question in seconds.
The harder question is:
Can you trust the answer?
A traditional RAG system retrieves similar chunks of text, gives them to an LLM, and generates an answer.
But when an answer actually matters, similarity alone is not enough.
You need to know:
- Which claim supports the answer?
- Where did that claim come from?
- Do different sources disagree?
- Which source should be trusted?
- Is the evidence still valid?
- Can someone independently inspect the reasoning later?
That is the problem I wanted to solve with ATLAS.
ATLAS is an AI-powered knowledge integrity auditor that turns unstructured content into structured, interconnected knowledge and then investigates individual claims against that knowledge.
Instead of treating an article as one large block of text, ATLAS transforms it into:
Source → Entity → Claim → Relationship → Conflict → Verdict
The structured knowledge is stored in Sanity's Content Lake, allowing the investigation agent to query individual entities, claims, relationships, sources, and conflicts rather than relying only on semantic similarity.
How ATLAS Works
The workflow starts with a real article or documentation URL.
ATLAS processes the content and extracts:
- Entities
- Atomic claims
- Sources
- Relationships
- Knowledge documents
- Provenance information
These are stored as structured documents in Sanity.
Once the knowledge is available, a user can submit a specific factual claim for investigation.
The investigation agent then:
- Analyzes the question and plans the investigation.
- Resolves relevant entities using GROQ.
- Retrieves claims connected to those entities.
- Retrieves the corresponding sources and relationships.
- Searches for competing or contradictory claims.
- Applies explicit source-authority and recency rules.
- Generates a citation-backed answer.
- Runs adversarial audit probes against the generated answer.
- Produces an epistemic verdict.
- Builds an evidence graph showing how the evidence is connected.
- Generates a cryptographic certificate that can be verified later.
The possible verdicts are:
SUPPORTEDPARTIALLY_SUPPORTEDCONTRADICTEDINSUFFICIENT_EVIDENCE
The result is therefore not simply an AI-generated "yes" or "no".
It is an inspectable investigation containing the verdict, evidence, sources, relationships, conflicts, audit results, evidence graph, and cryptographic certificate.
Don't just trust the answer. Inspect the evidence.
Demo
For the demonstration, I used a real-world article about NVIDIA and India's AI infrastructure investment.
Instead of asking ATLAS to summarize the article, I extracted individual factual claims and investigated them independently.
Claim 1
"India's current AI investment is $1.2B."
ATLAS returns:
SUPPORTED
The system retrieves the relevant structured claim, resolves its associated entities and sources, and verifies that the evidence supports the assertion.
The investigation result is connected back to the underlying evidence through the evidence graph.
Claim 2
"The Union Budget provides a 10-year tax holiday."
ATLAS returns:
CONTRADICTED
The investigation finds that although the article contains the AI investment figure, the tax-holiday claim does not match the evidence stored in the knowledge base.
The evidence indicates a 20-year holiday rather than 10 years.
This demonstrates the core idea behind ATLAS.
The agent is not simply repeating what an article says.
It decomposes the content into structured claims and investigates those claims against their evidence.
Complete Investigation Flow
The complete workflow demonstrated in the video is:
Ingest article
↓
Extract structured knowledge
↓
Store knowledge in Sanity Content Lake
↓
Investigate a factual claim
↓
Resolve entities and retrieve related claims
↓
Compare evidence and detect conflicts
↓
Generate epistemic verdict
↓
Inspect evidence graph
↓
Run adversarial audit
↓
Generate cryptographic certificate
↓
Verify the investigation
Watch the Demo
The demo walks through the complete ATLAS workflow, including article ingestion, claim investigation, evidence retrieval, verdict generation, the evidence graph, and certificate verification.
Code
TejasRawool186
/
Atlas
ATLAS is an autonomous knowledge-integrity platform that investigates factual questions by querying a Sanity-backed Content Lake and Knowledge Base, running adversarial audit probes, and producing tamper-evident cryptographic certificates.
ATLAS
Audit factual claims against structured knowledge with cryptographic verification.
ATLAS is an epistemic integrity auditor that validates factual assertions against relational schemas in Sanity, evaluates contradictions across sources, and seals the evidence into tamper-evident Merkle certificates.
Overview • How it works • Tech stack • Getting started • Testing
Overview
ATLAS validates factual claims against structured source documents and generates an auditable cryptographic proof for every verdict. The system is designed for engineering, compliance, and research teams that require autonomous agents to produce citations linked to structured schemas rather than ungrounded completions. Standard retrieval engines pass unstructured text chunks to an LLM, making temporal conflicts and subtle hallucinations difficult to isolate. ATLAS replaces this pattern by structuring sources into entities, claims, and relations within the Sanity Content Lake, evaluating conflicts with explicit authority rules, and executing a 10-probe audit suite before issuing a verdict. Every completed investigation produces a…
Repository:
https://github.com/TejasRawool186/Atlas
ATLAS is built with:
- Node.js + Express for the backend API and Server-Sent Events
- React 19 + Vite for the frontend
- TypeScript throughout the application
- Sanity as the structured knowledge layer
- GROQ for structured retrieval
- Gemini 2.5 Flash for planning, extraction, and answer synthesis
- HMAC-SHA256 + Merkle trees for investigation certificates
The repository contains the investigation agent, Sanity integration layer, Studio schemas, evidence graph, audit system, certificate generation, and subsystem documentation.
How I Used Sanity
Sanity is not being used as a simple content database in ATLAS.
It is the knowledge layer that the investigation agent depends on.
Structured Content Model
The Content Lake contains six primary document types:
entityclaimsourcerelationshipconflictknowledge_doc
When a URL is ingested, ATLAS fetches the page and uses Gemini to extract structured information.
The resulting data is stored as interconnected Sanity documents.
A claim contains information such as:
- Subject
- Predicate
- Object
- Sources
- Validity window
- Status
- Confidence
This means an article is no longer treated as a single text blob.
It becomes a navigable knowledge structure.
How the Agent Queries Sanity
All Sanity retrieval is handled through a dedicated query layer.
The investigation agent does not directly manipulate Sanity documents.
During an investigation, ATLAS performs several structured retrieval operations.
Entity Resolution
The agent uses GROQ matching against:
- Entity names
- Descriptions
- Aliases
This allows the investigation to identify the entities relevant to the user's claim.
Claim Retrieval
Once entities are resolved, ATLAS retrieves claims connected to those entities.
The system batches these queries so that the investigation can retrieve the relevant knowledge efficiently.
Relationship Traversal
ATLAS also retrieves relationships connecting entities.
Relationships can represent concepts such as:
supersedesintroduced_independs_on
This allows the agent to reason about relationships instead of treating every statement as independent text.
Source Resolution
Claims and relationships maintain references to their sources.
ATLAS follows these references so that every assertion can be traced back to its provenance.
Knowledge Base Search
ATLAS also queries knowledge_doc documents using GROQ across titles, summaries, and extracted claims.
Conflict Records
Conflict documents are retrieved alongside the claims so competing evidence can be surfaced during the investigation.
From Structured Content to Investigation
The structure of the Sanity data directly drives the investigation process.
Contradiction Detection
ATLAS compares claims using their:
- Subject
- Predicate
- Object
- Validity interval
Statements from the same source are not treated as independent evidence.
When competing claims are detected, ATLAS applies explicit source-authority rules.
The current authority hierarchy includes:
| Source Type | Authority |
|---|---|
| Official release | 100 |
| Git commit | 95 |
| RFC | 85 |
| Documentation | 80 |
| Community forum | 40 |
Recency is then used as a tie-breaker.
This is important because the agent is not simply asking an LLM:
"Which answer sounds better?"
It is applying deterministic rules to structured evidence.
Evidence Graph
Every investigation can be visualized as an evidence graph.
The graph connects:
Entities → Claims → Sources → Relationships → Conflicts
This makes the provenance of an answer inspectable.
Instead of receiving a final answer with a collection of links, the user can navigate through the evidence structure and understand how the conclusion was reached.
Adversarial Audit
ATLAS does not stop after generating an answer.
The generated answer is passed through a 10-probe adversarial audit.
The probes check areas such as:
- Grounding
- Unsupported claims
- Evidence coverage
- Temporal ordering
- Entity drift
- Contradictions
- Source consistency
- Counterfactual source removal
The goal is to challenge the answer rather than simply accept the first generated response.
If the retrieved evidence cannot support the claim, ATLAS can return:
INSUFFICIENT_EVIDENCE
instead of guessing.
Cryptographic Investigation Certificates
ATLAS also adds a second layer of verification.
The evidence used during an investigation is committed into an HMAC-SHA256 Merkle certificate.
The certificate incorporates the relevant:
- Claims
- Sources
- Relationships
- Conflicts
This creates a tamper-evident record of the investigation.
If the underlying evidence is modified after the certificate is generated, verification fails.
The idea is simple:
The AI should not only explain why it reached a conclusion.
The evidence used to reach that conclusion should also be independently verifiable.
Sanity Context
The project was designed around Sanity's structured-content approach and the Sanity Context ecosystem.
The live application currently performs its structured retrieval through the Sanity GROQ HTTP API.
The application also exposes the configurable Sanity Context MCP endpoint through the Sanity Explorer area.
The current agent implementation uses GROQ for its retrieval path rather than directly invoking the Context MCP client.
This distinction is intentional and documented in the project.
The architecture allows the retrieval layer to evolve toward direct Context MCP integration while keeping the structured Sanity knowledge model intact.
Why Sanity Matters to ATLAS
The important part of this project is not simply storing articles in Sanity.
The investigation would not work the same way if the content were stored only as large blocks of text.
ATLAS needs to understand relationships such as:
Who made the claim?
What exactly was claimed?
Which source supports it?
Which entity does the claim refer to?
Does another source make a conflicting claim?
When was each claim valid?
That is where structured content becomes important.
Sanity provides the foundation for modeling this information as interconnected documents that the agent can query and reason over.
Local Fallback
ATLAS also includes a local corpus fallback.
If Sanity credentials are not available, the application can run against a local corpus that mirrors the same document structures.
The application status endpoint reports whether the system is currently running in:
livelocal-corpus
This makes the project easier to test without requiring production credentials.
Sanity Project Details
Project ID: hrexnsmi
Project:
https://www.sanity.io/organizations/ofyfft9qh/project/hrexnsmi
Dataset: production
Document types:
entityclaimsourcerelationshipconflictknowledge_doc
The Studio schemas are available in the repository:
https://github.com/TejasRawool186/Atlas/tree/master/sanity-studio/schemaTypes
What I Wanted to Explore
The broader idea behind ATLAS is that AI systems are becoming very good at generating answers.
The next challenge is making those answers auditable.
For many applications, the question should not be:
"Can the AI answer this?"
It should be:
"Can the AI show me exactly why I should believe this answer?"
That is the direction I explored with ATLAS.
Structured content gives the agent something it can reason over.
Evidence graphs make the reasoning inspectable.
Adversarial probes challenge the result.
Cryptographic certificates make the investigation tamper-evident.
Final Architecture
At a high level, ATLAS follows this architecture:
REAL-WORLD CONTENT
|
v
CONTENT INGESTION
|
v
GEMINI EXTRACTION
|
v
SANITY CONTENT LAKE
|
+----------------+----------------+
| | |
v v v
ENTITIES CLAIMS RELATIONSHIPS
| | |
+----------------+----------------+
|
v
INVESTIGATION AGENT
|
+----------------+----------------+
| | |
v v v
CONFLICT SOURCE AUTHORITY RECENCY
DETECTION RULES ANALYSIS
| | |
+----------------+----------------+
|
v
EPISTEMIC VERDICT
|
+-------------+-------------+
| | |
v v v
EVIDENCE AUDIT CERTIFICATE
GRAPH PROBES GENERATION
| | |
+-------------+-------------+
|
v
INSPECTABLE RESULT
Project Links
GitHub:
https://github.com/TejasRawool186/Atlas
Demo Video:
https://youtu.be/TCv8wEBfQmM
Sanity Project:
https://www.sanity.io/organizations/ofyfft9qh/project/hrexnsmi
Agent Session
An agent session can be added here after uploading the relevant transcript through the DEV Agent Sessions uploader.
Conclusion
ATLAS started with a simple question:
What if an AI answer came with an investigation instead of just a response?
That question led to a system where content becomes structured knowledge, claims become first-class objects, sources retain provenance, contradictions become explicit, answers are adversarially tested, and the final evidence can be cryptographically verified.
The goal is not to make AI sound more confident.
The goal is to make AI more inspectable.
Don't just trust the answer. Inspect the evidence.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.