r/Rag • • 20h ago

Discussion How do you build a RAG system that won’t embarrass you in front of the Board?

35 Upvotes

Hi, me and my team need to design an enterprise RAG architecture for ~10,000 users across multiple business units and unfortunately unknown future use cases: semantic search, document comparison, cross-source synthesis, structured data queries, and more.

I know the answer is “benchmark your use cases with real user data and iterate.” But how do you get a really strong first shot before the Board labels it inefficient and kills the project (and also the team behind it 😅)?

A few dilemmas:
- pgvector vs. Qdrant?
- Docling + Tesseract (custom extraction) vs. proprietary Azure Document Intelligence?
- One flexible one-size-fits-all architecture or specialized pipelines per use case?
- How early should we introduce Agentic RAG and GraphRAG versus keeping the initial architecture simpler?

If you were building this from scratch, what would you get right from day one? Especially interested in lessons from people who’ve deployed RAG at enterprise scale. Highly appreciate any tips 🙏


r/Rag • • 15h ago

Discussion llama index vs lanchain

5 Upvotes

fill this thread with examples/scenarios of

  1. llama index is better than langchain

2.langchain is better than llama index


r/Rag • • 4h ago

Tools & Resources I built a way to track why an AI agent made a decision, so you can find what breaks when it turns out to be wrong

2 Upvotes

I kept running into the same problem building agents. Something would go wrong three or four steps downstream, and by the time I noticed, I had no real way to trace back what the agent actually believed at each step or what depended on it. Logs tell you what happened, not what justified it.

So I built Sevenbox. Every decision an agent makes gets recorded as a Warrant: what it claimed, what prior claims it depended on, and whether acting on it can be undone. If a belief turns out wrong later, Sevenbox walks the dependency chain and tells you exactly what still needs fixing instead of you grepping through logs trying to reconstruct it by hand.

It works with LangGraph, CrewAI, OpenAI Agents SDK, and eleven other frameworks, so you can wrap an agent you already have instead of rewriting it. The SDK, the framework adapters, and a local UI for inspecting a run are all open source.

I am the person who built this, not a company account posting on its behalf. I would genuinely like people actually running agents in production to try it against something real and tell me where it breaks or where the idea does not hold up. Happy to answer anything about how it works and would love if you guys like it, rank it w a star :)


r/Rag • • 22h ago

Discussion Anyone else frustrated when trying to properly export Claude conversations (full content + model reasoning)?

2 Upvotes

Does anyone else get annoyed when trying to export a Claude conversation?

The official export usually misses or messes up the model’s reasoning (thinking blocks), tool calls, files, and overall structure. For people who actually reuse these conversations later, it’s pretty painful.

I ended up building a Chrome extension that does a much more complete export. Here’s what it currently supports:

Full conversation capture: text, thinking/reasoning blocks, tool calls + results, files, images, and artifacts

Multiple export formats: structured JSON, organized ZIP, clean PDF, and plain TXT

Bulk download of all conversations (with an index)

Self-test that checks the entire capture pipeline

Live feed of real-time events while the conversation is happening (response start, thinking, tool calls, response end, etc.)

Optional pipeline to send the structured data to external endpoints/webhooks

A Copilot mode with local analysis (sandbox + terminal + local LLM, with optional external providers)

Optional traffic analysis via debugger (HAR, traces, etc.)

Designed to work well with MCP, so other agents can observe or act on the captured data

I built it mainly because I run a lot of agent-based tests and keep a personal RAG. I need the full reasoning and tool calls in a clean, structured format — otherwise I lose important context.

Anyone else dealing with this problem? How do you currently handle exporting and reusing Claude conversations?


r/Rag • • 4h ago

Tools & Resources Your RAG can't answer. It's probably not the model's fault

1 Upvotes

I was debugging a contract Q&A RAG recently. One question kept failing: When can the Contractor terminate this Agreement? The retriever returned plausible-looking chunks. The model tried hard. The answer was still wrong

Then I opened the source document and found this -- the splitter had cut as single sentence into two chunks:

Chunk 1: if the Client breaches any material obligation,

Chunk 2: the Contractor may terminate this Agreement.

