Back to flagship work
Case Study · Information Integrity · Live Search GroundingSurfaces: Web + Desktop

Factscope AI

Deployment model: Web Serverless + Electron 36 Desktop

Deconstruct articles or URLs into atomic claims, verify against live Google Search, and degrade transparently across a 3-tier Gemini failover engine.

A full-stack information integrity platform (React 19, Express 4 / Vercel Serverless, and Electron 36 native desktop app) that isolates 2–4 checkable factual claims per input, grounds them against live Google Search, caches duplicate checks for 24 hours, and handles API/search rate limits via 3-tier automatic degradation.

Gemini 2.5 FlashGoogle Search GroundingReact 19Express 4Electron 36Tailwind CSS v4TypeScriptVercel Serverless
Factscope AI narrated walkthrough frame
Narrated walkthrough previewGitHub source

Repository-Backed Evidence

Scoped Metrics & Verification

Linked to GitHub README
3 Tiers

Automatic AI Failover

Graceful degradation from Gemini 2.5 Flash + Search -> Gemini 3.1 Flash Lite + Search -> Gemini 3.1 Flash Lite (Searchless) when model or search quotas return HTTP 429.

Inspect verification source
24h

Normalized Result Cache

Caches duplicate raw text and URL requests for 24 hours in persistent storage (data/db.json), eliminating redundant Gemini API billing and latency.

Inspect verification source
Web + Desktop

Dual Deployment Modes

Runs as a decoupled React 19 + Express / Vercel Serverless web app and as an Electron 36 native desktop client with local electron-store API key obfuscation, system tray, and dynamic port binding.

Inspect verification source
5 Labels

Structured Verdict Schema

Classifies inputs into REAL, FAKE, MISLEADING, SATIRE, or UNVERIFIED with per-claim verdicts (TRUE, FALSE, CONTEXT_NEEDED, UNPROVEN), source citations, and contextual follow-up chat.

Inspect verification source

System Architecture Topology

End-to-end dataflow and defensive isolation layers from request entry to verified output.

Factscope AI system architecture diagram

Core Architecture Pillars

Layered engineering safeguards designed so no single model call is the sole boundary.

Pillar 01Claim Parsing

Pillar 1: Zero-Browser URL Extraction & Claim Isolation

Strips scripts, styles, SVGs, and comments server-side without headless browsers, then decomposes prose into 2–4 discrete, checkable factual claims.

  • Lightweight server-side HTML extractor (serverless-safe)
  • Dual input modes: raw text paste or direct article URL
  • AbortController deduplication + 90s client timeout guard
Pillar 02Quota Resilience

Pillar 2: Live Google Search Grounding & 3-Tier Failover

Verifies isolated claims against live Google Search citations and automatically steps down across 3 model/tool tiers when HTTP 429 or search quotas trip.

  • Tier 1: Gemini 2.5 Flash + Google Search Grounding
  • Tier 2: Gemini 3.1 Flash Lite + Google Search Grounding
  • Tier 3: Gemini 3.1 Flash Lite (Searchless, explicit caveat)
Pillar 03Web + Electron 36

Pillar 3: Contextual Follow-Up Q&A & Electron Desktop

Injects full verification reports into a multi-turn follow-up chat, persists analytics in data/db.json, and packages cleanly as a native Electron 36 desktop app with server-only secret isolation.

  • Full report context injection for post-analysis Q&A
  • Global analytics dashboard + 1-click clipboard report export
  • Electron 36 tray app with dynamic Express port binding
  • Zero frontend API key exposure (@google/genai server-only)

The Problem & Root Cause

Standard LLMs suffer from knowledge cutoffs and confidently hallucinate when asked to evaluate breaking news, while single-tier API integrations fail abruptly when model or search grounding quotas are exhausted.

Engineering Contribution

Built the full-stack Factscope AI platform across both web and desktop: server-side HTML scraper, 3-tier Gemini failover engine with Google Search grounding, 24-hour normalized cache, contextual follow-up chat, analytics dashboard, security hardening (1MB payload caps, server-only keys, server-side UUIDs), and Electron 36 packaging.

Explore the Workflow

Step through concrete scenarios to see how the system checks boundaries, reproduces failures, or degrades under quota pressure.

Illustrative example

Breaking claim: ‘Scientists confirm that drinking hot lemon water cures type 2 diabetes within 30 days.’

Step 1 / 4

Deconstruct claims

Isolate checkable factual propositions from viral phrasing.

Input -> 2 discrete medical claims extracted

Architecture Decision Records (ADRs)

Key design choices, technical rationale, and accepted trade-offs behind the implementation.

ADR-01Engineering Trade-off

Decompose articles into 2–4 atomic claims before scoring

Isolates verifiable factual claims from rhetoric and scores each claim individually alongside an overall credibility label.

Why this decision:Articles routinely mix accurate background context with a single false assertion; per-claim verdicts make reasoning auditable.
Trade-off accepted:Produces richer structured JSON responses requiring strict schema validation and error recovery.
ADR-02Engineering Trade-off

3-tier automatic degradation separating model & search quotas

Steps down from Gemini 2.5 Flash + Search to Gemini 3.1 Flash Lite + Search, and finally searchless mode when search tooling itself is rate-limited.

Why this decision:Google Search Grounding has an independent quota from text generation; separating Tier 2 and Tier 3 keeps the app available without hiding degraded freshness.
Trade-off accepted:Tier 3 lacks live web grounding and must explicitly warn users not to assume fresh verification.
ADR-03Engineering Trade-off

Server-side regex HTML extraction instead of headless Chromium

Parses fetched URL HTML directly in Node/Express, stripping scripts, styles, and SVGs without Puppeteer or Playwright.

Why this decision:Keeps cold starts fast and compatible with lightweight serverless functions and Electron binaries.
Trade-off accepted:Cannot execute client-side JavaScript on SPA-only news sites.

Walkthrough & Repository

Watch the narrated system walkthrough below, or clone the repository to run the complete Web Serverless + Electron 36 Desktop setup and automated test suite locally.

Full source code, Docker Compose config, test suites & README on GitHubRead repository docs

Limits & Production Lessons

System Boundaries & Known Limitations

  • Model confidence scores reflect LLM evidence synthesis, not statistically calibrated factual accuracy; linked citations require human review.
  • Tier 3 fallback operates without Google Search grounding and relies solely on pre-trained weights — fresh verification is never implied.
  • Server-side HTML scraping cannot extract body text from heavily client-rendered JavaScript-only news pages.

What This System Demonstrates

Resilient AI products pair multi-tier failover and caching with radical UI honesty: when live grounding drops out, tell the user explicitly instead of presenting stale memory as verified fact.

Roles & Technical Collaboration

Hiring a GenAI Engineer or tackling a similar AI architecture?

I’m open to full-time remote GenAI & AI Systems Engineering roles, as well as focused architecture and evaluation engagements.