惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
腾讯CDC
Jina AI
Jina AI
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
WordPress大学
WordPress大学
Hugging Face - Blog
Hugging Face - Blog
T
The Blog of Author Tim Ferriss
小众软件
小众软件
M
MIT News - Artificial intelligence
MyScale Blog
MyScale Blog
D
Docker
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
月光博客
月光博客
L
LangChain Blog
F
Fortinet All Blogs
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - Franky
C
Check Point Blog
U
Unit 42
人人都是产品经理
人人都是产品经理

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
RAG should never be your default
Chou · 2026-06-14 · via DEV Community

Vector RAG is the reflexive answer to "give the model more context," and when I built a production tutoring AI, I reached for it too. The product is simple: a student uploads a photo of a problem, and our tutor explains it step by step and produces an answer. Our client also had a large database of past problems, stored as images — and of course we wanted to leverage it. So the system retrieved the most similar past problem and fed it, together with its answer, into the model to help generate a solution. It was such an obvious move that I never questioned it.

It performed poorly.

I went hunting for the usual suspect: retrieval quality. I tried different retrieval strategies, from matching on the problem description to matching on the image content. I benchmarked different embedding models, from single-vector to late-interaction. None of it moved the needle. If retrieval quality wasn't the problem, where was the bug?

Vector RAG represents text or images in an embedding space and returns the stored chunk whose meaning is closest to the query. In other words, it optimizes for exactly one thing: semantic similarity to what you've already stored. Hidden inside that is a silent assumption — that the most similar stored item is the one the model needs. For FAQs or document lookup, the assumption holds: the most similar passage really is the right one, so RAG is never wrong there, and reaching for it feels so natural that the assumption never surfaces. The tool isn't the problem; it does exactly what it claims. The real question is whether most similar == what's needed holds for your case — and you have to check that before reaching for it.

In my case, it didn't. I wanted the most similar problem to raise answer accuracy, so I built a multimodal image-retrieval pipeline — past problems indexed in Qdrant, with Colpali/ColQwen and Jina multi-vector retrieval benchmarked against each other. They all generalized poorly. Thinking it through from first principles, I realized the approach had two fundamental problems.

First, the retrieval was ill-posed. For our task, "similar" had to mean similar in solution method — not visually or semantically similar. And that kind of similarity is almost impossible to define from the problem image alone. No wonder neither single-vector nor late-interaction could fix retrieval quality: I was asking the retriever for something the images simply didn't encode.

Second, even a perfect retriever wouldn't have helped. Hand the model a similar problem and its answer, and it still has to reverse-engineer the solution method from that example before it can apply it — an extra reasoning hop. On a small qualitative eval (~10 problems), feeding in the similar problem and its answer produced no meaningful lift.

Both problems pointed at the same thing: what the model actually needed was the solution method, directly. The similar-problem image was the wrong unit — indirect at best.

So we dropped RAG entirely. Instead, we pre-structured the solution methods into reusable knowledge and let the LLM select the relevant method and apply it directly. The answers got noticeably better — the model no longer had to infer a method before using one; it just used it. (We never ran a formal benchmark on the replacement, so treat that as a qualitative read, not a number.)

The bigger win was operational. We built a web interface that lets the client edit the knowledge the LLM relies on. Because each change is reflected in the model's behavior immediately, they can experiment, iterate, and watch the results in real time.

And they don't need an engineer to do it. Non-technical users update the playbook themselves — something that was never possible when the model's behavior was locked inside embeddings and a retrieval pipeline. The system keeps improving after launch, and a knowledge playbook turns out to be far easier to maintain than a RAG stack. As a bonus, it cut our retrieval infra cost.

The case taught me never to treat RAG as the default. Before reaching for it, ask one question: is the most similar stored item the same as what the model needs most here? If not, figure out what it does need, and give it that. Retrieval is a design decision about the unit of need — not a default you reach for.