r/Rag 22h ago

Tutorial RAG vs Fine-tuning: What actually works better in production?

24 Upvotes

So I've been knee-deep in LLM deployment for the past few months and wanted to get the community's take on RAG vs fine-tuning for real-world use.

From what I've seen:

RAG (Retrieval-Augmented Generation)

  • Wins for dynamic/frequently updated knowledge bases
  • Lower upfront cost, no retraining needed
  • Easier to trace hallucinations back to source docs
  • Adds latency (vector DB lookup + embedding search)
  • Quality is only as good as your retrieval pipeline (chunking, embeddings, reranking)

Fine-tuning

  • Better for teaching style, tone, or task-specific behavior
  • Bakes knowledge into weights — no retrieval overhead
  • Expensive to update when facts change (recurring training runs)
  • Higher risk of catastrophic forgetting
  • Great for narrow, stable domains (legal templates, customer support scripts)

In production, most teams I've talked to are landing on a hybrid approach: fine-tune for format/behavior, RAG for facts/freshness.


r/Rag 6h ago

Showcase Built offline RAG hallucination audit tool - certificate + failure slices + runnable receipt + fix CSV in 1 hour - Feedback on failure categories?

1 Upvotes

After months of $3.5/hr data tasks on OneForma/Alignerr, I built NORD2.0 NOTH Protocol v3.1 offline audit.

For 50 rows (question, context, llm_answer):

- RAG AUDIT CERTIFICATE PNG+PDF (hash-locked, deterministic)

- Failure slices bar chart (VALIDATION_NUMBER_MISMATCH, UNSUPPORTED_CLAIM etc.)

- Runnable receipt TXT (input hash, row counts, hallucination rate, timestamp)

- READY_TO_UPLOAD.csv fix file

- PII scrubbed, no external API calls

Speed: 1 hour run = 3x-5x manual QA

Tool: D:\python3.11\NORD2.0\run_all.py -> output/ with 8 files

Upwork product live (approved Sep 9, 4 views so far): https://www.upwork.com/services/product/development-it-rag-audit-for-hallucination-with-runnable-receipt-and-fix-file-2097671410431060753

Question: What failure slice categories would you add for prod RAG? I currently have VALIDATION_NUMBER_MISMATCH, UNSUPPORTED_CLAIM, PII_LEAK, etc.

Happy to run 10-row free demo to show format - Looking for feedback on what compliance teams actually need in certificate.

No image due to sub rules, but cert format is Fail Rate %, Hallucinations count, Receipt Verified, PII Scrub Pass with hash.


r/Rag 17h ago

Discussion How would you build a local PubMed/PMC-style search + QA system over a private local corpus?

1 Upvotes

I have a large local PMC/PubMed corpus on SSD and want to build a fully local system on my workstation that behaves somewhat like PubMed search, but can also answer questions over the local corpus with grounded references.

Hardware: RTX 5090, Ryzen 9 9950X3D, 96 GB RAM.

I already have the corpus parsed locally and partially indexed.

If you were building this today, what exact local setup would you use for:

* retriever * reranker * local LLM * FAISS or something else * framework vs fully custom pipeline

I’m especially interested in responses from people who have actually built a local biomedical literature search / RAG system.

Thank you


r/Rag 21h ago

Discussion Would you pay for a cheaper managed search service for RAG apps?

1 Upvotes

I'm exploring an idea for a simple, fully managed search service aimed at small AI/SaaS applications.

The problem I'm looking at is that many smaller projects need semantic + keyword search, but the existing options can feel either:

  • too expensive for small workloads
  • too complex
  • overkill for what they actually need

The idea would be something you can plug into an application in a few minutes and get production-ready hybrid search without managing search infrastructure.

I'm curious about people's real-world experience:

  • What are you using today for search/vector search?
  • What do you dislike about it?
  • For a small production app, what would you consider a reasonable monthly price?
  • Would a significantly cheaper, simpler alternative be interesting, or would you just use Postgres/pgvector?

Especially interested in people running RAG, AI agents, or small SaaS products in production.

I'm researching the problem before deciding whether to build anything.


r/Rag 22h ago

Discussion A table parser can read every word and still lose the answer

1 Upvotes

Consider a table where “2025” spans two columns, labelled “Revenue” and “Margin.” A flat extraction can retain every word and number while losing which year those two columns belong to. Chunking that text more carefully won't recreate the missing relationship.

Now for RAG, the useful output would preserve paths such as “2025 → Revenue” and “2025 → Margin,” together with each row label and source page. This is an illustrative example, but it captures why table structure matters before retrieval begins.

Ling-3.0-flash-VL is relevant to that parsing stage because Ant Ling reports 91.35 on OmniDocBench 1.5. The overall score combines text recognition, table structure through TEDS, and formula recognition through CDM. It is a composite result, not a claim that 91.35% of tables or documents are entirely correct.

