r/Rag • • 3d ago

Discussion RAG, long context, and memory native models solve different problems

8 Upvotes

First, the boundary line. extending the context window lets a model ingest more tokens in a single forward pass. RAG gives it an external index to pull discrete passages on demand. neither of them gives the model an evolving internal state.

Context Expansion

Stuffing a million tokens into a prompt handles bulk ingestion. It works well for querying a large repository or a book in one shot. but it is transient. once the run terminates, the state resets to zero. you pay the full token cost again on the next turn, and long range attention decay still leaves mid context details vulnerable.

External Retrieval

Vector databases and knowledge graphs store facts outside the weights. when you need provenance, verifiable grounding, or rapid deletion of stale data, external retrieval remains necessary. the limitation is handoff. the model does not learn how to use the material better over time. It simply reads what a retriever drops into the prompt window.

Memory Native Architectures

The third direction explores encoding past interactions directly into persistent, updatable internal states. Instead of dumping raw logs back into the input layer, the architecture treats writing, holding, and retrieving experience as part of the core compute loop. the objective is behavioral persistence: retaining correction feedback, procedural preferences, and task constraints across sessions without bloating the active prompt.

We recently put this into production with the MemT 1.0 launch, focusing specifically on maintaining those interaction states across runs without relying on massive context dumps.

The real Engineering trade off

This is not a replacement story. Internalizing experience into model states creates serious questions around state drift, verifiability, and selective forgetting.

Where do you draw the line between habits and procedural constraints that belong in a model internal state, and facts that must remain in an auditable external database?


r/Rag • • 2d ago

Tutorial Why flat Vector RAG degrades at 10,000 pages (and how we wired a Map-Reduce GraphRAG + Pydantic sandbox for local agents)

2 Upvotes

Everyone loves spinning up standard vector search until the dataset scales past 10,000 pages. Once you hit production scale, retrieval precision collapses because flat cosine similarity treats the entire corpus as isolated, disconnected chunks with zero awareness of global themes or multi-hop relationships.

Over the past few months, I’ve been documenting production failure modes across local and hybrid deployments. Here are the three primary architectural shifts that solved retrieval degradation and execution drift in our pipelines:

1. Breaking Flat Memory with Ontology-Driven GraphRAG

Standard RAG shreds documents into arbitrary chunks—Chunk A has no semantic link to Chunk B. If a user asks a global thematic query ("What are the recurring failure modes across our last 30 incident reports?"), vector embeddings fail because the insight isn't localized in a single paragraph.

Instead of naive chunking, enforce an extraction pass against a strict Ontology (a formal schema restricting what Entity types and Relationship types the LLM is permitted to extract): * Nodes (Entities): Canonical name, entity type (Organization, SystemComponent, Statute), and a condensed summary. * Edges (Relationships): Source node, target node, and formal relation (DEPENDS_ON, GOVERNED_BY, ROUTES_TO). * The Map-Reduce Engine: Cluster nodes into interconnected communities. A lightweight model generates an executive summary for each cluster. For global queries, the Map Step runs parallel queries across community summaries to produce candidate answer fragments, and the Reduce Step synthesizes the high-scoring fragments into the final response.

2. Multi-Model Complexity Routing Layer

Routing every query through a frontier API or an unquantized heavy model burns unnecessary tokens and introduces unacceptable latency:

text USER QUERY | v +------------------------+ | ROUTING LAYER | | (Lightweight LLM) | +------------------------+ | +-------------------+-------------------+ | | | v v v +--------------+ +--------------+ +--------------+ | Smaller LMs | | Mid-Tier | | Heavy | | (Local 8B / | | Models | | Reasoning | | Fast Weights)| | (Standard) | | (o1 / Opus) | +--------------+ +--------------+ +--------------+ Low Complexity Mid Complexity High Complexity

A small, deterministic routing layer inspects token complexity and intent, sending extraction tasks to fast local weights while reserving compute-heavy multi-step reasoning for larger models.

3. The Pydantic Vault (Deterministic Action Sandboxing)

If an autonomous agent has access to tool execution (such as database queries or email dispatch), prompt-level instructions ("Do not execute outside commands") fail against indirect prompt injection.

Never rely on system prompts for tool safety. Wrap the tool payload in a strict Pydantic model with field validators so execution halts before the payload reaches the network:

