惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
博客园 - 【当耐特】
M
MIT News - Artificial intelligence
月光博客
月光博客
博客园_首页
博客园 - 叶小钗
T
Tailwind CSS Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
InfoQ
量子位
小众软件
小众软件
爱范儿
爱范儿
The GitHub Blog
The GitHub Blog
IT之家
IT之家
Jina AI
Jina AI
阮一峰的网络日志
阮一峰的网络日志
G
Google Developers Blog
WordPress大学
WordPress大学
人人都是产品经理
人人都是产品经理
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
J
Java Code Geeks
云风的 BLOG
云风的 BLOG
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
An LLM Walks Into General Relativity - Lessons from a Dev...
Tasos Nikola · 2026-05-11 · via DEV Community

Why fluent AI-generated technical content can still be fundamentally incorrect, and how to fix it with system design.

Introduction

At Devoxx, I presented a simple experiment:

What happens if you ask an LLM to generate an entire technical presentation on General Relativity?

The model produces something impressive:

  • well-structured slides
  • correct terminology
  • equations
  • citations
  • a coherent narrative

It looks like something you could present. And yet, parts of it are fundamentally wrong. Not obviously wrong, convincingly wrong.

This is the real problem with AI-generated technical content.


The Problem: Fluent ≠ Correct

Large Language Models are extremely good at:

  • structure
  • storytelling
  • pedagogy

But they are not built to preserve:

  • physical constraints
  • invariants
  • measurement consistency

In physics, that becomes "obvious" very quickly 😉.

Example:

A model might say:

"Light slows down in gravity, so time slows down."

This sounds reasonable. But it's wrong, or at best, deeply misleading, because:

  • locally, the speed of light is always c, constant
  • time dilation is defined through clock comparisons, not metaphors

This is what I call:

Frame confusion

The model mixes:

  • different observers
  • different measurement definitions
  • intuitive metaphors

...into a single explanation.

Everything reads smoothly. But the reasoning is broken.


Why Physics is a Perfect Stress Test

General Relativity is unforgiving.

You can't get away with:

  • vague explanations
  • metaphor-only reasoning
  • mixing frames of reference

Every statement must answer:

"How would you measure that?"

If you can't answer that, the explanation is incomplete, or wrong. This makes physics an ideal domain to expose LLM weaknesses.


From Prompting to System Design

Instead of trying to "prompt better", I built a system around the model.

The goal:

Not to make the model smarter, but to make the output auditable and correctable.


Architecture Overview

The system is a multi-agent pipeline:

Sources → Chunking 
        → Retrieval (RAG)        
        → Author Agent (generate slides)
        → Schema Validation
        → Post-processing
        → Physics Rule Engine
        → Critic Agent
        → Refinement Loop
        → PowerPoint Rendering

Enter fullscreen mode Exit fullscreen mode


Key Components

1. Structured Generation

The model doesn't output free text. It must generate strict JSON:

  • slide types
  • bullet constraints
  • equations
  • citations

Validated with Pydantic. If it doesn't parse, it doesn't ship.


2. Deterministic Validation (The "Physics Linter")

I implemented rule-based checks like:

  • Time dilation must reference clocks or measurements
  • Gravitational waves must reference strain or detectors
  • No "black holes suck everything in" explanations
  • Distinguish event horizon vs singularity

These rules catch systematic failure patterns instantly.


3. Critic Agent

A second LLM reviews the output:

  • checks clarity
  • checks reasoning
  • suggests corrections

But importantly, it runs after deterministic validation


4. Refinement Loop

Generate → Validate → Critique → Revise

Enter fullscreen mode Exit fullscreen mode

This loop runs until:

  • errors are reduced
  • or a maximum number of iterations is reached

Results

From a real run:

  • Draft deck → 6 failing slides
  • After refinement → 4 failing slides

We didn't achieve perfection. But we achieved something more important:

We made correctness measurable.


What Still Fails

Even with this pipeline:

  • Citations may look correct but not truly support claims
  • Subtle reasoning errors remain
  • Frame confusion is hard to eliminate
  • Models can satisfy rules while staying vague

Human review is still necessary.


Key Insight

Reliable AI is not a prompting problem.
It's a system design problem.


What You Can Reuse

These patterns generalize beyond physics:

  • legal documents
  • financial reports
  • medical summaries
  • architecture decisions

Use:

  • structured outputs
  • deterministic validation
  • domain-specific rules
  • critique loops

The project

GitHub Repo: https://github.com/tase-nikol/gr-deck-agent

Example commands:

gr-deck-agent index
gr-deck-agent draft
gr-deck-agent review
gr-deck-agent refine
gr-deck-agent replay

Enter fullscreen mode Exit fullscreen mode


Devoxx Talk

You can watch the full talk here:

YouTube: https://www.youtube.com/watch?v=NanGs7ZMQEE


Final Thought

LLMs don't "understand" systems.

They generate plausible descriptions of them.

If your domain has constraints, invariants, or correctness requirements:

You need to build those constraints into the system,not hope the model learns them.


Conclusion

If you're working with AI-generated technical content, I'd love to hear:

  • what failure modes you've seen
  • how you validate outputs
  • what worked (or didn't)

AI is fluent
But reality is not optional