Skip to main content

Vectors are not enough: hybrid search and reranking

· 7 min read

Most RAG tutorials have the same retrieval step: embed the question, ask a vector store for the nearest chunks, put them in the prompt. It works well on the demo questions, which tend to be phrased like the documents. Then someone pastes an error code into the box and gets five chunks about errors in general, none of them about that code.

That isn't a bad embedding model. It is what embedding search is for. This post is about the two pieces I would add before tuning anything else: keyword search next to the vectors, fused by rank, and a reranker over the result.

What goes in the context window

· 8 min read

Everything a model knows about the current request arrives as one block of input: your instructions, the tool definitions, the documents you retrieved, the conversation so far and whatever the last tool returned. The model has no other memory. If something is not in that block, it does not exist for this call.

Context windows are now large enough that it is tempting to put everything in and let the model sort it out. I think that is the wrong default. The window is a budget, and like any budget it is easier to spend well when you decide what each part is for.

What the Model Context Protocol actually standardises

· 8 min read

Every AI application wants to reach the same things: the repository, the issue tracker, a database, the documentation. Before the Model Context Protocol, each of those connections was written once per application. An integration built for one editor was useless in the next one.

MCP is the agreement that lets one integration work in every application that speaks it. It is much smaller than the noise around it suggests, and that is the best thing about it. This post is about what it actually pins down, checked against the current specification, revision 2026-07-28.

Why I put a gateway in front of every LLM call

· 8 min read

The first service that calls a model provider does it directly, and that is fine. By the fourth, each one holds its own provider key, has its own idea of a retry policy, and nobody can say what the company spends on models until the invoice arrives.

A gateway is one service that sits in the path of every model call. It is not clever. It holds the keys, counts the money, enforces limits, writes down what happened and moves traffic when a provider is down. Most of that is ordinary plumbing. One part, retrying without paying twice, is subtle enough that it deserves most of this post.

Why I built the Orion family

· 5 min read

Most .NET backends end up needing the same dozen things: validation, a distributed lock, an audit trail, an outbox, encrypted columns, typed IDs, idempotent endpoints, rate limits, retries. Each team builds them again, a little differently, and each version is wrong in its own small way.

The Orion family is my answer to that: small, focused libraries for those problems, built to one quality bar and published on NuGet.

Why I built Derbent

· 5 min read

I use more than one coding agent on the same repositories. Claude Code works on one thing, Codex on another, and now and then I ask Copilot CLI something. Each of them is good at its job, and none of them knows what the others did.