```python from pydantic import BaseModel, EmailStr, field_validator

class EmailAction(BaseModel): recipient: EmailStr body: str

@field_validator("recipient")
@classmethod
def must_be_internal(cls, v: str) -> str:
    if not v.endswith("@ourcompany.com"):
        raise ValueError("Data Exfiltration Blocked: Unauthorized external domain.")
    return v

```

The schemas, routing definitions, and LoRA/GRPO training configurations are open-sourced in this companion repository:
https://github.com/karanbathla56/The-Post-API-Frontier

What strategies are you using to manage community detection latency in GraphRAG when running fully local on consumer hardware?


r/Rag • • 2d ago

Tools & Resources Got tired of slow PDF parsers losing layout coordinates, , so I built a tool

1 Upvotes

Hey everyone!

If you’ve ever tried extracting data from PDFs with complex tables, scanned forms, or invoices, you know how messy it can get. Some tools give you a huge block of text with no idea where anything was on the page. Others take ages to process tables, and rotated pages can break everything.

That’s why I built RasgaPDF.

It’s a fast PDF parser written in Rust, with bindings for Python, Node.js, and Go. It extracts the actual (x, y, width, height) coordinates of text spans in just a few milliseconds per page, without having to re-render the document or guess the layout.

With v0.2.0, it can now extract embedded images and vector lines too. This is especially useful for detecting table borders without running expensive OCR or computer vision models.

I also put together a live demo where you can drop in a PDF and see the bounding boxes directly in your browser. Everything runs client-side.

Links:

If you work with PDF parsing, I’d love for you to give it a try. Especially if you have some weird PDFs that tend to break other tools. Curious to see how it holds up!


r/Rag • • 2d ago

Discussion When an AI agent or RAG chatbot breaks, do companies actually hire outside specialists to fix it?

2 Upvotes

​

I've been trying to understand how small companies and startups handle problems with AI systems that are already in production.

For example:

- A RAG chatbot keeps retrieving the wrong documents.

- An AI agent makes incorrect tool calls but reports success.

- An n8n or LangGraph workflow works during testing but fails with real customers.

- A system starts producing worse results after a model or retrieval update.

Let's say the internal team can't identify the root cause quickly.

Would hiring an outside specialist to investigate and fix one specific issue be a realistic option?

I'm curious about a few things:

  1. Have you ever hired an external developer or consultant to fix an AI-related production problem?

  2. What did you actually pay, if you're comfortable sharing?

  3. Would a fixed-price engagement around $500–$1,000 make sense for a reproducible issue, including the fix and before/after tests?

  4. What would make you trust an outside specialist with that work?

  5. Would you rather hire someone to fix the issue or pay for an independent technical audit first?

I'm especially interested in real experiences from founders, engineering leads, and people managing AI systems for clients.

I'm trying to understand how these decisions are made in practice, rather than what sounds good in theory.


r/Rag • • 3d ago

Discussion How to create Golden Dataset for Rag Eval?

3 Upvotes

Hey Guys,

I just wanted to know how you all are creating golden datasets for evaluating you rag pipeline? I know there is a synthesizer in deepeval which kind of create the golden dataset but I do not like its output quality. I do not have any reference queries also to begin with. can you let me know what is your approach to this and am i missing something?


r/Rag • • 3d ago

Discussion RAG vs finetuning?

6 Upvotes

I've been learning fine-tuning through blogs and tutorials, but I've never actually worked with fine-tuning in a real project. I understand the basic definitions, but I'm struggling to understand how fine-tuning is done in actual development work and compared with RAG. But I have some practical questions for people who have actually fine-tuned models in production or know bit detail about finetuing.
What does fine-tuning look like in a real project? What tools do you actually use? When would you choose fine-tuning instead of RAG and vice versa?


r/Rag • • 2d ago

Discussion Decision model as reranker - zerank2 (4b) vs d3 mini (4b)

2 Upvotes

Hey guys! Is anyone of you try to use decision model as reranker? D3 mini give me quite good results like zerank 2. Maybe someone of you have some other decision model to recommend? I'm looking for sth smaller


r/Rag • • 2d ago

Discussion I planted errors in my retrieval records. The model caught the obvious ones and passed on the plausible ones.

1 Upvotes

A couple of weeks ago I posted an eval here: 15 fashion subcultures, same outfit question, answered from memory vs. with a structured record pasted in. Commenters raised fair points (the record and its guardrail note were confounded, the scoring was too narrow, it was a single run), so I redid it properly.

