Voice & Audio Sesame Ends Its Free Preview: $20 a Month for Two Hours of Talk Time a Day, $100 for Ten Opinion 93% of Developers Have Merged AI Code They Did Not Fully Understand, and Only 13% of Teams Have a Plan for When It Breaks Coding Assistants Penn State Tested 5 Coding Agents Patch by Patch: 38% to 82% of Successful Runs Were Already Correct on the First Edit Microsoft Copilot Microsoft Will Turn Claude On by Default for Every UK Copilot Tenant on Dec. 9, and the Data Is Still Processed in the US Business SMIC's Revenue Jumps 34 Percent to $3.19 Billion as AI-Adjacent Chip Orders Push Its Fabs to 97.3 Percent Utilization Business SoftBank Leads $500 Million Into Agile Robots at an $8.5 Billion Valuation, With Nvidia and Hitachi in the Round News Claude Read 1,009 Pages of Gödel's Obsolete Shorthand in Days: 663 Theorems, About 400 Verified in Coq Security The FAA's $875 Million AI Air-Traffic Assistant Went Live at All 22 Centers. Three Days Later the Country Was Grounded. Voice & Audio Sesame Ends Its Free Preview: $20 a Month for Two Hours of Talk Time a Day, $100 for Ten Opinion 93% of Developers Have Merged AI Code They Did Not Fully Understand, and Only 13% of Teams Have a Plan for When It Breaks Coding Assistants Penn State Tested 5 Coding Agents Patch by Patch: 38% to 82% of Successful Runs Were Already Correct on the First Edit Microsoft Copilot Microsoft Will Turn Claude On by Default for Every UK Copilot Tenant on Dec. 9, and the Data Is Still Processed in the US Business SMIC's Revenue Jumps 34 Percent to $3.19 Billion as AI-Adjacent Chip Orders Push Its Fabs to 97.3 Percent Utilization Business SoftBank Leads $500 Million Into Agile Robots at an $8.5 Billion Valuation, With Nvidia and Hitachi in the Round News Claude Read 1,009 Pages of Gödel's Obsolete Shorthand in Days: 663 Theorems, About 400 Verified in Coq Security The FAA's $875 Million AI Air-Traffic Assistant Went Live at All 22 Centers. Three Days Later the Country Was Grounded.

Building a Working RAG Pipeline from Scratch

Index, retrieve, generate, evaluate — the minimum viable version, with the tuning knobs that matter most.

Retrieval-augmented generation sounds more complicated than it is. A working version is a few hundred lines, and most of the quality comes from three decisions.

Ingest and chunk

Convert your sources to plain text, then split on structural boundaries — headings, list items, paragraph breaks. Prefix each chunk with its heading path so a retrieved passage carries context. Keep tables intact.

Embed and store

Generate a vector for every chunk and store it with metadata: source, section, date, URL. Any vector store works at this scale; choose one that supports metadata filtering so you can restrict by date or source.

Retrieve hybrid, not pure semantic

Combine keyword search with vector search and merge results. Pure vector search misses exact identifiers, product codes and names that users type verbatim. Hybrid retrieval fixes this with modest extra complexity.

Generate with citations

Pass the top few chunks with their sources, and require the model to cite which chunk each statement came from. If it cannot cite, it should say the information is not available.

The three knobs that matter

  • Chunk size. One to three paragraphs. Test both ends on your own questions.
  • Number of chunks. Start at five. More is not better — extra chunks add noise and cost.
  • Similarity threshold. Below the threshold, refuse rather than guess.

Evaluate continuously

Keep a set of questions with known correct answers. Every time you change chunking or retrieval, re-run it. Without this, improvements are guesses and regressions go unnoticed.

Comments (0)

Log in to join the discussion

Log In

No comments yet