Chunking documentsintermediate
A model can only read so much at once, so you cut the document into overlapping pieces — the overlap is what stops an answer being split in half at a boundary.
The whole pipeline end to end: upload a .txt, chunk and embed it, answer a question from it, and cite which chunks you used.
A question returns an answer plus the ranked chunks it was drawn from.
Published in full, before you start — every point is one of these and there is nothing else.
A model can only read so much at once, so you cut the document into overlapping pieces — the overlap is what stops an answer being split in half at a boundary.
An embedding turns text into a list of numbers where similar meanings end up close together — that is what lets you search by meaning instead of by keyword.
Cosine similarity measures the angle between two embeddings; sorting your chunks by it is the entire retrieval half of RAG.
Talking to Claude is an ordinary HTTP POST — a model id, a max token count, and a list of messages.
An AI answer with no sources cannot be checked, and an answer that cannot be checked cannot be trusted — showing which chunk each claim came from is the whole point of RAG.