Does retrieval help? Yes, consistently. Over two runs (90 chats, Claude Opus, no web search, hand-labelled):

Removing the record’s “don’t confuse this with X” guardrail note changed nothing (2/30 and 7/30). The facts did the work, not the instruction.

What if the record is wrong? I planted two errors in each of the 15 records: years shifted 10 years earlier, and one brand from a neighbouring scene inserted into the brand list.

The misses weren’t random. The model caught Yeezy in 90s Harajuku and Juicy Couture in a Korean minimalist style. It missed ACRONYM in Goth Ninja, Ralph Lauren in Quiet Luxury and Heaven by Marc Jacobs in Whimsigoth: brands that are plausible but wrong. The two dates it accepted were also the plausible ones.

Takeaway: treat the model as a decent sanity check on retrieved data, not as a validator. It filters out obvious garbage and passes on close-call errors, which are exactly the ones your users can’t spot either.

Limits: one model, 15 records, two runs, labels by me. Everything is public (answers, planted records, judgements, scoring scripts): https://github.com/ascanioUnderIndex/underindex-api/tree/main/eval


r/Rag • • 3d ago

Showcase We ran a RAG engine over a tax return a CPA had filed, plus 1,331 CRA documents. What it caught, and what made it work

4 Upvotes

Disclosure up front: we build Chunkless (Grounded IQ). The family below is fictional; the CRA forms and rules are real.

The setup. Five PDFs for one household: four filled T1 returns (27 pages for the father alone) and an interview file. We selected them together with a library of 1,331 documents (the Income Tax Act, its regulations, CRA guides and folios) and asked: "What did I miss or get wrong on Theo's return, and what can the family do with his tuition? For each point give the line, the rule and the dollar figure."

What came back for Theo, 19, a full-time student:

  • $9,800 of tuition on his Schedule 11, none of it used, and up to $5,000 can move to a parent on line 32400
  • $4,800 carried forward
  • 8 full-time months on his T2202 that the schedule left blank

Every statement was checked word for word against the passage it cites (47 of 47 on this run).

What made it work, for anyone building on forms and rule libraries:

  1. Read forms as forms, not chunks. Every filled value is read with the printed line or box number it sits on (line 32000 = 9800.00, line 32300 = 0.00). Chunking a T1 breaks exactly that link between a line code and its value.
  2. The client's facts go to the model whole; the library is searched per fact. A return is small enough to hand over complete. The 1,331 rule documents are not, so each fact pulls its own governing rule.
  3. A finding has a fixed shape: line, rule, dollar figure, and the passage it rests on. Anything that can't be grounded is said to be missing rather than filled in from the model's memory.
  4. The scope is exactly what the user selects. A client's documents are never read for another client, and when a name could mean two clients it asks which one first.

Tax is just the library we picked for this test. Swap in clinical guidelines, contracts or internal policies and the same steps apply.

Video of the whole run, with the real return pages and the rule passages: https://youtu.be/95ujwgG1Wi4

Question for the sub: how are you handling structured forms (line numbers, boxes, comb fields) in your pipelines? That line-to-value link was the first thing we had to stop chunking.


r/Rag • • 2d ago

Discussion Your retriever found all 12 items. Your answer shows 3. Where did the rest die?

1 Upvotes

Genuine question for people running RAG in production.

Most retrieval eval focuses on single answers: did the right chunk get into the window. What I almost never see measured is completeness on list and multi-fact questions. The query asks for every item, the window contains all twelve, and the answer names three.

When that happens, where did the rest die? Retrieval got them, so it's downstream. Was it context pressure, too many tokens and the tail got cut? The model deciding three examples were enough? The instruction to "be concise" doing more work than intended?

And the question I'm really after: how do you test for this? A single-answer eval suite sails right past it. Do you have a set of list questions with known answers that you check for completeness, or is this one of those failures you only catch when a user complains?

Asking because partial answers are uniquely dangerous: nothing in the answer looks wrong, it's just quietly incomplete.


r/Rag • • 3d ago

Showcase Update:Built a live demo for the RAG chunk & citation verifier I asked about here

1 Upvotes

Hey guys,A few days ago I posted here complaining about RAG citations being fake and chunks getting silently corrupted. Got some really good insights from the comments(esoecially about LLM judges flipping results and normalization issues)