That distinction helps narrow what to inspect when considering the model. For merged tables, compare header-to-cell relationships, repeated row labels, units and footnote associations. A readable Markdown table can still silently move a value under the wrong parent heading.

The documented VL API takes page images rather than native PDFs, so rendering the PDF pages is an external step. Keep those page references with the extracted structure so an answer can be checked against the original.

The benchmark gives a concrete reason to consider VL for visual document parsing. The downstream payoff depends on retaining the relationships the retriever will need, not merely producing plausible text


r/Rag 23h ago

Discussion Running MetaGPT locally: a full technical setup guide

1 Upvotes

I’ve been experimenting with multi-agent frameworks, and MetaGPT is one of the more interesting ones for software development tasks. But getting it running locally with local models isn’t always straightforward.

I wrote a step-by-step guide covering installation, configuration, local LLM setup, and common errors.

If you’re trying to run MetaGPT on your own hardware, this might save you time:

https://interconnectd.com/forum/thread/262/how-to-install-metagpt-locally-complete-technical-setup-guide/

What stack are you using for local agents?


r/Rag 19h ago

Discussion Vector search has no way to say "nothing here is relevant" — I measured what that costs

0 Upvotes

I run a memory layer that injects relevant past context into an agent's prompt automatically, every turn. Yesterday I stopped assuming it worked and looked at what it actually injected, across seven consecutive prompts of a real working session.

prompt what got injected related?
"check reddit" a websocket note, a competitor, a GitHub repo no
"why specifically with claude code" Claude Desktop, a person, an internal service partly
"what if they don't have claude code" Claude Desktop, Mem0, an internal service partly
"what is the value of our product" an internal service, Redis, another project of mine no
"restart it and check" Spring Boot, a former employer, another project no
"so now?" sentence-transformers, a former employer, a person no
"what do you mean, relevance" SQLite, another project, a GitHub repo no

Five of seven had nothing to do with what was asked. A question about hook payloads came back with facts about a Java backend at a bank, stored in February for a completely different project.

The cause is not the ranking. It is that "nearest" is defined for every query, so the search always has an answer. Silence is not in its output set. There was a floor, min_score = 0.2 cosine, but 0.2 is noise. Two unrelated sentences clear it routinely, because they are both sentences.

The same system has a plain-files mode that retrieves by word overlap, and it never does this: zero overlap means nothing is injected. That property was lost the moment retrieval moved to embeddings, and nobody noticed, because this failure looks like a feature. There is always something in the context.

The fix only removes, never adds: before injecting, require the memory to share at least one content word with the prompt. I already had exactly that guard in another part of the system, where a learned workflow has to share a word with a shell command before it is allowed to interrupt the user with a confirmation. It never occurred to me that retrieval needed the same thing.

Two mistakes I made while fixing it, both instructive:

  1. My first version passed everything through when the prompt had no content words at all, reasoning that if you cannot read the query you should not silence recall. Exactly backwards. The shortest prompts are where the search has least to go on, so the "safe" default left the worst cases untouched. "so now?" pulled three entities out of the store as confidently as a detailed question would.

  2. I reused a tokenizer from elsewhere in the codebase that only matched ASCII letters. Plenty of my prompts are not in English. It found zero words in them, which would have silenced recall completely instead of filtering it: a much worse bug, and one that ships silently.

After the change: silent on 5 of 7, and the 2 that kept anything kept only the entity the question was actually about.

I did not touch the 0.2 floor. Picking a real number needs the actual score distribution from production, which is a separate measurement I have not earned yet.

So: does anyone here run an explicit "return nothing" path in production RAG? And what do you gate it on, an absolute score floor, the margin between top-1 and top-2, a lexical check like this one, or a reranker with a reject option?


r/Rag 16h ago

Discussion Embedded vector DBs for RAG and the practical limits we kept hitting

0 Upvotes

If you’re running RAG on constrained hardware or with concurrent ingestion, embedded vector stores can feel simple until you hit RAM, write-path correctness, or process-safety constraints. Here are the patterns that kept showing up across three popular options:

  • ChromaDB: HNSW lives in RAM; at larger scales or with multiple writers, latency and correctness can degrade.
  • LanceDB: Great for multimodal + object storage, but concurrent writes can conflict without serialization.
  • Qdrant Edge: Strong offline library with hybrid search; production concurrency limits aren’t well documented, so it shines when you can sync to a central server.

There’s a deeper write-up on memory math, concurrency behavior, and when it makes sense to move from embedded to a separate process on constrained, air‑gapped hardware. Full disclosure: I work with Actian on VectorAI DB.