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.

Original post →

More from coding & agent

coding & agent channel →