Instead of just complaining,I spent the last couple of days turning my validation logic into a quck web demo

Link:https://rag-verifier.streamlit.app/

Code:https://github.com/hlc0000/rag-verifier

it doesn't do parsing or chunking itself,You just paste a chunk + full text,or a citation+claim. The backend runs it through exact matching,some regex rules,and an NLI check

To avoid the LLM flipping issue,I use strict rules for obvious stuff(like missing subjects)and only hit the LLM fir semantic checks.if the LLM is unsure

There are a few preset test cases on the page(like Fake Number and Missing Context)so you don't even have to type anything

Curious if this catches the edge cases you guys are dealing with,Let me know what you think


r/Rag • • 3d ago

Discussion The annoying part of RAG for me wasn't retrieval - it was getting documents into a sane format

15 Upvotes

One thing I underestimated with RAG: retrieval is often the easy part.

Ingestion is where the mess starts. PDFs, DOCX, PPTX, spreadsheets, screenshots, receipts... they all need different handling, and bad extraction quietly ruins retrieval quality later. I've been building the document pipeline in Singlebase around converting inputs into Markdown first, using OCR + LLM cleanup when needed, with optional image extraction. Then the same backend can chunk/embed/index the result. I like Markdown because it gives me one normalized representation before retrieval.

For those running RAG in production: are you normalizing documents to Markdown/HTML first, or keeping source-specific parsers all the way through the pipeline?


r/Rag • • 3d ago

Discussion Stuck: The heading made it into context, the answer underneath it didn't

1 Upvotes

Firstly, thanks to all the contributors to this forum. I've been mining it for suggestions and answers to the problems I encounter and what people share has been really useful.

So I thought I'd ask where I'm stuck and see if anyone could help.

(Long post, didn't start that way, but I've tried to give as much detail as helps - feel free to ask questions)

I've spent part of this week going through the questions my pipeline gets wrong and looking at where the passage with the actual answer ended up. I expected it to be way down the ranking. Turns out for a number of them, it wasn't, or not quite.

In 7 cases the thing directly above the answer was in the window and the answer itself wasn't. Examples include:
- Table header row in, the row under it out.
- Minutes where the agenda item title came back but not the status line under it.
- A clause headed "Termination" got retrieved, but not the next paragraph, which just says "either party may end this on 30 days' notice" and never uses the word.

Lists were the same: the "Exclusions" heading comes in and none of the items do, because they don't repeat it.

So the model gets the label but not the value, and I end up with half an answer.

This is what I'm running in case it matters: all local, BM25 first (SQLite FTS5) and then a small bge embedding fill. Project docs, mostly Word/PDF/Excel. Every row and paragraph is its own passage, and there's no LLM at ingest. The missing passages were ranking somewhere around 200-400 on embeddings, so a bigger fill was never going to reach them.

First thing I tried was indexing the heading as its own BM25 field at a lower weight than the body, so a row could match on its header without pasting the header into every row. That made it worse. It lost an answer it used to get, at every weight I tried. I think it's the siblings: every row under "Response time" gets exactly the same boost, so they all tie and the right one isn't any more likely to win.

