AlgoViz

Retrieval-Augmented Generation (RAG)

medium 12 min

A retrieval-augmented system maintains a searchable collection and consults it for each question.

A minimal RAG loop

Read it, run it, change a line and run it again.

Loading editor…

Toy embeddings (word counts) so it runs anywhere. Real systems use an embedding model and a vector index.