cachly← All posts
Search

My vector search ran on zero embeddings across 506 records. The benchmark said 21% to 40%.

Silent fallback

You ship a vector search upgrade, measure real gains on a benchmark, and move on. In production it has been silently falling back to plain keyword search.

A real improvement that never shipped

The benchmark was clean: semantic search recall went from 21 percent to 40 percent. Better matches, same test set, same method, checked twice.

Then someone looked directly at production storage instead of trusting the benchmark. Zero vectors, across 506 stored records.

The search path has a rule: no vectors, fall back to plain keyword matching. It followed that rule exactly, and it did so without saying a word.

Why 'it still returns results' hid the problem

From the outside, nothing looked wrong. Searches still came back with answers. They were just the answers a plain keyword match would have given anyway - the semantic layer was not doing anything at all.

A feature that degrades to something that still technically works is the hardest kind of outage to notice, because every symptom of it also has an innocent explanation. Fewer good matches looks like a bad query, not a missing subsystem.

The benchmarked gain was real. It also never happened once for a single real search, because the thing being measured was not the thing that was running.

The question worth asking about every feature that can degrade

For anything that has a fallback path: how would I know it is currently on the fallback, and not the real thing?

If the honest answer is 'I would not,' that is not a small gap. It is the difference between a measured result and a real one, and nothing before this told them apart.

Make the fallback visible, not just functional

Four additions, and none of them require touching the search logic itself.

1. Count what the feature depends on (vectors, an index, a
   cache, a model) once per process, not once per request.
2. Log that count exactly once at startup, and again whenever
   it changes -- not on every request, or the log becomes
   noise nobody reads either.
3. Put the count next to the feature's own output in whatever
   diagnostic or admin view already exists.
4. Pick a floor (0 is a good start) and add a check that runs
   on its own, so a silent fallback shows up unasked.

The floor does not need to be clever. It needs to exist, and it needs to run without a human remembering to check it.

What changed once the fallback could be seen

The count is now printed once at startup and checked by something that runs on its own. A silent drop to zero shows up as a finding, not as a slightly worse afternoon nobody could explain.

The lesson is not about search specifically. Anything that can quietly switch to a worse mode needs a place where that switch is visible - otherwise the measured version and the running version are two different products wearing one name.

cachly.dev

For solo developers, teams and whole companies

Explain it once. Every AI knows it.

Shared team memory between your code, your tickets and your AI. Hosted in the EU, in every tool. cachly keeps the fixes, the decisions and the traps, so the next session starts with them. Claude Code, Cursor, Copilot, Windsurf, Codex, Gemini CLI and JetBrains all read it. Free for one project, no card needed.

Servers in the EU · one command, restart your editor, done · 1 project free

Four ways to install

Claude Code
/plugin marketplace add cachly-dev/cachly-mcp
/plugin install cachly-brain@cachly

Then turn on auto-update once: /plugin → Marketplaces → cachly → Enable auto-update

Any MCP editor
npx @cachly-dev/mcp-server@latest autopilot