Replicating Cloudflare's Agent Search: semantic chunking via yes/no decision model
dejanseo · x · 2026-11-27
The author rebuilt (and improved) Cloudflare's Agent Search pipeline on their own stack, adding a self-hosted search endpoint that serves both humans and AI agents.
The core problem is semantic chunking: traditional search chops articles at arbitrary points, breaking context, while having a generative model rewrite and chunk text is slow and risks information loss. Their fix reframes chunking as a series of yes/no decisions — a decision model examines the transition between adjacent text blocks and judges whether the first ends a complete idea. Since the model only decides and never rewrites, content stays perfectly verbatim, runs fast, and eliminates orphan headings.
A directly reusable pattern for developers building RAG/search infrastructure optimized for AI agents.
More from coding & agent
- 12,000-trial study: AI agent database damage depends on what engines let you undo — libredb · 2026-11-27
- Every Tool Call Needs a Gatekeeper: Lessons from Semantic Kernel's Policy Boundary — Mahmoud_Zalt · 2026-11-27
- Prompt tip: prefix requests with "Should we" to let AI agents evaluate your idea first — tristanbob · 2026-11-27
- Chrome Live for Antigravity: zero-dependency MV3 bridge cuts tokens 83.9% — Impossible-Bar-1670 · 2026-11-27
- Claude Duet Proxy Lets You Spend Duet's Free Credits Inside Claude Code — AccountAntique9327 · 2026-11-27
- Engineer goes from zero to CAD-to-simulation with LLMs in 3 weeks — deepakns · 2026-11-27