Case study · LLM & RAG engineering

Benny, Dickinson's AI Assistant

Benny answers questions about Dickinson College by retrieving from official sources and passing them to an LLM. As an AI Software Developer I rebuilt its storage, retrieval and routing, and added the checks that stop it from quietly getting worse.

94%retrieval accuracy, up from 87%
88 sindex rebuild, down from 10+ minutes
−83%per-question routing cost
0behavioural regressions in the vector-store migration
01Problem

A college assistant has to be right, not just fluent. Benny draws on 28+ sources that aren't equally trustworthy, and an unofficial page must never be quoted as policy. Meanwhile every content update meant a full re-index of more than 10 minutes, retrieval missed questions it should have answered, and there were no automated tests: five bugs had merged without anyone noticing.

02Approach
Sources28+ documentsEach tagged with a trust tier
IngestContent-hash appendOnly changed content is re-embedded
StoreQdrant CloudBehind a swappable storage interface
RetrieveDense + BM25Fused with Reciprocal Rank Fusion
AnswerLLM routerAnthropic API, tool calling, prompt caching

Hybrid retrieval

Dense embeddings catch meaning while BM25 catches exact names and terms. Reciprocal Rank Fusion merges the two ranked lists so neither has to win outright.

Swappable storage

The vector store sits behind an interface, so moving from file-based Chroma to Qdrant Cloud changed no behaviour the benchmark could detect.

Router + prompt caching

A router prompt decides how each question is handled, with tool/function calling. Caching the stable part of the prompt cut per-question routing cost by 83%.

Trust-tier data model

Scoped with faculty and staff into maintainable, documented software. When sources conflict, official ones win, and unofficial content is never cited as policy.

03Results

Before and after

Measured on Benny's own 140-question benchmark and ingestion logs.

Retrieval accuracy

Hybrid dense + BM25 retrieval with RRF.

Before87%
After94%

140-question benchmark.

Index rebuild time

Full rebuild replaced by content-hash append.

Before10+ min
After88 s

"Before" was over 10 minutes and is drawn at 10, so the real gap is larger.

Routing cost per question

Prompt caching on the router.

Before100
After17

Relative cost, with "before" set to 100.

A benchmark every change must pass

Benchmark plus query logging are now the gate before anything ships.

First tests and CI

Added after five bugs had merged unnoticed.

Debugged a misleading A/B test

Traced inconsistent A/B results to the router giving different answers to the same question.