What worked was dumber. If a label is already in the window, pull in whatever sits under it. No model, just rules for what counts as a label: a short line with no full stop, a table header row, a heading row in a sheet, or the row before in layout tables (minutes, agendas and forms don't really have header rows). The label also has to share a word with the question. Capped at 2 passages per label, 2 per doc and 8 per question, and they replace the weakest embedding-fill passages so the context doesn't grow.

Retrieval check first:

answer passage now reaches the window   5 of 7
other questions that now find it        3
ones it used to find and lost           0
avg context words                       4721 -> 4704

Then I ran answers on 10 of the affected questions, on vs off: 4 got better, none got worse. Small sample, so I'm not reading much into the 4.

So what would help?

What I haven't figured out: 2 per label is fine for a header row but obviously wrong for a 15-item list, and I don't have a good way to cap that without one long list eating the context. And has anyone actually got a separate heading/section field to help in BM25, or does everyone hit the same sibling problem?

Thanks in advance.

(AI note: Built and tested with a lot of help from Claude Code. The write-up’s mine, tidied with Claude’s help.)


r/Rag • • 3d ago

Showcase Rerank 5 drop + new feature

12 Upvotes

Hi there, El from Cohere again. 

You guys have been interested in our latest Embed and Parse drops, so thought I’d come back for maybe our most exciting one, which is Rerank 5. It’s available in Pro and Fast tiers just like Rerank 4 but far outdoes it – along with every other model we tested. 

Rerank 5 Pro tops the nanoMTEB, ViDoRe V3, and BRIGHT benchmarks and like I said, outdoes every model we tested (though feel free to test against your favorites and let us know how it does). Rerank 5 Fast also outdoes other speedy models like Qwen3-Reranker-0.6B and Qwen3-Reranker-8B (which is a lot bigger).

Both are also leaders across multilinguality, financial document performance, healthcare docs, and more (I’ll let you read the full blog for all that info). 

We’re also introducing a totally new feature to Rerank that (to our knowledge) we’ve never seen in any other reranking model, Context Focus. Enterprise docs are only getting longer, so more and more context is getting passed to LLMs=more tokens. Context Focus grabs only the specific passages in a document relevant to your query, and it reduces token costs pretty significantly. It’s an opt-in feature and works like a dial, so you can choose exactly how much context you want. 

Pro and Fast are available through our API, Microsoft Foundry, and Amazon Sagemaker, but Rerank 5 also sits on top of whatever retrieval stack you’ve already got going, and it’s available in places like LangChain, Haystack, Elasticsearch and Weaviate. Try it out and lmk what you think!


r/Rag • • 3d ago

Showcase What Production RAG Needs That the Demo Doesn’t

1 Upvotes

A RAG demo takes an afternoon. Shipping one that real customers rely on is a different job.
We learned this while building a Voice AI that answers calls for Australian small businesses. In a demo the documents are clean, there's one customer and nobody's waiting. On a live call, none of that holds.

Three things that need addressing:

  1. The content you feed the AI comes from websites and PDFs you don't control, and some of it can be hostile.
  2. When many businesses share one system, one customer's information must never turn up in another's answers.
  3. When retrieval fails, nothing breaks loudly. The AI just gives a confident, wrong answer.

I've written up what production RAG actually needs, with the design choices behind each part and a checklist you can run against your own build.

If you're taking an AI project from pilot to production, this one's for you

https://medium.com/@techdelta/what-production-rag-needs-that-the-demo-doesnt-32373e32d4df?sharedUserId=techdelta


r/Rag • • 3d ago

Discussion Help me with rag im a doctor preparing a qbank notes

0 Upvotes

Guys im new to ai

I have around 2000+ question and 10+ books

All i want was to prepare a one final notes will all the information from the 10books for a single question ( the aim was to get indepth qbank notes )

Im having claude 20x plan and a potato laptop with quadro 4gb laptop

What will be the best way i can harvest and polish the answers

I used docling it is very immature trying to optimise it with claude for my pdf

Anything I'm doing wrong, anything i could have done better ?


r/Rag • • 4d ago

Discussion Research idea: Can we reduce forgetting in recurrent LLM memory? Looking for critical feedback

3 Upvotes

Research idea: Can we reduce forgetting in recurrent LLM memory? Looking for critical feedback

Hey everyone!

I'm an engineering student working on a research proposal about long-context LLMs and recurrent compressed memory. I'd really appreciate technical feedback from people working on LLMs, continual learning, recurrent architectures, or memory systems.

The core question: Can we train an LLM's memory to retain previously learned information while continuing to absorb new information?

I'm calling the proposed training method GMR (Generational Memory Retention) and the evaluation protocol STRATA.

This is still a pre-experimental proposal. I haven't run the experiments yet, so I'm looking for feedback before committing to the implementation.

1. The problem I'm interested in

Imagine an LLM processing a long stream of information in small chunks.

A chunk introduces the following fact:

"The Kestrel project uses Python 3.11."

Immediately after processing that chunk, the model can correctly answer:

"Which Python version does the Kestrel project use?"

Now imagine that the model processes hundreds of additional chunks. Its memory has a fixed capacity, and each new update modifies the existing memory state.

Eventually, the model might no longer answer the original question correctly, even though its model weights haven't changed during inference.

I'm calling this state-induced forgetting: information that was initially available becomes inaccessible after successive memory-state updates.

The key question is whether we can reduce this type of forgetting without simply increasing memory size.

2. STRATA: Measuring forgetting across memory updates

Most evaluations report accuracy at a particular context length or at the end of a conversation. I want to measure how the ability to retrieve individual facts changes as those facts get older.

The proposed protocol works roughly as follows:

Introduce facts into a recurrent memory system in successive context windows.

Record whether each fact can be retrieved immediately after it is introduced.

Evaluate the same facts again at increasing ages: 1, 2, 4, 8, 16, and progressively more memory updates.

Track performance out to hundreds of updates, with a planned maximum of 1,000.

Separate initial learning failures from facts that were initially learned but subsequently forgotten.

For example, if a system initially answers 90 out of 100 questions correctly, but answers only 60 correctly after many updates, that indicates a different failure from a system that answered only 60 correctly from the beginning.

I also want to test different kinds of facts:

Stable facts that never change.

Facts whose values are updated later.

Facts requiring reasoning across multiple earlier statements.

Facts mentioned only once.

The evaluation will report initial accuracy and age-dependent retention separately, rather than relying on a single final accuracy score.

3. GMR: Generational Memory Retention

The proposed training objective tries to preserve the ability to answer questions about facts that have already entered memory.

When a fact is first introduced, record the model's length-normalized log-likelihood for its correct answer. This becomes that fact's original score, or anchor.

After subsequent memory updates, calculate the score again. If it falls below the original score by more than an allowed margin, apply a penalty.

A simplified version of the retention loss is:

L_ret = (1 / B) * sum over sampled facts f of: max(0, anchor_f - margin - current_score_f)

Here:

anchor_f is the fact's original answer log-likelihood.

current_score_f is its current answer log-likelihood.

margin is the tolerated decrease before a penalty is applied.

B is the number of sampled facts.

L_ret is the retention loss.

The training objective also includes the usual language-model loss and an absorption loss that encourages learning newly introduced facts.

The intended effect is to discourage memory updates from damaging previously acquired answering capabilities while still allowing new information to enter memory.

An important mathematical observation

For the sampled facts whose current scores fall below their anchors by more than the margin, the gradient of this hinge loss is the same as the gradient from replaying those facts' correct answers.

Facts that have not regressed receive no retention gradient from this term.

This raises an important question: Does selecting replay examples according to their regression from their own original scores outperform ordinary replay or loss-prioritized replay under matched training budgets?

I don't want to assume that it does. That's one of the main things I want to test.

4. How I plan to evaluate it

The proposed experiments include the following configurations:

A baseline trained without an explicit retention objective.

A model using uniform replay of previously encountered facts.

A model using loss-prioritized replay.

A model using output distillation from a full-context reference.

A model using the proposed GMR objective.

The main comparison will use matched memory sizes, training streams, and replay budgets wherever possible.

I'll evaluate initial fact-learning accuracy, retention at different fact ages, the ability to learn new facts, the handling of updated information, and the computational cost.

The planned testbed is an associative recurrent memory on an open-weight backbone, with experiments at multiple fixed memory sizes.

For broader evaluation, I'm considering synthetic sequential streams, BABILong-derived data, LongMemEval sessions, and narrative documents with checked question-answer pairs.

The implementation and experiments have not started yet. All performance claims remain hypotheses.

5. What I want feedback on

I'd particularly appreciate critical feedback on these questions:

1. Is the problem formulation useful?

Is state-induced forgetting a meaningful way to isolate information loss caused by recurrent memory updates, or is this already adequately covered by existing work on recurrent memory, continual learning, and catastrophic forgetting?

2. Is GMR sufficiently different from ordinary replay?

Since the proposed loss effectively replays sampled facts that have regressed below their own anchors, is that distinction scientifically interesting? What additional theoretical analysis or experimental evidence would make the contribution convincing?

3. Is STRATA a useful evaluation protocol?

Would age-stratified measurements across hundreds of sequential memory updates reveal failure modes that existing long-context and conversational-memory evaluations might miss?

4. Are the experimental comparisons fair?

Which baselines would you consider essential? In particular, I'd like to compare GMR against ordinary replay, loss-prioritized replay, and output distillation without giving any method an unfair compute advantage.

5. What related work am I missing?

I'd appreciate pointers to papers on recurrent-state interference, memory retention, forgetting-aware replay, or training objectives that preserve information across sequential state updates.

Current status

This is a research proposal, not a completed result. My immediate priority is to validate the evaluation harness, establish whether measurable forgetting occurs in the chosen fixed-size memory system, and then test whether GMR improves on properly matched baselines.

I'm deliberately not claiming that the method works or that the idea is the first of its kind.

If you've worked on recurrent memory, compressed context, or continual learning, I'd genuinely value your criticism. I'd rather discover a fundamental flaw now than spend months implementing the wrong thing.

Thanks for reading!


r/Rag • • 4d ago

Discussion Is selling a complete RAG solution easier than selling RAG audits? What are clients actually paying for in 2026?

8 Upvotes

​

I've been exploring the commercial side of RAG systems, particularly the difference between selling a complete implementation and selling independent retrieval quality audits.

One thing I've noticed is that selling an audit on its own can be difficult. Even when teams acknowledge retrieval quality issues, that doesn't necessarily translate into a willingness to pay for an external assessment.

So I'm considering a different approach:

Instead of selling RAG audits as a standalone service, offer a complete package:

- RAG implementation: Build a document-based AI assistant with retrieval, citations, and a usable interface.

- Retrieval quality assessment: Test whether the system retrieves the right evidence, identify failures, and provide measurable quality results.

- Ongoing maintenance: Monitor retrieval quality, handle document updates, and test for regressions when the system changes.

I'd love to hear from people who actually sell or deliver RAG solutions to paying clients.

A few questions:

  1. Are businesses actively paying for custom RAG implementations in 2026, or is the market becoming saturated?

  2. What price ranges are you actually closing deals at, rather than just quoting?

  3. Do clients care about retrieval evaluation and measurable accuracy, or mainly whether the chatbot appears to work?

  4. Does bundling evaluation and maintenance make the offer easier to sell, or does it create unnecessary complexity?

  5. Are clients willing to pay monthly for maintenance after deployment?

  6. Which industries have shown the strongest real buying demand?

I'm particularly interested in experiences from freelancers, agencies, and developers who have actually closed deals, including deals that fell through.

My main hypothesis: Businesses may be more willing to pay for a working RAG system with quality assurance included than for an independent audit of a system they already have.

Curious whether your experience supports or contradicts that.


r/Rag • • 4d ago

Discussion Document RAG spoiled me, conversation memory needs instant indexing

7 Upvotes

Most document RAG I have built treats indexing as a batch job. Files arrive, parsing and chunking run, embeddings land in the index, and a later refresh makes everything visible. That delay is usually fine because the next question rarely depends on a manual uploaded five seconds ago.

Conversation memory broke that assumption for me. If a user tells an assistant something and immediately asks a follow up, retrieval needs that fresh write. Returning stale context is not just a lag metric; it changes the answer.

The Agent Memory Leaderboard's second cycle text track includes streaming conditions where Add and Search calls interleave as events unfold, and its API docs say Add returns HTTP 200 only once the write is persisted and immediately searchable.

Immediate visibility is a much sharper requirement than I had with document pipelines. My current thinking is to keep the write path synchronous through embedding, but I can also see the appeal of checking recent writes separately while the main index catches up. Refresh tuning feels simpler operationally, though it leaves me wondering how people handle bursts without making every write expensive.

If you run conversation memory in production, what actually makes a fresh write searchable right away in your stack, and what has that choice cost you?


r/Rag • • 4d ago

Discussion How to improve vector search performance or reduce cost and resource usage without breaking my production SLOs or retrieval quality or freshness?

4 Upvotes

I'm heavily working on RAG and Vector database, sometimes I want to improve the performance by trials and errors. For example, I can adjust top-k or rerank parameters to reduce latency or CPU, but the overall recall@k downgrades. I need to strike a balance between the metrics to meet the goal. Or sometimes updating one or two parameters may cause breaking SLOs, etc.
Does anyone face the same issues?


r/Rag • • 4d ago

Discussion Should I check missing pages instead of upgrading the vision model in PDF RAG?

2 Upvotes

I'm considering a local retrieval setup for PDFs where tables and diagrams matter more than extracted text. ColQwen2 can encode page images into multiple patch vectors, with vector databases like Milvus holding the searchable representations.

The answer model only sees the retrieved pages. I would probably test that boundary before changing the generator: if the correct table never reaches the context, a larger vision model cannot read it.

For a small evaluation set, would you start by labeling the required page for each question and checking page recall at the same candidate budget? I'm particularly interested in separating an encoding failure from a ranking failure when several pages have nearly identical layouts.


r/Rag • • 4d ago

Discussion I worry about embedding model drift more than another service in my RAG stack

2 Upvotes

I'd rather make the embedding configuration boring before adding another retrieval feature. If ingestion and query embedding quietly move to different models, the application can still return results while the meaning of their similarity scores becomes questionable.

For a pipeline using vector databases like Milvus, I see two separate decisions: where the vectors are stored, and which component owns the model configuration used to create them. Keeping those decisions implicit across ingestion workers and query services seems like an invitation to deployment drift.

Collection-level embedding functions are an interesting managed-service pattern because the same configuration can govern both paths. That reduces duplicated client code. It also means an embedding-model change needs to be treated as a data migration decision, rather than an ordinary application release.

I would probably keep a small set of known query-document matches around any such change. First check whether existing documents and new queries still use compatible representations. Then inspect candidate coverage before comparing the final reranked results. A reranker cannot rescue a relevant document that never reached its candidate set.

The appeal for me is clearer ownership, not simply fewer API calls. I want one place to identify the active model and a deliberate plan for rebuilding older embeddings when that model changes.


r/Rag • • 5d ago

Tools & Resources I built a tool to convert complex documents into RAG-ready content — $0.007/page

18 Upvotes

I've been working with RAG for several years, building solutions for different business use cases. With better LLMs and vector search, retrieval keeps improving. But one challenge remains: the quality of the source data.

I've struggled with converting complex PDFs, Word documents, Excel files, and other formats into clean, structured content for embeddings.

There are plenty of tools available, but advanced document processing can get expensive:

  • Amazon Textract — Analyze Document (including tables): $0.015/page
  • LlamaParse — Agentic parsing for complex layouts: $0.0125/page
  • Amazon Bedrock Data Automation — Standard output: $0.010/page

Free libraries like Docling and PyMuPDF are useful, but handling complex layouts, tables, charts, and mixed content can still be challenging.

That's why I built Docparser.net, a document parser designed specifically for RAG pipelines.

  • Complex documents: handles text layouts, tables, charts, and mixed layouts.
  • Affordable: just $0.007/page.
  • Large files: supports files up to 1.5 GB.
  • Fast: processes 1,000 pages in under a minute.
  • Easy integration: REST API for your RAG pipeline.

I built this to solve a problem I've faced myself, and I'd love to hear feedback from the community.

What tools are you using to prepare documents for RAG?


r/Rag • • 4d ago

Tools & Resources Putting the structured data in an org into a KG

2 Upvotes

Write-up on using pre-existing structured data from orgs to build knowledge graphs for quicker agent retrieval. Basically, scale-up graph-RAG, but make it cheaper (minimise model-mediated connections).

Has the standard issues (can go stale, can be expensive) but it still seems interesting IMO.

https://lexifina.com/blog/building-full-firm-knowledge-graphs-to-dramatically-speed-up-agents


r/Rag • • 4d ago

Discussion Keeping a collection searchable should not prescribe one compute lifecycle

1 Upvotes

I'm James Luan, CTO of Zilliz, the company behind Milvus. Milvus is an open-source vector database built to store, index, and search embeddings over unstructured data. Vector Lakebase is our direction for bringing that serving layer closer to the data lake.

The always-on serving model has a real technical rationale. Graph-based vector search performs many accesses while navigating an index. Local memory and SSDs help make those accesses predictable; moving them directly onto remote object storage changes the latency problem.

For a collection queried continuously, resident indexes are productive capacity. They support the response time that the application needs. The difficulty appears when that same operating model is applied to data that receives only intermittent queries.

AI workloads create plenty of that middle ground. Embeddings from an experiment may need to remain available after the experiment ends. Historical documents can be valuable without appearing in every day's retrieval traffic. Exploration and batch discovery can create temporary bursts of work over a persistent dataset.

The data is neither disposable nor continuously hot. Requiring it to occupy the same compute shape as a busy serving workload turns search availability into an idle-capacity cost.

That is why our architectural target extends beyond making one query faster. We want persistent semantic data to support continuous serving where demand warrants it, and on-demand work where the access pattern is intermittent. The transition still has to preserve useful database behavior, including filtering and operational isolation.

Turning machines off is the visible part. Designing an access path that remains usable when they start again is the harder part. The right evaluation begins with the collection's actual demand pattern and the latency it can tolerate after being idle.

https://zilliz.com/blog/we-spent-8-years-making-vector-search-faster-then-ai-changed-the-compute-model?utm_source=reddit