Semantic Search That Cites Its Sources — and Says When It Isn't Configured
Knowledge's AI search is scoped to your own space, cites what it used, and fails with an honest error instead of a degraded or fabricated answer.
The riskiest thing an AI search feature can do isn't returning a bad answer — it's returning a bad answer that looks confident. Knowledge's AI search endpoint is built around avoiding that specific failure, and the honest-failure design is the part most worth explaining.
Scoped to your own content
AI search queries AutoRag scoped strictly to the caller's own space_id. That scoping isn't incidental — it means a search against your docs can only retrieve from your docs, not from another workspace's content or from the model's general knowledge floating in unscoped. Grounding every answer in retrieved passages and citing them is the industry's converged-upon trust mechanism for AI knowledge tools specifically because it discourages hallucination and gives you something to check against in an audit or a legal review — not just a plausible-sounding paragraph you have to take on faith.
What happens when it isn't set up
Here's the part that's unusual enough to be worth a guide of its own: AI search depends on CLOUDFLARE_AUTORAG_TOKEN and AUTORAG_INSTANCE_NAME being configured for a given deployment. If they're not, the endpoint doesn't fall back to a degraded response, and it doesn't fabricate an answer to avoid an empty result. It throws a specific AutoRagConfigError, which surfaces to the caller as an explicit 503 — "AI search is not configured on this deployment yet." That's the whole point: a clear failure that tells you exactly what's missing beats a silent one that leaves you guessing whether the feature is broken, misconfigured, or just answering badly.
What this means if you're evaluating the feature
If you test AI search on a fresh deployment and get a 503 with that message, that's not a bug report — it's the feature telling you accurately that a configuration step hasn't happened yet. Confirm the two environment values are set for your deployment before concluding anything about search quality; you can't meaningfully judge answer quality on a path that hasn't been turned on.
Why this matters more than it looks like it should
A search feature that fails loudly and specifically when unconfigured is more trustworthy, not less, than one that always "succeeds" with something. If AI search silently degraded to keyword matching, or worse, produced an ungrounded guess when the real retrieval path wasn't available, you'd have no reliable signal for when to trust its answers. The explicit configuration error is what lets you trust every answer that does come back — you know the alternative wasn't a quiet substitute.