Skip to the page
Tecyfy

Build a RAG app: paste it, use a ready-made tool or build it

Should you build your own RAG or use a ready-made tool? We built 3 versions on the same washer manual, pasting the whole manual, Gemini's File Search and our own pipeline, and asked each the same 20 questions with known answers. This lesson shows what each one does, how to test a RAG app with a question set, the scores, speed and cost we got, and the questions RAG still gets wrong.

Lesson 3 of 3 · 10 min read

Take this lesson into your AI

Open in ChatGPT (new tab)Open in Claude (new tab)
The full video, 11:33, published 31 October 2026. YouTube loads only when you press play.

3 ways to build it

Watch this part · 52 sBuild a RAG 3 Ways: Paste, Ready-Made Tool or Your Own? We Tested All

Every RAG app answers the same kind of request: "My washer shows E21. What do I do?", asked of a manual the model never read. What is RAG? followed that question through the 4 steps, and How RAG search works took the search apart. This lesson builds the thing, 3 ways, on the same Sudsley S7 manual.

The Paste build reads the whole manual every time. The Ready-made build is a tool you use: upload the manual and it does the rest. The Home-built build is ours, made from the parts of the search lesson.

One question proves little, so we wrote 20, each with a known answer from the manual, and asked every build every one, twice, on 8 October 2026. The scores, speed and cost below are what we got.

Just paste it

Watch this part · 51 sDo You Even Need RAG? Just Paste the Whole Document Into the AI

The Paste build is not really RAG. It hands the model the whole manual with every question, plus the same rules as before: use only these pages, say which page, and say if you don't know.

Our manual is small: 60 pages come to about 9,300 tokensTokenThe small piece of text a language model reads and writes, often part of a word. Prices, limits and the context window are all counted in tokens., a small slice of what today's models read at once. The rule of thumb from the first lesson applies: under about 200,000 tokens, roughly 500 pages, you can put it all in.

We tested it anyway because it is the baseline. Any search we add has to beat "just read everything", or it is not worth building.

The ready-made tool

Watch this part · 1:28Gemini File Search Explained: What a Managed RAG Tool Does For You

The Ready-made build is what builders call a managed tool. We used Gemini's File Search: make a store, upload the manual, and that is the setup.

Inside, it does the first 2 steps of RAG for you. It cuts the file into chunksChunkingCutting documents into smaller passages before they are embedded for retrieval, so a search returns the part that answers a question rather than a whole file., embeds them, stores them, and at question time finds the closest by meaning. You can set the largest chunk size and how much neighbouring chunks overlap. Answers come with citations naming the part of your file used, and the page number for a document with pages.

You pay once for the embeddings when your files are indexed. Storage is free, and so is embedding each question. Then you pay the normal price for the model's input and output tokens, and the input includes the chunks the tool pulls in. On the free tier, input and output tokens are free on the models it offers.

OpenAI's file search is the same idea with more of the search lesson built in: it runs semantic and keyword search, merged, and its search takes a ranker setting. We tested Gemini's tool; OpenAI's we describe from its documentation.

The upside of a managed tool is nothing to build. The catch is that the choices are made for you: how chunks are cut, which search runs and how results are ranked come as a few settings, not the whole machine.

Your own pipeline

Watch this part · 1:25The 5 Parts of a Home-Built RAG Pipeline (Chunks to Reranker)

The Home-built build is the search lesson, built for real, in 5 parts.

  1. The cards. We cut the manual along its own structure, one card per table row or paragraph, and gave each a short note: the manual, the page, the heading.
  2. An embedding model turns every card and every question into a list of numbers. We used Google's.
  3. Somewhere to keep the numbers and find the nearest fast, a vector databaseVector DatabaseA database built to store embeddings and quickly find the ones closest to a query, which is how AI apps search by meaning.. With 237 cards ours is a file. With millions you would want a real one, built to search that many quickly.
  4. A keyword index beside it, for exact codes and part numbers, and a step that merges the 2 lists: hybrid searchHybrid SearchRunning a keyword search (usually BM25) and a vector search for the same query and merging the 2 ranked lists, so exact terms like a product code and loose wording like "money back" are both found..
  5. A rerankerRerankingA second search step that reads each candidate passage together with the question and scores how well it answers, so the best few of a fast first search go to the model in the right order. that reads the question with the top 20 cards and orders them. The top 3 then go into the same prompt as the Paste build, to the same model.

It is more work, and every choice is yours. You can cut a table row by row, add notes, change how many cards go to the model and see exactly why a card won.

Where LangChain and LlamaIndex fit

Watch this part · 47 sLangChain vs LlamaIndex: Do You Need a Framework for RAG?

