Wo soll die KI rechnen?

KI-Modus für die ganze App

Ein Moduswechsel beendet laufende KI-Aufgaben und beginnt neue Chats. Die Auswahl bleibt auf diesem Gerät gespeichert.

1. App und Artikel speichern

Seiten, Schriften, Skripte und KI-Laufzeitdateien ; Modelldateien kommen separat dazu.

Bereits als PWA installiert? Öffne die App mit Internetverbindung und lade sie neu. Speichere danach hier das aktuelle Offline-Paket. Die KI-Modelle lädst du separat unter 2 und 3 herunter, bevor du offline gehst.

Noch nicht geprüft

2. Embeddings

Xenova/multilingual-e5-small

Mehrsprachige Vektoren auf der CPU, auch ohne WebGPU; Download über hundert MB.

Noch nicht geprüft

3. Chat und Textaufgaben

Qwen3-0.6B-q4f16_1-MLC

Experimentelles kleines Sprachmodell; mehrere hundert MB Download und zusätzlicher GPU-Speicher nötig.

Noch nicht geprüft

Wie gut funktioniert es?

Stelle dieselbe Frage in beiden Modi oder vergleiche dieselben Texte in der Embeddings-Kachel. Prüfe Fundstellen, sachliche Richtigkeit und Antwortzeit. Die kleinen lokalen Modelle können deutlich schwächer sein als Gemini; die lokale Textsuche liefert den Chat-Kontext.

Nach der Vorbereitung: App schließen, Verbindung trennen und neu öffnen. Prüfe neue Eingaben. Browser-Caches können gelöscht werden; „Nur gespeicherte Dateien prüfen“ lädt keine fehlenden Dateien nach.

Letzte echte Berechnungen · nur diese Sitzung
Aufgabe / ModellModusGesamtzeitErste Ausgabe
Noch keine Berechnung gemessen.

Inklusive Laden bei kaltem Modell. Netzwerk- und Modellzeiten sind geräteabhängig; die erste Ausgabe ist bei Gemini der erste empfangene Stream-Block. Keine Qualitätsbewertung aus der Geschwindigkeit ableiten.

KI & Agents
GEOllms.txtNext.js 16JSON-LDRAGContent Negotiation

Optimizing Websites for AI (GEO) – Information Gain, Markdown Negotiation and Agent Readiness

Practical engineering guide to Generative Engine Optimization (GEO): Information Gain, Accept: text/markdown in Next.js 16, JSON-LD and token telemetry.

LKLukas Kopischke
Last updated on

Why do well-written developer articles get ignored by Perplexity, ChatGPT Search, or Google AI Overviews while a single forum thread containing a raw error log gets cited at the very top? Publishing the tenth overview tutorial on a standard web API only feeds large language models information they already hold in their pretraining weights. At the same time, deeply nested DOM trees, inline SVGs, and React hydration scripts consume up to 85 percent of an agent's context window over HTTP before the first paragraph of actual engineering content is even parsed.

Generative Engine Optimization (GEO) pairs verifiable primary telemetry (Information Gain) with a machine-readable delivery architecture. Server-side content negotiation via Accept: text/markdown, explicit JSON-LD entity graphs, and structured benchmark tables cut retrieval token overhead by over 80 percent and increase citation probability across RAG answer engines. However, /llms.txt or .md routes never guarantee rankings on their own: without indexable HTML, empirical measurements, and documented failure boundaries, neural rerankers discard any page as redundant.

Information Gain Over Synthesis

Language models synthesize textbook definitions on their own—they cite external websites only when those pages provide empirical metrics, documented failure modes, or configuration boundaries absent from pretraining weights. Technical protocols like Accept: text/markdown and JSON-LD ensure that this primary evidence reaches the model's context window without HTML noise.

Why Do RAG Pipelines Discard Classic Summaries—and How Does Information Gain Work?

When a developer asks a technical question in Perplexity, ChatGPT Search, or Google AI Mode, the model runs a multi-stage : the query is expanded into sub-queries (query fan-out), candidate web pages are fetched, split into chunks, and scored by a .

