RAG
5 posts on RAG.

Ollama "truncating input prompt": the RAG that silently ignored half its context
A RAG prompt longer than Ollama's context window gets cut from the front, the API still answers 200, and the only trace is one WARN line in the server log. A measured repro on Ollama 0.40.18 and 0.12.10, the three fixes, why /v1 ignores num_ctx, and the flag that makes it fail loudly.
12 min read

What It Actually Costs to Run a RAG Pipeline: a Mac, Cloud CPUs and an H100
A case study on a RAG ingest over 18,000 drug leaflets, measured on an M4 Mac, two cloud CPU VMs and an H100 provisioned with Terraform on Chameleon Cloud. Where each phase should run, what it costs across four providers, and where my sample lied.
14 min read

A Local LLM Chatbot with Tool-Calling and RAG (No Vector Database)
How I wired Ollama into a real ASP.NET Core app with native tool-calling and a hand-rolled cosine-similarity RAG — no vector DB, no cloud API — and the concurrency bug that nearly broke it.
6 min read

Building a RAG Pipeline over 17,000 PDFs
A build log for a RAG system over thousands of real drug leaflets — PDF-to-markdown, section-aware chunking, a cross-encoder reranker, and GPU-scaled embeddings. The bugs that nearly sank it, with the numbers.
8 min read

Building a Privacy-First Local RAG System (End-to-End)
A practical, end-to-end guide to building a private RAG system that never leaves your machine — local embeddings, vector store, and LLM, with real code.
5 min read