You will hear LangChainLangChainAn open-source framework for building AI agents: create_agent runs a model that calls tools in a loop, with integrations for most model providers. It runs on LangGraph, the lower-level runtime from the same company. and LlamaIndexLLamaIndexA data framework for connecting LLMs to external data. a lot. They are toolkits, not a new kind of RAG. LangChain gives one interface for chat models, embeddings and more across providers, so switching a model is a small code change. LlamaIndex is an open-source toolkit for RAG and agents over your own data, with ready-made ways to load, index, store and query it.

They help when you would otherwise write a lot of glue between the parts. They are not required: our Home-built build is about 110 lines of code, with no framework. Whichever you choose, the parts and the questions to ask about them are the ones from the search lesson.

How to test it

Watch this part · 1:22How to Test a RAG App: Build an Evaluation Set (20 Questions)

A RAG app is tested with a question set, which builders call an evaluation setEval SetThe list of test cases an LLM app is graded on after every change. Each case is an input and what a good answer must do, so a score going up or down shows whether the change helped.. Ours has 20 questions, each with the page that answers it and the facts a right answer must contain.

We wrote it before running anything, so it could not be bent to the results. It has everyday wording like "the water just sits there", codes and part numbers, 2 questions whose answer is a whole list, and 2 the manual cannot answer, to see whether a build admits it.

Then 2 measures. Did the search bring back the right page? That is retrievalRetrieval EvaluationTesting the search step of a RAG system on its own, with questions whose answering passages you know, and scoring it with recall at k, the share of those passages found in the top k results.. Is the answer fully right, every fact and nothing wrong? That is answer quality, and it is the score that counts.

Keep them apart, because they point to different fixes. If the right page never came back, fix the search. If it came back and the answer is still wrong, look at what was handed over and at the prompt. And keep one fair rule: the same model and the same instructions in all 3 builds, so the only difference is how the pages are found.

The results

Watch this part · 2:10RAG Test Results: Paste vs Gemini File Search vs Home-Built

First, E21. All 3 builds got it right: switch off, clean the drain filter behind the flap at the bottom right, check the hose. All 3 pointed to page 34.

Then all 20, run twice, counting answers that were fully right:

BuildRun 1Run 2
Paste the whole manual19 of 2019 of 20
Ready-made (Gemini File Search)19 of 2018 of 20
Home-built, first version14 of 2014 of 20
Home-built, fixed19 of 2018 of 20

The surprise was the first Home-built score. By the first measure our search was perfect: for every question the manual answers, the right page was among our 3 cards. So why 14?

Because the right page is not the same as the right text. A list of 4 error codes does not fit on 3 cards. A few answers left out a step that was on the card. And one was our own bug: our cards had dropped every bulleted list, so the card for the Quick 30 wash ended at "To set it:" with no steps. Right page, missing text, and the model rightly said it did not know.

That is what a question set is for. It found our bug. We fixed the cards so a list stays with the paragraph above it, handed over 10 cards instead of 3, and ran all 20 again, twice: 19 and 18, level with the other 2.

Speed and cost per question changed the picture. The Paste build took about 4 seconds and about 2 cents. The fixed Home-built build took about 5 seconds and under 1 cent. The Ready-made build took about 24 seconds and, because it pulls in big chunks, about 3 cents, the most of the 3. One question tripped it up completely: asked about Wi-Fi, which the manual never mentions, the other 2 said "I don't know" in about 4 seconds. The Ready-made build gave no answer at all, once an empty reply after 2 minutes, once still working when we stopped it at 3.

Which one should you pick?

Watch this part · 52 sPaste, Buy or Build? How to Choose Your RAG Approach

Small and stable, like one manual: paste it all in. There is nothing to build, and the model sees everything.

Bigger or changing, and you want it working this week: a managed tool. Upload and go, but time it and price it on your own questions first. In our test it was the slowest and the most expensive per question.

Build your own when the defaults get in your way: tables that need cutting row by row, codes and part numbers that need keyword search, rules on who may see which document, data that cannot leave your own servers, or a cost you need to control at scale.

Whichever you pick, keep the question set, and run it again every time you change something.

Where RAG still fails

Watch this part · 1:28Where RAG Still Fails: 6 Questions AI Gets Wrong (We Tested)

List questions are the classic trap. "List all the F codes" has 4 codes in 4 rows of a table. With 3 cards, our build listed 3 and presented them as the full list. Nothing warned us; only the question set caught it. With 10 cards, it got all 4.

A code that is not there went better. Asked "What does E99 mean?", every build said "I don't know", with no guess from the E codes that look alike. That is the instructions from the first lesson doing their job.

Questions about the whole document are hard: "Summarise this manual" needs every page, not the 3 closest. Pictures and diagrams are a problem when only the text is embedded, because a question about a diagram has nothing to find; Gemini's File Search can now embed and search images as well. And RAG is only as good as its documents. An old manual gives old answers, and 2 documents that disagree give the model 2 answers to choose from.