Classic introductory paragraphs fail at this exact filter. A 400-word section explaining "what the Model Context Protocol is" adds zero new entropy beyond the model's base weights. In information retrieval research and Google search patents, this differential value is called .

The empirical study GEO: Generative Engine Optimization (Aggarwal et al., Princeton University & Georgia Tech, KDD 2024) demonstrated across thousands of queries that three structural signals boost visibility in generative answers by 30 to 40 percent:

  1. Quantifiable Metrics Instead of Adjectives: Concrete numbers with units (e.g., "INP dropped from 280 ms to 42 ms" or "Tool selection accuracy dropped by 64% beyond 23 registered MCP tools") rather than vague claims.
  2. Documented Failure Modes & System Boundaries: First-hand operational observations ("On iOS 18 Safari, the WebGPU worker terminates with an Out-of-Memory error above 1.8 GB VRAM"). Models cannot hallucinate authentic hardware post-mortems—they must cite the primary source.
  3. Self-Contained Citation Blocks & Comparison Tables: Standalone 40–80 word answer paragraphs stating both mechanism and constraint, paired with Markdown tables sharing uniform evaluation criteria.

The Four Technical Layers of an AI-Optimized Website

To ensure primary engineering evidence isn't lost in DOM noise, lukiluki.me combines four architectural layers:

1. Primary Telemetry & Post-Mortems

Content

Every guide answers the core question in the first quarter (40–80 words) and backs claims with measured benchmarks, exact package versions, and reproducible failure boundaries.

2. HTTP Content Negotiation (.md)

Transport

When an AI agent or CLI requests a route with Accept: text/markdown or a .md extension, src/proxy.ts streams clean semantic Markdown stripped of navigation HTML and hydration scripts.

3. Dense JSON-LD Entity Graphs

Semantics

A connected Schema.org @graph (TechArticle, Person, knowsAbout, sameAs, encoding) links author identity, technology entities, and the Markdown mirror in the document head.

4. Semantic Accessibility Tree

Actuation

Strict ARIA roles, labeled form controls, and browser tools (Web MCP) allow autonomous browser agents to navigate interactive components without brittle DOM scraping.


What Infrastructure Do I Need to Implement Markdown Content Negotiation in Next.js 16?

When a live retrieval bot such as ChatGPT-User, Perplexity-User, or ClaudeBot fetches a standard React page, it receives full server HTML including navigation chrome, inline SVG icons, Tailwind utility strings, and serialized React Server Components payloads (self.__next_f.push(...)).

Measured Payload Comparison on lukiluki.me: SSR HTML vs. Markdown Stream

We measured actual byte payloads and estimated token counts (~4 characters per token) across five routes of this Digital Garden. The standard SSR HTML response carries roughly 38.4 KB of layout and hydration shell overhead before the article prose begins:

Garden Route on lukiluki.meSSR HTML PayloadEstimated HTML TokensClean .md StreamEstimated .md TokensToken Overhead Saved
/garden/geo54.8 KB~13,700 Tokens9.6 KB~2,400 Tokens-82.5%
/garden/web-mcp51.2 KB~12,800 Tokens7.4 KB~1,850 Tokens-85.5%
/garden/brownfield-ai56.4 KB~14,100 Tokens10.2 KB~2,550 Tokens-81.9%
/garden/3d-print-mcp52.0 KB~13,000 Tokens7.8 KB~1,950 Tokens-85.0%
/garden/accessibility49.6 KB~12,400 Tokens6.8 KB~1,700 Tokens-86.3%

Prerequisites for Implementation

  • Next.js App Router (v16.0+): Request header inspection via src/proxy.ts (Next.js 16 replaced middleware.ts with proxy.ts) paired with a Route Handler at src/app/api/markdown/[slug]/route.ts.
  • Pre-compiled Clean Markdown Corpus: A prebuild step (using gray-matter) that strips interactive client imports from MDX files and writes a clean JSON map.
  • HTTP Discovery Headers: Vary: Accept (preventing CDN caches from serving raw Markdown to regular browsers) and Link headers with rel="alternate"; type="text/markdown".
