Experiment · AI Labs

AI Lab: Retrieval With the Reasoning Exposed, and Agents With a Boundary

A working RAG pipeline you can watch think, running on the same engine that answers questions on this site, plus a demonstration of the guardrails that stop an agent doing something it should not.

AI Lab Updated 2026-08-10 745 words · about 3 min read
This is not a mock-up

Everything below runs against the retrieval engine that powers Ask BvLogic in production, over 3,900 passages of our own published work. The numbers you see are the numbers the engine actually computed for your question, in the milliseconds it took. Nothing is pre-recorded and nothing is staged.

Glass-box retrieval: watch a RAG pipeline think

Most RAG demos show you an answer and hide the machinery, which is precisely the part that decides whether the answer is any good. Ask something and watch every stage: how your words are normalised, which one carries the meaning, and how passages are scored against it.

Try an American spelling, or a word we have never published, and watch what the pipeline does with it.

Guardrails: watch an agent get stopped

The difference between a model that answers and an agent that acts is that the second one has already done something when it is wrong. This is a simulation of an agent attempting actions against a controlled boundary, so you can see which are allowed, which need a human, and which are refused outright.

This one is illustrative. No system is contacted and nothing is executed. The policy below is a real policy shape we implement; the actions are examples chosen to show each rule firing.

Everything above this line runs. The retrieval demo is not a recording or a mock-up: it calls the same endpoint, the same index and the same ranking code that answers questions on Ask BvLogic, over 3,900 passages of our own published work.

Why we show the machinery instead of the answer#

Every RAG demonstration you have seen shows a question going in and a confident paragraph coming out. That hides the only part that determines whether the answer is worth anything.

An answer looks the same whether the system found the right passage or the wrong one. The difference is in the retrieval, and retrieval is where these systems actually fail: on chunking, on spelling, on a word that means something different in your corpus than in general English. If you cannot see that layer you cannot judge the system, and you certainly cannot judge the vendor.

So the demo shows it. Type an American spelling and watch it fold. Type something we have never published and watch the pipeline notice, and then say so.

The four things worth watching#

Your words get normalised. British and American spellings fold to one token, and word families collapse to a shared stem. Without this, a question about migrating cannot match a guide about migration, which is most of what we have written on the subject. We found that defect by testing with the four questions a prospect actually asks, and it was invisible until then.

One word usually carries the question. In "how do I modernise my data centre", the meaning is almost entirely in modernise. On this site centre is a common word that means Knowledge Center and Research Center, and it appears in 71 passages that have nothing to do with data centres. The highest-information term becomes the pivot, and a passage that misses it is not answering your question however well it scores on the common words.

Scoring is BM25 plus two corrections. An editorial weight, because a published position is worth more than a card grid. And a coverage measure weighted by information rather than by word count, so a passage matching the rare specific term beats one matching the common ones repeatedly.

It refuses. If the pivot is essentially absent from the corpus, the system says we have not published on this instead of returning four loosely-related pages. Ask it whether we sell tractors.

That refusal is the feature. A system that always answers is a system whose answers mean nothing.

The agent demo, and what it is#

The second demo is a simulation, and it says so on the page. No system is contacted and nothing executes. What is real is the shape of the policy, because it is the one we implement.

The distinction that matters: a model that is wrong gives you a bad answer. An agent that is wrong has already done something. So the question stops being accuracy and becomes authority.

  • An allow-list, not a deny-list. Anything not named is refused.
  • A value ceiling. A $40 refund is inside it; $40,000 is held for a person.
  • A reversibility test. Deletion has no reversal path, so no measured accuracy makes it safe to automate.
  • A blast-radius ceiling. Emailing 12,000 people is one mistake reaching everybody at once.
  • A trust boundary on retrieved content. An instruction found inside a document is data, never direction. That is prompt injection, and the boundary holds because it sits outside the model rather than being requested inside the prompt.

Notice that in the demo the agent never decides to stop. Something outside it stops it. A guardrail the model can be argued out of is not a guardrail, it is a suggestion.

What this would look like over your content#

The interesting work in a retrieval system is almost never the model. It is the corpus: what goes in, how it is chunked, what a passage is allowed to claim, and how the system behaves when it does not know. Our own index took a day to build and several rounds of finding out it was wrong.

Over your documentation, your policies, your support history or your contracts, the shape is the same and the failure modes are the same. What changes is the domain vocabulary, and that is exactly where the pivot logic above earns its place.

If you want to see it against your own material rather than ours, tell us what you are working with.

What else is coming for AI Lab

Experiment Ready

What we tried, and what it showed.

Diagram Not yet

How it is put together.

Worked Example Not yet

A run, in full.

FAQ Not yet

What people ask about this one.