A basic Retrieval-Augmented Generation (RAG) demo is surprisingly small:

Embed some documents.

Retrieve the closest chunks.

Add them to a prompt.

Ask an LLM to generate an answer.