Real-World Failure Mode: Outdated Training Weights on Next.js 16 Proxy

If you prompt an LLM without local documentation context to write content negotiation for Next.js, it almost always generates a middleware.ts file. Starting with Next.js 16, middleware.ts is deprecated and renamed to proxy.ts exporting proxy(request: NextRequest). Documenting such version-specific breaking changes provides high Information Gain.

Step-by-Step Implementation: src/proxy.ts

The production code below runs live on lukiluki.me. It intercepts both explicit /garden/[slug].md requests and standard article URLs carrying Accept: text/markdown:

TYPESCRIPT
1// src/proxy.ts (Next.js 16 File Convention)
2import { NextResponse } from "next/server";
3import type { NextRequest } from "next/server";
4import { prefersMarkdown } from "@/lib/ai-telemetry";
5
6const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://lukiluki.me";
7
8export function proxy(request: NextRequest) {
9 const { pathname } = request.nextUrl;
10 const acceptHeader = request.headers.get("accept") || "";
11
12 // 1. Direct .md suffix (e.g. /garden/geo.md or /en/garden/geo.md)
13 const mdMatch = pathname.match(/^(?:\/(en))?\/garden\/([^/]+)\.md$/i);
14 if (mdMatch) {
15 const locale = mdMatch[1] === "en" ? "en" : "de";
16 const slug = mdMatch[2];
17 const rewriteUrl = new URL(`/api/markdown/${slug}`, request.url);
18 rewriteUrl.searchParams.set("locale", locale);
19 return NextResponse.rewrite(rewriteUrl);
20 }
21
22 // 2. HTTP Content Negotiation (Accept: text/markdown prioritized over text/html)
23 const gardenMatch = pathname.match(/^(?:\/(en))?\/garden\/([^/.]+)$/);
24 if (gardenMatch && prefersMarkdown(acceptHeader)) {
25 const locale = gardenMatch[1] === "en" ? "en" : "de";
26 const slug = gardenMatch[2];
27 const rewriteUrl = new URL(`/api/markdown/${slug}`, request.url);
28 rewriteUrl.searchParams.set("locale", locale);
29 return NextResponse.rewrite(rewriteUrl);
30 }
31
32 // 3. Standard HTML delivery with HTTP discovery headers for AI agents
33 const response = NextResponse.next();
34 if (gardenMatch) {
35 const isEn = gardenMatch[1] === "en";
36 const slug = gardenMatch[2];
37 const mdHref = `${siteUrl}${isEn ? "/en" : ""}/garden/${slug}.md`;
38 response.headers.set("Vary", "Accept");
39 response.headers.set(
40 "Link",
41 `<${mdHref}>; rel="alternate"; type="text/markdown", <${siteUrl}/llms.txt>; rel="llms-txt"`
42 );
43 }
44
45 return response;
46}
Idempotent Markdown with Vary: Accept and Canonical Metadata

Always send Vary: Accept and include the canonical URL, publication date, and author entity inside the Markdown header so context remains intact when an agent ingests only the .md stream.

User-Agent Cloaking with Divergent Claims for Search Bots

Never serve factually different claims to Googlebot than to human readers. Serving divergent content without transparent content negotiation violates search engine cloaking policies.


How Do I Audit Information Gain and Test Live Markdown Streaming?

Use the interactive auditor below to test two mechanisms:

  1. Top Panel (Information Gain Auditor): Select one of the three presets or paste your own technical prose to evaluate token economy (SSR HTML vs. .md), quantitative metrics, boundary signals, and banned marketing fluff.
  2. Bottom Terminal (Live Endpoint Tester): Trigger a real fetch request with Accept: text/markdown against the live routes of this website (/garden/geo.md, /garden/web-mcp.md, etc.) and inspect the actual HTTP headers returned by src/proxy.ts.