One more for companies: who may see which document. A search that finds everything can show everyone everything. Managed tools let you tag files with metadata and filter on those tags.

The 3 builds, and a quick test

Watch this part · 1:06Build a RAG in 60 Seconds (+ Quiz: Why Does a List Question Fail?)

3 ways to answer from your documents: paste it all for small and stable, a managed tool to start fast, your own pipeline for control. Your own is the parts of the search lesson: chunks with notes, an embedding model, a vector database and a keyword index, a merge, a reranker and the model. Frameworks are glue for those parts, not a different kind of RAG. And test it with a question set that measures 2 things, whether it found the right page and whether the answer is fully right, the second being the score that counts.

A quick test. A list question keeps failing: the answer is spread over 4 rows, and your app hands the model only the top 3. What do you change? Hand over more chunks, by raising the top-k or cutting bigger chunks for tables like that one. Then run the question set again, to check nothing else broke.

Start with 20 questions

Watch this part · 37 sThe Most Useful Thing We Learned Building RAG 3 Ways

Don't start with the fanciest build. Start with 20 questions you know the answers to. They tell you whether you need RAG at all, and which kind, and when a change breaks something, they tell you that too.

That is the series: one question, "My washer shows E21", from the first step to a working app. If the bill matters as much as the score, our token cost calculator prices the text each build sends to the model.

What changes for you

It is easy to start a RAG app by picking the fanciest tool. Start instead with 20 questions whose answers you know, because they tell you whether you need search at all, which kind, and what broke when the score drops.

Try it with your own AI

Catch the list trap, then write your own question set

This takes about 10 minutes in any assistant. The first 2 prompts show the most common way a RAG app goes quietly wrong. The third turns a document of your own into the question set this lesson is about.

  1. Send the first prompt in a new chat. It is what a RAG app sends when its search hands over only the top 3 cards and the answer is spread over 4.
  2. Send the second prompt in a new chat. It is the same message with all 4 rows, as if the app handed over more cards.
  3. Send the third prompt in a new chat, with a document of your own pasted where it says, one with nothing private in it.
  • Prompt 1. Top 3 cards for a list question

    Answer the customer's question using only the cards below. Say which card you used. If the answer is not in these cards, say you don't know. Card 1, error codes: F06 door lock fault. Switch off for 1 minute and close the door firmly. Card 2, error codes: F07 motor fault. Call a technician. Card 3, error codes: F09 drain pump fault. Clean the drain filter, then call a technician if it returns. Question: List all the F codes for the Sudsley S7 washer and what each one means.

  • Prompt 2. The same question with 4 cards

    Answer the customer's question using only the cards below. Say which card you used. If the answer is not in these cards, say you don't know. Card 1, error codes: F06 door lock fault. Switch off for 1 minute and close the door firmly. Card 2, error codes: F07 motor fault. Call a technician. Card 3, error codes: F08 water level sensor fault. Call a technician. Card 4, error codes: F09 drain pump fault. Clean the drain filter, then call a technician if it returns. Question: List all the F codes for the Sudsley S7 washer and what each one means.

  • Prompt 3. Write a question set for your own document

    Below is a document I want an AI app to answer questions from. Write a test set of 12 questions for it, as a table with 4 columns: the question, the facts a fully right answer must contain, where in the document the answer is, and the kind of question. Include: 4 questions in the everyday words a user would type, not the document's words; 3 that use an exact code, number or name from the document; 2 whose answer is a list spread over several places; 1 that needs the whole document; and 2 the document cannot answer, with "not in the document" as the right answer. [paste your document here]

    Fill in the brackets before you send it.

What to look for

  • The first answer lists F06, F07 and F09 and probably presents them as the full list. Nothing in its reply warns you that F08 exists, because the card never reached it. That is the list trap, and only a question with a known answer catches it.
  • The second answer lists all 4. The model did not get smarter between the 2 chats. It got more cards.
  • In the third answer, check the "not in the document" questions really are not answered anywhere, and that the facts column is specific enough to mark an answer right or wrong. Save the table. It is the test you run every time you change your app.

Check yourself

3 questions, each in a new situation

  1. 1. Your RAG app hands the model the top 3 chunks. A question whose answer is spread over 4 rows of a table keeps coming back with 3 of them. What do you change, and what do you do after?

  2. 2. You test a RAG app with 20 questions. For every question the right page was retrieved, yet only 14 answers are fully right. What should you check before anything else?

  3. 3. A team has one 60-page product manual that changes once a year and wants an assistant to answer from it this week. Which build does this lesson suggest trying first?

Sources

Where each fact comes from

  1. 1Introducing Contextual Retrieval
  2. 2File search
  3. 3Gemini Developer API pricing
  4. 4File search
  5. 5Retrieval
  6. 6LangChain overview
  7. 7LlamaIndex Framework