C. Desivo
Case

LLM features that can't make things up

§← All cases

DirectRetrieval: AI answers that can't be made up

A business writes its facts as plain sentences: opening hours, delivery area, prices. Customers ask in their own words, typos and slang included, and the assistant replies with the fact that answers them, word for word.

The language model never writes the reply. A JSON schema limits its output to one of the approved facts, plus a yes or no on whether that fact really answers the question. If none does, the customer gets an honest "I'll ask the team" instead of a guess. That also limits what a prompt injection can do: the worst case is picking the wrong approved fact, never saying something new.

The video shows the idea as a finished product: the fact editor and the live database values are a concept. Picking the right fact, or none, is what the library does today, and it is what runs the live demo on this site. It works with OpenAI's API or with local models through Ollama and llama.cpp.


Other LLM work

Beyond DirectRetrieval, I've built LLM features for other applications: a generator that proposes polls from a subject and a target audience, returning structured data ready to publish; customer-support chatbots that answer from a company's own documents with retrieval-augmented generation (RAG); and LLM-as-judge setups, where carefully written prompts make a model grade other outputs consistently.

Related: Stop your chatbot from making things up