GEO Information Gain Auditor & Live Markdown Negotiation TesterLive Endpoint & Heuristic
Audit passages for empirical citation signals, token economy, and inspect the live .md stream of this Next.js 16 site.
Szenario wählen oder eigenen Abschnitt prüfen (Heuristische Analyse)
Information-Gain-Index (Heuristik)
Hohe Zitierfähigkeit (Primärdaten & Struktur)
90/100
SSR HTML-Dom (~38,4 KB Shell)
~10.155 Tokens
Signal-Anteil: nur 2 % Nutztext
Accept: text/markdown (.md)
~327 Tokens (-97 %)
Signal-Anteil: 71 % Nutztext
Messwerte & Einheiten (7 erkannt)
14.200 Tokens, 1,8 GB, 11 Sekunden
Praxis-/Grenzsignale (7 erkannt)
Praxistest, v0.8, Safari
Maschinenlesbare Struktur (Tabelle / Schritte)
Markdown-Tabelle aktiv
Floskel-Filter (Evidenz statt Marketing)
0 Buzzwords (Clean)
Live-Test: Next.js 16 Markdown Content-Negotiation auf lukiluki.me
Klicke auf „GET /garden/geo.md ausführen“, um die echte Next.js-16-Proxy-Antwort inklusive HTTP-Headern live zu prüfen.

What Does This Auditor Prove—and Where Are Its Limits?

Comparing Preset 1 (Empirical Post-Mortem) against Preset 2 (Generic Summary) illustrates why retrieval pipelines filter out generic prose: Preset 2 contains zero extractable numbers and triggers marketing buzzword penalties, whereas Preset 1 provides concrete failure thresholds (23 tools, 64%, 1.8 GB) and a machine-readable Markdown table.

Limitation: The browser-side score is a structural heuristic. It verifies whether formal building blocks for Information Gain exist, but cannot verify the factual accuracy of your benchmarks or external domain authority.


Which AI Crawler Reads What—and Why Does Google Ignore /llms.txt?

A common misconception is that dropping an /llms.txt file into the root directory automatically ranks a site in Google AI Overviews. Server telemetry and official search documentation show a clear split across three crawler classes:

Crawler / User-AgentOperator & PurposeRespects robots.txt?Reads /llms.txt Automatically?Preferred Format & Lever
Googlebot / Google-ExtendedGoogle Search, AI Overviews & Gemini trainingYes (Google-Extended only governs training, not search citations)No (Google relies strictly on its regular HTML/DOM index)Server-rendered HTML (SSR), internal links, visible prose, and valid TechArticle JSON-LD.
OAI-SearchBotOpenAI Search Index for ChatGPT SearchYesRarely (Crawls sitemap & HTML pages)Clear question headings, comparison tables, and high factual density in the top quarter.
ChatGPT-User / Perplexity-UserUser-initiated live fetch during a chat sessionPartially (Treated as user-requested fetch)Yes, when prompted or via agent skillsBenefits heavily from Accept: text/markdown and fast TTFB.
PerplexityBotPerplexity AI Citation Index (~10 sources per answer)YesRarelyStrongly favors first-hand post-mortems, benchmark tables, and specific error fixes.
ClaudeBot / Claude CodeAnthropic Web Index & Coding AgentsYesYes (Especially in developer documentation workflows)Direct .md URLs (/garden/geo.md), /llms-full.txt, and versioned code blocks.

Verification Checklist: Is Your Website Ready for AI Search and Agents?

  • Information Gain Verified: Does the article include at least one original measurement table, reproducible benchmark, or real-world failure post-mortem not found in boilerplate docs?
  • Direct Answer in First Quarter: Is there a standalone 40–80 word paragraph right after the hook stating mechanism, benefit, and primary limitation without requiring any click?
  • Content Negotiation Active: Does curl -I -H "Accept: text/markdown" https://your-domain.com/path return 200 OK with Content-Type: text/markdown; charset=utf-8 and Vary: Accept?
  • Retrieval Bots Allowed in robots.txt: Are OAI-SearchBot, ChatGPT-User, PerplexityBot, ClaudeBot, and Googlebot explicitly allowed on article routes, /llms.txt, and /api/markdown/?
  • Entity Graph & Accessibility Tree: Does the embedded TechArticle JSON-LD validate cleanly, and do all interactive controls expose accessible labels and 44×44 px touch targets?

Sources and Next Steps

Primary Sources & Research