← Back to list

I Built a RAG Pipeline From Scratch. Here’s What the Tutorials Skip.

Everyone explains what RAG is. Almost nobody explains what breaks when you build one.

Jayshree Gupta · 2026-05-29 22:32 · 0 claps · 1.6 min read
#rags #generative-ai #n8n #ai-engineering #vector-database
Open on Medium ↗
Wiki topics: RAG · RAG & Retrieval AI · AI · General

I Built a RAG Pipeline From Scratch. Here’s What the Tutorials Skip.

Everyone explains what RAG is. Almost nobody explains what breaks when you build one.

So here’s the short version — what I built, what actually failed, and the fixes.

The Stack (All Free Tier)

  • n8n — orchestration
  • Pinecone — vector store
  • Cohere Embed-English-v3.0 — embeddings (1024 dimensions)
  • Groq Llama 3.1 8B — generation
  • Knowledge base — my published Salesforce Ben article on Agentforce in the Public Sector

Two separate workflows. Ingestion runs once. Query runs on every message. Never couple them.

5 Things That Actually Broke

1. The file path n8n only reads from C:\Users\{username}\.n8n-files. Not Desktop. Not Documents. That exact path — and use forward slashes: C:/Users/user/.n8n-files/*.pdf

2. Embedding dimensions must match your vector store Pinecone auto-selected llama-text-embed-v2 (1024 dimensions). Cohere's default is 4096. Mismatched dimensions = failed ingestion. Always check your index configuration before choosing an embedding model.

3. The 2017-page PDF More documents ≠ better retrieval. n8n hung for five minutes and stalled completely. Start small. One focused document ran the full ingestion pipeline in under 12 seconds — 56 vectors, clean.

4. Chunk size is a design decision 500 tokens, 50-token overlap. Smaller chunks = more precise retrieval. My article split into 28 chunks. At query time, the top 4 are retrieved. That’s ~2000 tokens of relevant context before the LLM is even involved.

5. RAG doesn’t prevent hallucination by itself The system prompt does. Mine is explicit: “Answer using ONLY the context retrieved. If the answer isn’t there, say so.” Without that instruction, the model answers from training data anyway.

The Result

Query response: ~968ms. Cost: zero.

When I asked about public sector Agentforce deployment challenges — the agent pulled exact language from my article. Not a generic answer. My answer, retrieved correctly.

That’s retrieval working.

What’s Next

Multi-agent routing — one router, two agents, one entry point. More documents — PSS policy docs, Agentforce implementation guides. Evaluation framework — how I validate before calling a build done.

The tutorials give you the happy path.

Build the thing. Hit the errors. That’s the only way to know if you actually understand it.


메타데이터
post_id
f73f867f93db
slug
i-built-a-rag-pipeline-from-scratch-heres-what-the-tutorials-skip-f73f867f93db
url
https://medium.com/@QuantumQuill_Jayshree/i-built-a-rag-pipeline-from-scratch-heres-what-the-tutorials-skip-f73f867f93db
canonical_url
https://medium.com/@QuantumQuill_Jayshree/i-built-a-rag-pipeline-from-scratch-heres-what-the-tutorials-skip-f73f867f93db
author_url
https://medium.com/@QuantumQuill_Jayshree
status
ok
fetched_at
2026-06-09 15:37:30