Skip to content

ClaimGraph

Web App

Visualize claims and their relationships across multiple sources. Enter any research question and get an interactive knowledge graph of the perspectives for and against.

Next.js
React
TypeScript
React Flow
Anthropic Claude
Exa API

Key Features

  • Multi-stage AI pipeline with query expansion and stance classification
  • Interactive knowledge graph with dagre hierarchical layout
  • Propositional chunking for atomic fact extraction
  • Source diversity enforcement with balanced perspectives
  • Real-time SSE streaming with progress updates
  • Every claim links to exact quotes and original sources

ClaimGraph maps who claims what, and what evidence backs each claim. When users research topics with conflicting information, they face scattered sources, missing context, and no way to trace claims to their origins. ClaimGraph solves this problem. It visualizes the full structure of the discourse.

How It Works

  1. Query Expansion - AI generates 4 diverse search angles from your question
  2. Over-fetch Sources - Retrieves 40 candidates with Exa semantic search
  3. Stance Classification - Rates each source as supports, contradicts, or neutral
  4. Source Balancing - Selects 20 sources with guaranteed diverse perspectives
  5. Propositional Chunking - Extracts 10-15 atomic facts per source
  6. Claim Analysis - Uses Claude Sonnet to build a knowledge graph with relationships
  7. Graph Visualization - Interactive React Flow with dagre layout

Key Technical Decisions

  • Streaming with SSE - Real-time progress updates instead of 60-second loading spinners
  • Propositional Chunking - Converts context-dependent text (“this study found…”) into standalone facts
  • Structured Outputs - JSON schema validation from Claude makes sure that responses are type-safe
  • Domain Capping - A maximum of 2 results per domain prevents search bias
  • Lazy Loading - The app imports React Flow dynamically to reduce the initial bundle by 150KB

Tech Stack

  • Framework: Next.js 16 with App Router, TypeScript
  • Visualization: React Flow with dagre layout algorithm
  • AI: Anthropic Claude (Haiku for simple tasks, Sonnet for reasoning)
  • Search: Exa API for semantic web search
  • Styling: Tailwind CSS 4, shadcn/ui