{"schemaVersion":"1.0","source":"The Workflow Finder","sourceUrl":"https://www.theworkflowfinder.com","license":"Free to use with attribution and a link to the cited page","generated":"2026-08-28","workflow":{"title":"Build a Retrieval-Augmented Generation Pipeline Over Your Own Documents","slug":"build-a-rag-pipeline-over-your-own-documents","url":"https://www.theworkflowfinder.com/workflows/build-a-rag-pipeline-over-your-own-documents","description":"Ground an open-weight model in your own documents so it answers from what you actually wrote, not from what it guesses, without fine-tuning anything.","difficulty":"Advanced","timeEstimate":"3-4 hours, one-time setup","schemaDuration":"PT4H","expectedResult":"A working pipeline that retrieves the most relevant chunks of your own documents for a given question and hands them to a local model as context, instead of relying on the model's training data or a costly fine-tune.","tags":["Models","Developer Tools","Retrieval"]},"steps":[{"position":1,"title":"Run a Local Open-Weight Model","instructions":"Install Ollama and pull an open-weight model that fits your hardware. This becomes the model that actually generates answers, running entirely on your own machine rather than a hosted API.","input":"Workflow inputs: the topic, goal, or raw materials the user is starting from.","output":"Handoff artifact consumed by Step 2 (\"Chunk and Embed Your Documents\").","ioProvenance":{"input":"structural","output":"structural"},"toolSlots":[{"slug":"ollama","name":"Ollama","url":"https://www.theworkflowfinder.com/tools/ollama","category":"Developer Tools","pricing":"free","capabilities":["API integration"],"hasApi":true}]},{"position":2,"title":"Chunk and Embed Your Documents","instructions":"Use LlamaIndex to split your source documents into overlapping chunks and generate embeddings for each one. Chunk size is the single most consequential setting here: too large and irrelevant text rides along with the answer, too small and the model loses surrounding context.","input":"Output of Step 1 (\"Run a Local Open-Weight Model\").","output":"Handoff artifact consumed by Step 3 (\"Store the Vectors in Chroma\").","ioProvenance":{"input":"structural","output":"structural"},"toolSlots":[{"slug":"llamaindex","name":"LlamaIndex","url":"https://www.theworkflowfinder.com/tools/llamaindex","category":"Developer Tools","pricing":"free","capabilities":["API integration","Multi-step agent orchestration"]}]},{"position":3,"title":"Store the Vectors in Chroma","instructions":"Load the embedded chunks into a local Chroma vector database. Chroma's job is narrow and specific: given a query, return the chunks whose embeddings are closest to it, fast.","input":"Output of Step 2 (\"Chunk and Embed Your Documents\").","output":"Handoff artifact consumed by Step 4 (\"Wire Up the Retrieval-Then-Generation Chain\").","ioProvenance":{"input":"structural","output":"structural"},"toolSlots":[{"slug":"chroma","name":"Chroma","url":"https://www.theworkflowfinder.com/tools/chroma","category":"Developer Tools","pricing":"freemium","capabilities":["API integration"]}]},{"position":4,"title":"Wire Up the Retrieval-Then-Generation Chain","instructions":"Connect LlamaIndex's query engine so that every incoming question first retrieves the top-matching chunks from Chroma, then passes them to your local Ollama model as context before it writes an answer. The model never answers from memory alone, it answers from what was actually retrieved.","input":"Output of Step 3 (\"Store the Vectors in Chroma\").","output":"Handoff artifact consumed by Step 5 (\"Evaluate Retrieval Quality, Not Just Answer Quality\").","ioProvenance":{"input":"structural","output":"structural"},"toolSlots":[{"slug":"llamaindex","name":"LlamaIndex","url":"https://www.theworkflowfinder.com/tools/llamaindex","category":"Developer Tools","pricing":"free","capabilities":["API integration","Multi-step agent orchestration"]},{"slug":"ollama","name":"Ollama","url":"https://www.theworkflowfinder.com/tools/ollama","category":"Developer Tools","pricing":"free","capabilities":["API integration"],"hasApi":true}]},{"position":5,"title":"Evaluate Retrieval Quality, Not Just Answer Quality","instructions":"Run a sample of real questions through Ragas to score whether the retrieved chunks were actually relevant and whether the generated answer stays grounded in them. A pipeline can produce a confident, fluent answer built on the wrong retrieved chunk, and that failure mode is invisible unless you're scoring retrieval specifically.","input":"Output of Step 4 (\"Wire Up the Retrieval-Then-Generation Chain\").","output":"Final workflow output: A working pipeline that retrieves the most relevant chunks of your own documents for a given question and hands them to a local model as context, instead of relying on the model's training data or a costly fine-tune.","ioProvenance":{"input":"structural","output":"structural"},"toolSlots":[{"slug":"ragas","name":"Ragas","url":"https://www.theworkflowfinder.com/tools/ragas","category":"Developer Tools","pricing":"free","capabilities":["API integration"]}]}]}