Step by step: Index documents
- The loader pulls documents from the sources and extracts their raw text.
- The text is cleaned and split into overlapping chunks.
- Each chunk is embedded and its vector is stored with its source metadata.
Examples / Pipeline diagrams
How documents become answers in retrieval-augmented generation: ingestion, chunking, embeddings and a vector store, then retrieval and a model call at question time.
Draw a pipeline diagram of a retrieval-augmented generation system: document sources are loaded, cleaned, split into chunks, embedded and stored in a vector database; at question time the question is embedded, similar chunks are retrieved and reranked, and a language model writes the answer with citations.