How can AI use your own documents?

Knowledge Videos

Short animated explainers, organised by subject.

How can AI use your own documents?

Retrieval-augmented generation: embed, retrieve, augment the prompt, generate.

Transcript

A language model only knows what was in its training data, which is frozen in time.

It cannot see your private documents, or yesterday's news, so it may simply guess.

Documents are split into chunks, and each chunk becomes an embedding: a point on a map of meaning.

Your question becomes a point too, and the nearest chunks are retrieved.

The retrieved chunks are pasted into the prompt, next to your question.

Now the model answers from real sources, and can even cite them.

Retrieve, augment, generate. That is retrieval augmented generation: it gives the model an open book.

More in this series