Putting the Open back in AI: RAG

Author's photo of one of the Emerald Lakes on the Tongariro Alpine Crossing in New Zealand/Aotearoa. Milky blue water with indistinct hills in a misty background and reddish rocks in foreground in shallow water near edge of lake

Continuing our theme of running large language models (LLM) locally on your PC for freei; in this post we build upon the local AI chatbot from part 1, improving the responses by retrieving data to make it more knowledgeable. To do this, we use a technique called retrieval augmented generation (RAG), that adds data to the prompt before it goes to the model.

Conventional wisdom says RAG is a magic bullet that stops LLMs from going off topic, and eliminates hallucinations. But, is this really true?

Let’s explore further by diving into how RAG works, and run a simple demonstration.

Continue reading

Putting the Open back in AI with Ollama

Author's photo of sub-alpine shrubbery on the Te Ara Tirohanga (Remutaka Trig Track) in New Zealand / Aotearoa

Did you know that you can run large language models (LLM) locally on your PC, free from the walled gardens of Big Tech? There are good reasons to do this. To start with, it’s a great way to keep your data local so it remains private. It also decentralises AI, fighting against the concentration of power into a few big playersi. Better yet, you can do all this for free…ii

Continue reading

To docker compose and not docker-compose

Docker compose is a tool for orchestrating the deployment of multiple containers, including networking, storage, health monitoring, and much more. It is like a super-power for building experimental systems, especially since it uses a text-based configuration file that can be version controlled and is easy to share.

Continue reading