ragcreator

ragcreator

Guide

What is RAG?

RAG, short for retrieval-augmented generation, is a way to make an AI answer from your documents. A retriever finds the passages that match the question, and the model writes its answer from those passages, so each sentence can point at the passage behind it, which is how this site teaches it. The name comes from a 2020 research paper by Lewis and colleagues.

See it run on a real handbook

Step 1, retrieve. The question is "Can I work remotely?" The search finds one passage:

handbook.pdf, page 9 Section 3.2 Remote work. You may work remotely up to two days a week. Tell your team which days in the shared calendar.

Step 2, hand it over. This is the whole prompt the AI receives: the rules first, then the question, then the passage:

Answer only from the sources below. After every sentence, cite the source number like [1]. If the sources do not contain the answer, say so.

QUESTION: Can I work remotely?

[1] handbook.pdf p.9: Section 3.2 Remote work. You may work remotely up to two days a week. Tell your team which days in the shared calendar.

Step 3, answer. The AI writes from that passage, and the receipt checks every sentence against it. Run the X-ray to see it on your own AI.

The sample is the free X-ray's handbook, 5 short pages. Nothing here is typed in by hand: the page runs the X-ray's own search and the free text splitter's own cuts.

Why not just ask the AI?

An AI asked about your handbook, your lease or your policy has never read it, so it fills the gap with something plausible. RAG hands it the right passages first and tells it to answer only from them.

The five parts

Load the document, chunk it into passages, embed each passage so it can be searched by meaning, retrieve the passages that match a question, and answer from them with a citation on every sentence.

Sources

Keep going

Build the whole pipeline on your documents

Works with the AI you already use: Claude, ChatGPT, any. We do not make the model smarter. We make your pipeline visible.