# Closing the Loop on Search and LLM Discovery

Case study & architecture specification · [Dr. Andreas Ritter](https://andreasritter.ch/)  
Live case study: https://andreasritter.ch/telemetry · Interactive 365-day synthetic studio: https://andreasritter.ch/telemetry/sample

> Search engines and frontier language models answer questions about people and companies every day, often from stale weights or homonym collisions. Instead of guessing what they say in chat UIs, I built a zero-cookie, API-driven observability studio on Cloudflare Workers and D1 to measure, verify and improve it week by week.

## Why chat frontends are not observability

On a Swiss engineering profile, ungrounded models routinely conflate three people in Zürich: Dr. sc. ETH Andreas Ritter (High Voltage Laboratory, D-ITET, ETH Zürich; Head of Business Unit Energy, Partner and Board Member at inpeek AG), a namesake control-systems researcher at ETH's IDSC institute (D-MAVT), and a Zürich attorney (Dr. iur. Andreas Ritter). Interactive chat windows personalize on session state, hide raw search citations, and mix live retrieval with pre-cutoff weights.

## Closed-loop architecture

1. **Machine-readable public edge (`andreasritter.ch`)**: `ProfilePage` JSON-LD with an explicit `disambiguatingDescription`, a parallel Markdown twin (`/index.md`) advertised via HTTP `Link: </index.md>; rel="alternate"; type="text/markdown"`, `/llms.txt`, and `Content-Signal: search=yes, ai-input=yes, ai-train=no`. `worker/media-ranges.mjs` aggregates external AI assistant and search referrals asynchronously via `ctx.waitUntil` at `0 ms` TTFB overhead with zero cookies and zero client-side JavaScript.
2. **Daily edge & search collectors (`05:17 UTC` & `23:50 UTC`)**: Cloudflare GraphQL (`httpRequestsAdaptiveGroups` across 25 search, RAG user-fetch and training bot user-agents), Google Search Console (Web Crypto PKCS#8 `RS256` JWT), and `scripts/sync_bing.py` on GitHub Actions (bypassing Bing Webmaster `ErrorCode 17: ThrottleIP` on shared Worker egress IPs), plus `IndexNow` notifications on `main` deploys.
3. **Weekly 6x5 grounded vs. parametric LLM benchmark (Mondays `06:30 UTC`)**: Polls OpenAI (`gpt-6.1-sol` via Responses API), Anthropic Claude (`claude-sonnet-5-5` via Messages API), Google Gemini (`gemini-4-hydrogen`), Brave Search (`llm-context`) and Brave Answers across 6 bilingual DE/EN entity and Swiss utility AI discovery prompts (`innosolvenergy` to `SAP S/4HANA Utilities`, `BillPeek`). Runs both grounded web search (`grounded=1`) and ungrounded weights (`grounded=0`), enforces Brave ToS ephemeral RAM scoring, and checks live model catalogs for deprecations.
4. **28-day EWMA momentum & two-tier Drift Judge (Tuesdays `06:30 UTC`)**: Applies a continuous-time exponential decay kernel `w(dt) = 2^(-dt/28)` across 16 weeks of search, crawler and referral series, paired with cached `Claude Sonnet 5.5` feature extraction and closed-book `Claude Opus 5.5` (`Gemini 4` fallback) JSON synthesis to separate stochastic single-run blips from confirmed multi-week shifts.
5. **Zero-Trust telemetry studio (`telemetry.andreasritter.ch`)**: Fail-closed behind Cloudflare Zero Trust Access + in-Worker `RS256` JWT verification and strict `'self'` CSP, featuring three switchable UI editions (`00 Studio`, `01 Zürich Monograph`, `06 Kunstkammer` 2D circuit bench), live SSE run streaming, and multi-turn LLM wire debugging.

Updated 2026-11-15.