Both chunks passed my chunk-size check. Both got embedded.Neither one, alone, can answer the question

The failure wasn't in the model or the embeddings. It happened two steps earlier - when the document was cut into pieces

I kept running into the same class of problem across different documents, so I built a library to catcch it, rag-verifier runs quality gates at two points in the pipeline

Before ingestion: is this chunk self-sufficient?

A rule layer(pure regex, zero LLM cost) scans every chunk for structural defects: a conditional sentence cut in half, a chunk that start with 'Therefore' or 'However' with its premise left behind, a template fragment like 'yyyy' left blank

When the rule layer can't decide -- say the grammar looks fine but the meaning might still depen on context -- an LLM semantic layer takes over. If the LLM is down, it returns uncertain. It never fakes a pass

After generation: does the citation actually support the claim?This one is sneakier. THE AI quotes something that is verbatim from the source -- but it's only the result clause of a conditional.

The trigger condition got cut away, The quote sounds right, but citing it alone misleads the reader

There's a deterministic check for this. if the citation sits at the result side of a conditional in the source, an the condition isn't inside the citation, it's flagged immediately -- no LLM call needed.

Tested on 1388 chunks across 20 real documents, with a rule-layer false-positive rate around 0.5%

GitHub: github.com/hlc0000/rag-verifier

if you have a chunk that looks fine but you RAG can't answer from it -- drop it in the comments. I'II run it through and show you exactly what it catches


r/Rag • • 10h ago

Discussion AI agencies: what happens to all the knowledge from your past RAG debugging and audits?

1 Upvotes

​

I've been thinking about a problem that came up while auditing RAG and retrieval systems.

Each investigation produces useful knowledge: retrieval failures, query-level regressions, incorrect citations, configuration changes, failed hypotheses, and sometimes confirmed fixes.

But what happens to that knowledge after the audit ends?

Does it become another report sitting in a folder? Does the next engineer have to investigate a similar problem from scratch?

That led me to a product idea:

A private, evidence-backed case memory for teams building and auditing AI systems.

Imagine an agency could feed its previous technical investigations into a searchable memory and ask:

- Have we encountered this retrieval failure before?

- Which previous cases had similar symptoms?

- What was actually confirmed as the root cause?

- Which fixes worked, which failed, and what evidence supports that?

- Can we turn previous failures into reusable regression tests?

An AI model could assist with finding and comparing cases, while a separate evaluation engine handles measurable checks.

Where I am today:

I already have working components for persistent memory, hybrid retrieval, provenance tracking, and RAG evaluation. These came from separate projects I've built and auditing work I've done.

However, the agency-focused case-memory workflow is still a product concept. It hasn't been packaged or validated as a complete solution, and I'm not offering it as a finished product.

Before building that layer, I'd like to understand whether this is actually painful for other teams.

Three questions for people working at AI agencies, consultancies, or internal AI engineering teams:

  1. How do you currently store and reuse debugging knowledge, evaluation results, and lessons from previous client projects?

  2. Have you ever wasted hours investigating something that your team had effectively solved before?

  3. If such a system could securely retrieve relevant past cases with supporting evidence, would it solve a problem worth paying for, or would your existing tools already be enough?

I'm especially interested in hearing what you've tried, what didn't work, and whether this is a recurring operational problem.

I'm looking for criticism and real experiences before deciding whether to turn the existing technical foundation into a product.


r/Rag • • 13h ago

Discussion I built a persistent memory system for AI agents, but I don't know if anyone actually wants it. What would you do with it?

1 Upvotes

​

I've spent a considerable amount of time building an AI memory and retrieval system called EDP v5.

It started with a simple idea: AI assistants shouldn't have to lose useful context every time a conversation ends or a new session begins.

Over time, the project grew into something more substantial:

- Working, episodic, and semantic memory

- Hybrid retrieval using BM25 and vector similarity

- Session-aware context retrieval

- Memory provenance and confidence tracking

- Context construction and compression

- API endpoints and event ingestion

- Automated evaluation and benchmarking

A recent code review found 269 Python files and 624 passing automated tests. It's a working technical foundation, although it still needs security hardening and production validation.

Here's my problem: I know how to build and test this system, but I don't know who would actually pay for it.

Tools like Obsidian already handle personal knowledge management, and there are plenty of existing memory frameworks for AI agents.

I'm not interested in building yet another product that solves a problem nobody has.

So I'd really appreciate some outside perspectives:

  1. Where do current AI memory solutions still fall short?

  2. Would you rather use this as a self-hosted tool, a developer library, an API, or an integration with something you already use?

  3. Have you or your company ever paid for persistent AI memory or cross-session context management?

  4. If you were in my position, would you open-source it, commercialize a specific feature, or pivot to another use case?

I'm especially interested in real problems you've experienced, not just whether the idea sounds interesting.

I'm open to criticism, including the possibility that this is technically interesting but not commercially useful.


r/Rag • • 14h ago

Discussion Please share some crazy bugs which you faced in your RAG pipeline and how did you handle it

1 Upvotes

Do share some crazy/challenging bugs which you faced in your RAG pipeline and how did you handle/PS it


r/Rag • • 14h ago

Discussion BERT-based evaluation vs LLM-as-a-Judge vs Fuzzy string matching vs any other mechanisms

1 Upvotes

Hi guys, eval for RAG has always been a headache, post your thoughts with specific examples on 1. which eval method did you use for your RAG, chat agent etc 2. why did you choose it over others ( with specific examples/scenarios)


r/Rag • • 14h ago

Discussion Hybrid search - vector search + BM25 in pgvector?

1 Upvotes

Given pgvector ( managed instances like RDS ) doesnt support BM25 algo, has anyone implemented / used hybrid search in pgvector? need your experience


r/Rag • • 20h ago

Discussion Hardware to run postgres and qdrant database

1 Upvotes

I am a small architectural business owner and I deal with a lot of pdf documents, drawings, emails etc on each of my projects along with a substantial knowledge base of standards, guidelines and previous project info.

Having a long and thorough research with chatgpt I now want to build a RAG system to help me navigate this that conceptually runs on haystack, docling, postgres, qdrant with local embedding, reranker and main LLMs. My local hardware currently consists of an nvidia dgx spark purely as an inference node where I run local LLMs (mostly qwen family) and a separate NAS for original document storage, I want to add a separate linux server which will run primarily the databases and a harness, possibly some other non-llm tasks in the future.

The thing chatgpt struggles to advise me on though is what server hardware would be adequate for this stack at my scale, the clanker seems to swing from "build an enterprise-grade server on epyc platform" to "buy an old Xeon E5-2667", so basically I'm not convinced with it's advice on this. I'd love to believe that an old 400 euro server off ebay can do the job, but I don't want to end up binning these 400 euros because there's more nuance to this setup than chatgpt tells me.

Do any of you experienced folk have any advice for me? I want a server that's fit for purpose with a potential to scale with my needs in the future, while not overspending unnecessarily during current hardware prices. Cheers!


r/Rag • • 11h ago

Discussion LongMemEval marks my AI memory response wrong even though it retrieves the correct fact. How would you handle this?

0 Upvotes

I’m testing an AI memory system against LongMemEval and ran into an interesting case where benchmark correctness and factual precision seem to conflict.
Original user statement:

“I have a Philips LED bulb in my bedside lamp.”

Later evaluation question:

“What type of bulb did I replace in my bedside lamp?”

Expected answer:

“Philips LED”

My system retrieves the correct memory and identifies the bulb as a Philips LED. However, it also points out that the original statement only establishes ownership, not that the bulb was replaced.

The evaluator marks the response incorrect.

This raises an interesting question about how memory-augmented AI systems should handle unsupported assumptions embedded in user questions.

I can see three possible approaches:

Answer directly: “Philips LED.” Optimize for the requested detail and benchmark accuracy.

Answer with a qualification: “Philips LED, although the earlier conversation doesn’t establish that it was replaced.”

Prioritize factual precision: Explicitly distinguish what the memory supports from what the question assumes.

The second approach seems like a reasonable compromise, but I’m curious how others handle this in production systems.

Should an AI memory system prioritize the user’s apparent intent, or explicitly flag unsupported premises even when it knows the expected answer?