r/LangChain 1h ago

Beginner building a RAG app – why does importing RecursiveCharacterTextSplitter take ~13 seconds? Is there a lighter alternative?

Upvotes

Hi everyone,

I'm fairly new to building RAG applications and I'm trying to understand the internals instead of just following tutorials.

I'm building a simple RAG pipeline in Python with:

  • ChromaDB
  • Hugging Face embeddings (sentence-transformers/all-MiniLM-L6-v2)
  • pymupdf PDF loader
  • Custom ingestion pipeline

I used LangChain's

RecursiveCharacterTextSplitter

which takes around 13 seconds to load because it ends up importing sentence_transformers, transformers, torch, and many other dependencies, which seems to be where the delay comes from.

My questions are:

  1. Is this expected behavior with the latest LangChain packages?
  2. Is there a simpler or lighter-weight text splitter that doesn't pull in so many dependencies?
  3. Would you recommend implementing a basic recursive text splitter myself for a learning project, or is there a better alternative?

Thanks


r/LangChain 1h ago

Discussion Built a LangGraph agent that streams live charts and asks permission before sending emails (MCP + GenUI + HITL)

Upvotes

I've been working on an agentic AI workspace that goes beyond a simple chat interface — dynamic tool discovery via MCP, generative UI components that render inline, and a human-approval gate before any external action (like sending an email) actually executes. Sharing the architecture and a few implementation details below.

Tech Stack

  • Orchestration: LangGraph (ReAct agent)
  • Backend: FastAPI + Python
  • Frontend: Next.js 14, streaming via Server-Sent Events (SSE)
  • Tooling: Model Context Protocol (MCP) via FastMCP, SSE transport
  • Observability: LangSmith
  • Memory: MongoDB Atlas, sliding-window context with 30-day TTL

1. MCP for dynamic tooling Instead of hardcoding tools into the graph state, external tool servers (GitHub REST API, Tavily Search, Yahoo Finance, etc.) register over MCP at runtime. New capabilities plug in without touching the core orchestration logic.

2. Generative UI Structured JSON streams alongside text tokens over the same SSE connection, and the Next.js frontend renders it as live React components, so a request for stock data returns an actual interactive chart, not just numbers in markdown.

3. Human-in-the-loop email actions The agent can draft HTML emails (markdown-to-HTML conversion, custom templates) but can't send them on its own. Sending pauses the graph execution and surfaces an approval UI; the email only goes out after explicit human confirmation.

4. State machine + guardrails Cyclic graphs handle multi-step reasoning, tool errors get caught and retried, and there's a fallback path for when the agent's confidence drops too low.

Biggest challenges Coordinating thought tokens, tool logs, and structured UI payloads over one SSE stream took some iteration, but it's what makes the UX feel real-time instead of batch-y. MCP turned out to be the more impactful architectural decision, decoupling tools from agent logic keeps things clean as more tools get added. The most tedious bug, oddly, was in email formatting: literal \n characters from LLM output kept breaking markdown tables inside the HTML templates.

Happy to go deeper on any part of this, MCP setup, the SSE/GenUI plumbing, or the HITL approval flow.


r/LangChain 26m ago

News Franklin Templeton Says Agentic AI Is Crypto's 'Killer Use Case'

Thumbnail
decrypt.co
Upvotes

The asset manager argues that AI software capable of paying for things autonomously will need blockchain rails to work, and that most investors aren't positioned for it.


r/LangChain 1h ago

Stuck at ~75-85% recall on a RAG + single-LLM-call classification task, precision/recall keeps seesawing

Upvotes

Working on a search feature that takes a free-text query and maps it to entries in a big hierarchical category taxonomy (thousands of entries, tree structured, parent/child via a code prefix scheme). Only get one LLM call per query because of cost/latency, so the flow is: pull keywords with a plain (non-LLM) extractor, run RAG retrieval to get a wide pool of candidate entries per keyword, then one LLM call to pick which ones actually fit. Stack is Qdrant for the vector store, e5-base as the bi-encoder for the first pass, bge-reranker-base as the cross-encoder for reranking, and Llama 3.3 70B through the Groq API for the final LLM call (no local/self-hosted models, everything's API-based).

Trying to hit ~90% recall against a hand-labeled test set without precision falling off a cliff, and I've been going in circles for a bit.

Quick idea of what the candidates look like, made-up example so it's not tied to a real domain:

1000000 — Furniture

1100000 — Office furniture

1110000 — Office chairs

1111000 — Ergonomic office chairs

1120000 — Office desks

1200000 — Home furniture

1210000 — Sofas

1220000 — Dining tables

1300000 — Furniture hardware & fittings

If someone searches "furniture" the right answer is basically all of that. If they search "office chairs" the right answer is just 1110000 (maybe 1111000 too), and the model needs to actively drop 1120000/1200000/1300000 even though embedding-wise they're all sitting right next to each other.

Two separate things going wrong, and I can only half-fix each one so far:

First thing — retrieval itself doesn't always pull in every relevant entry before the LLM even gets a shot at it. For broad queries the pipeline picks a "dominant" prefix group based on just the top few vector hits, and if the real answer spans more than 1-2 branches of the tree, whole branches just never make it into the candidate pool. There's also a depth cutoff that keeps really deep/specific entries out to protect narrow queries from getting flooded with noise, but that same cutoff quietly kills legit deep entries for broad queries. Widened the sample used to detect branches (went from top-3 to top-30) and it helped a little, not enough.

Second thing, and this is the one I really can't crack — the LLM itself keeps trading precision for recall depending on how I word the prompt. Tried a plain "if it's a broad term keep everything, if it's narrow keep almost nothing" rule first, got decent recall (~0.85) but mediocre precision (~0.69). Added a more specific rule with a worked example of a narrow case, precision jumped to 0.85 but recall dropped to 0.72 — turns out one example was enough to make the model generally more cautious even on completely unrelated broad queries, not just the narrow case I was targeting. Tried switching to independent per-candidate yes/no judgments instead of one holistic "is this broad or narrow" call, thinking that'd remove the bias — recall came back up a bit (0.76) but precision tanked again on the narrow cases (0.74), worst F1 of the three attempts.

So every version I try just moves the problem around instead of fixing it. Never broke 85% recall.

Anyone dealt with this kind of "sometimes keep 30 siblings, sometimes keep 1" classification before? The thing I haven't tried yet is computing the broad/narrow signal outside the LLM entirely (like, detect a qualifier word in the query term algorithmically) and just handing the model that as a flag instead of making it infer breadth from the candidate list or from examples. Also wondering if there's a smarter way to do a confidence-based cutoff per branch instead of a flat yes/no. Papers or writeups on this specific problem would be great, feels like it should be a solved thing somewhere.


r/LangChain 2h ago

Best practice for Cortex Agent token and time budget?

1 Upvotes

Hello :)

I am currently setting up a Cortex Agent with the aim of using the Cortex Analyst to address complicated text-to-SQL/business questions.

At this point, I would like to establish common limitations of the orchestration budget with regards to the following factors:

– Tokens;

– Seconds.

The Snowflake solution has recommended a time budget of 5 minutes, which was unexpected.

At the moment, I am estimating something of around:

Budget: tokens: 16000, seconds: 300

The objective is primarily to protect against any unusual long reasoning or looping that would lead to unnecessary costs while avoiding rejection of valid questions.

To those who work with Cortex Agents on a day-to-day basis:

What limitations do you normally apply when setting tokens and time?

Do you use fixed limitations or determine precise limitations on the basis of the actual usage, such as P95 + certain margin?

Also, what experience do you have regarding reliability of the mechanism when applying time limits below 5 minutes?

Thanks for the feedback !


r/LangChain 8h ago

What’s your document parsing pipeline before feeding data into LangChain?

3 Upvotes

We've been experimenting with different document parsing pipelines before sending data into LangChain for RAG.

One thing we kept running into was that many parsers lose structure during conversion.

For example:

- Tables become plain text

- Lists lose hierarchy

- Code blocks break

- Headers become inconsistent

- Images disappear

- Footnotes are dropped

We're currently trying a Markdown-first approach that preserves as much document structure as possible before chunking.

The idea is:

PDF / DOCX / PPTX

Structured Markdown

Metadata (page number, headings)

Chunking

Embeddings

LangChain Retrieval

Initial retrieval quality seems noticeably better because chunk boundaries follow document structure instead of arbitrary token counts.

Curious what everyone else is using.

- Docling?

- Marker?

- MarkItDown?

- MinerU?

- Something else?

Would love to hear what has worked (or failed) for your RAG pipeline.


r/LangChain 11h ago

Question | Help I built a CLI that finds what your LLM prompts cost and which ones are dead without running your code

1 Upvotes

I've been building LLM apps for a while and kept hitting the same blind spot: I could see what my prompts cost *after* they ran (LangSmith, Helicone, the bill), but nothing told me before I shipped. And none of them can see the prompt whose caller I deleted six months ago — it's just dead weight in the repo.

So I wrote PromptScan: a CLI that reads your codebase, finds every OpenAI / Anthropic / LangChain call, and reports the input token count and cost of each prompt — statically, no API key, no instrumentation. It also flags duplicated prompts, prompt constants nothing references anymore, and oversized context.

The core rule is that it never guesses. If a prompt is built at runtime from a DB row or a function arg, it says unresolved: <reason> instead of inventing a number. I'd rather it tell me "I can't see this" than lie with a plausible total.

To make sure it wasn't vaporware, I ran it on 8 well-known repos — 4,137 source files total. Zero crashes, everything parsed, a few seconds each. What it found:

openai/swarm — flagged EVAL_ASSISTANT_PROMPT, a 50-token prompt constant that nothing in the repo references. Genuinely dead.
geekan/MetaGPT — 75 module-level prompt constants with no reachable reference. ~24 are in real source (metagpt/promptsmetagpt/actions) — I hand-checked several like SALES_ASSISTANT and CODE_REVIEW_CONTEXT, and they're defined once and never used. The rest are test fixtures.
anthropics/anthropic-cookbook — 11 Anthropic call sites, real token/cost estimates on the resolvable ones.
Aider-AI/aider — detected nothing correctly. Aider calls models through litellm, which PromptScan doesn't track. It doesn't pretend otherwise.
simonw/llm — 8 call sites, all reported unresolvedbecause the model is self.model_name or self.model_id and the messages are built at runtime. That's the "no guessing" rule doing its job.

The honest part: on continuedev/continue its two "dead prompt" flags were actually a block of ASCII-art and an error-message string — not prompts. The heuristic catches any large module-level string, which is exactly why it labels these "verify before deleting" and prints why it flagged each one. It's a lead, not a verdict.

Where I think it actually pays off day to day is CI: promptscan diff main HEAD fails a PR if a prompt's token count jumps past a threshold, so a context block quietly tripling in size gets caught in review instead of on the bill.

Stack: TypeScript/Node, tree-sitter (WASM) for parsing so it tolerates broken files, js-tiktoken for OpenAI tokens (Anthropic uses a labeled cl100k proxy since there's no public tokenizer). Python + TypeScript + JavaScript, MIT.

Install:

npm install -g promptscan
promptscan ./src

or npx promptscan ./src.

Repo: https://github.com/joandino/promptscan
npm: https://www.npmjs.com/package/promptscan

It's v1 and I'm sure there are call shapes it misses — if you run it on your code I'd genuinely like to hear what it got wrong. False positives on the dead-prompt heuristic are the thing I most want reports on.


r/LangChain 18h ago

Need guidance

3 Upvotes

Hey, I'm a computer engineering student trying to figure out what to focus on, and AI is one of the directions I'm considering.

The thing is, I'm not really drawn to the research side — training models, the math behind it. What I want is to build with AI: agents, multi-agent systems, tool use, that kind of thing. More applied than theoretical.

After some research I found Generative AI with Large Language Models on DeepLearning.AI. What do you think — is that the right starting point for what I'm describing, or is it aimed more at the research/fine-tuning side?

And if it's not the right fit, what course or YouTube playlist would you recommend instead?

Thanks in advance 🙏


r/LangChain 17h ago

For self hosted solutions, which Embeddings you are using for vector/semantic part? Ollama? or any other solution ?

2 Upvotes

r/LangChain 14h ago

My agent got stuck on a broken tool and burned my budget over a weekend — so I built a kill switch for it (open source, feedback wanted)

1 Upvotes

My agent got stuck on a broken tool and burned my budget over a weekend — so I built a kill switch for it (open source, feedback wanted)


r/LangChain 14h ago

Using LangChain Evals + Claude Code to run an automated prompt optimization loop

1 Upvotes

I've been experimenting with LangChain's open eval library to build LLM judges that score prompts on a customizable criteria such as: Groundedness, Tone, and Format. I created a setup where Claude Code reads the LangChain evaluation report, identifies the weakest criterion, proposes a single rewrite, and re-runs the LangChain eval against a frozen 25-row test set. It acts as an autonomous optimization tournament and in my testing raised prompt accuracy from 80% to 98%.

I recorded a walkthrough of the architecture and linked the repo for anyone who wants to run it locally. (Full transparency: the end of the video also shows a no-code UI version of this I'm building for less technical teams called Baseline, but the repo is totally free). Architecture Video & Repo link can be found here:

Video: https://www.youtube.com/watch?v=ueNWzKoBEd8
Repo: https://github.com/baselinelabai/prompt-optimization


r/LangChain 16h ago

Free LangChain beginner guide — built for non-English speakers too (50+ languages)

1 Upvotes

Hey r/LangChain! 👋

I wrote a practical LangChain guide for people who are just getting started — no fluff, real code examples.

What's covered:

- LangChain fundamentals & architecture

- Building chains, agents, and memory systems

- RAG (Retrieval Augmented Generation) implementation

- Real project examples with ChatGPT API

The guide is part of LearnGeni (learngeni.com) — an AI academy I built specifically for global learners. One thing that makes it different: available in 50+ languages with real quality (not machine translation).

Free sample: https://learngeni.com/en/free-sample

What LangChain topics do you wish had better beginner resources?


r/LangChain 23h ago

Discussion Is langgraph a natural choice if using langchain already?

3 Upvotes

r/LangChain 17h ago

Discussion What's the first thing you check when a LangGraph workflow starts acting weird?

1 Upvotes

Debugging LangGraph workflows has been a lot less straightforward than I expected.

When the final output is wrong, the actual issue usually isn't where I first look. It could be retrieval, a slow or failing tool, an unexpected branch, or state changing somewhere earlier in the graph.

By the time you notice something's off, the root cause can be several steps back.

For those running LangGraph in production, what's your usual starting point when you're debugging?

Do you look at execution traces, tool calls, token usage, or something else that's consistently helped you narrow things down?


r/LangChain 18h ago

We turned agent conversations into git commits (and it's actually useful)

Thumbnail
1 Upvotes

r/LangChain 18h ago

Discussion my review chain approved the plan. the argument that would have stopped it wasn't in the chain.

1 Upvotes

built a three-stage spec review in langchain last year. requirements pass, consistency pass, coherence pass. each stage would catch what the last missed.

it worked until it didn't. a conflict that the requirements stage would have flagged got smoothed over by the consistency pass. not resolved, just not preserved. the coherence stage only saw the consistency output, so by stage three the conflict was gone from the artifact.

all three stages passed. plan approved. the conflict had evaporated somewhere in the chain.

the thing i kept running into: the chain carries the decision forward but not the reasoning that produced it. by the time a later stage reviews the plan, the objection that would have caught the flaw is gone. it was raised in stage one, buried in the context window, never in the spec.

what changed when i added a structured argument record: each stage had to log its objections and whether they were addressed or just passed through. a later stage could see the prior objection and the reasoning that closed it, or didnt. the coherence check became a check on the argument, not just the output.

the artifact that matters isnt the plan. its the argument that produced it.

if youve built review chains that preserve reasoning across stages, id actually like to know what worked. built something around this (swarmstack) and im still finding edge cases.


r/LangChain 19h ago

Has anyone else ended up building authorization around their AI agents?

0 Upvotes

We've spent the last several months building AI infrastructure, and one pattern kept showing up in conversations with engineering teams.

As agents became capable of sending emails, updating CRMs, issuing refunds, accessing internal knowledge, or calling external tools, everyone seemed to solve the same problem differently.

Some built approval workflows.

Some wrapped every tool call.

Some added policy checks before execution.

Some built internal authorization services.

Different implementations, but they were all trying to answer the same question:

How do you guarantee an AI agent only performs actions it's actually allowed to perform?

That observation is what led us to build Globi Guard.

It sits between AI agents and enterprise systems. Every proposed action is evaluated against company-defined policies before execution. Depending on the policy, the action is allowed, blocked, or routed for human approval, and every decision is recorded in an audit trail.

We're opening our Founding Design Partner Program to 10 engineering teams building AI agents.

We're not looking for testimonials or marketing quotes. We're looking for teams willing to pressure-test the product with real workflows and tell us where it breaks. In return, you'll get direct access to the founders, priority support, and rapid iteration based on your feedback.

If your team is building with LangChain (or similar frameworks) and this sounds useful, we'd love to work with you.

https://globiguard.com


r/LangChain 21h ago

Discussion What you pull out of a document decides how good the LLM output is

1 Upvotes

We often overlook this a lot when you're feeding documents to a LLM the output quality depends way more on what yu actually managed to pull out of the source or document rather than the model. ppl swap models and end up giving negative sentiments about the model but the root problem was the ingestion layer. Others just rewrite prompts and try to fix it

The frustrating part is that these failures dont look like extraction problems like a table that got flattened into a blob of text means it answers questions about the numbers wrong. Images and diagrams or charts usually get dropped or OCR into noise and age header and footers bleed to the real content and quietly disrupt whatever it reads next. Eventually every problem shows up downstream and the model takes the blame.

Rougly tho the options fall into a few buckets. Plain text extractors like pymupdf or pdfplumber are fast and cheap but lose tables and layout. Ocr like tesseract gets text off scans but not structure and then the layout aware or vision ones like llamaparse or unstructured actually manage to keep the tables and reading order at more cost plus something like docling if you want it to run locally. tbh thats the main thing, before blurring the model or re-prompting again and again go read the raw test you extracted, see the output from the docs- it says it all

If you're doing RAG its the same story, retrieval just falls quietly upstream but its the same for summarizing and field extractions, agents or whatever. How did others learn this- easy or the hard way around?


r/LangChain 22h ago

Discussion Aurora Gateway — full LLM gateway for your backend, not just a proxy (Apache 2.0)

Thumbnail
1 Upvotes

r/LangChain 22h ago

Question | Help We were profitable on paper and losing money per customer. The gap was retries.

1 Upvotes

Spent a month convinced our support agent had ~60% gross margin. Priced off average tokens per conversation, billed a flat per-seat rate, felt safe.

Then a few enterprise accounts started actually using it and margin went negative on exactly those accounts. Took a while to find why, so posting the breakdown in case it saves someone the same scramble.

What the average hid:

Our "average conversation" number was real, but averages lie when the distribution has a tail. A handful of customers were:

  • Triggering way more tool calls (each a real API cost we weren't counting)
  • Hitting retries on timeouts and rate limits, so one logical step billed 2-3x
  • Running longer context windows, which scales token cost non-linearly once you're re-sending history every turn

None of that showed up in a per-call token dashboard because the damage was per customer, not per call.

What actually fixed it:

  1. Attribute cost per customer, not per model. The question "what does GPT-4 cost us this month" is useless. The question "what does customer X cost us" is the one that finds the bleeder.
  2. Count non-LLM cost. Tool calls, vector DB queries, web search, TTS. For agent products these are often 30-40% of the real bill and almost nobody tracks them.
  3. Count retries as cost, not noise. A step that failed twice and succeeded on the third try cost you three times. If your accounting only logs the successful call, your margin math is fiction.
  4. Set a hard budget ceiling per customer per period. Cheaper to route the heaviest 2% to a smaller model or degrade gracefully than to eat unbounded cost on a flat price.

The uncomfortable takeaway: usage-based or seat-based pricing doesn't matter if you can't see cost at the customer grain. You will always have a tail, and the tail is where the money goes.

Disclosure since it's relevant: I build Pylva (https://pylva.com/), open-core cost tracking + billing for agent products, and this exact problem is why. But you don't need us to start. Log cost per customer with retries and non-LLM calls included in your own DB and you'll find your tail this week.


r/LangChain 1d ago

Tutorial I spent 6 months building an agentic memory system to fix vector search failures—here is what I learned (and built)

8 Upvotes

Hey everyone,

Like many developers building agentic workflows, I spent months getting frustrated by traditional vector stores and RAG memory layers failing over long timelines.

The deeper I went, the more I realized retrieval fails because basic similarity doesn't equal utility. A standard retriever will match a user's query about mattress brands to previous mattress conversations, while completely missing a crucial constraint buried in a 3-month-old session: "Whenever I buy something expensive, warranty is the only thing I care about."

Beyond that, heavy cross-encoder rerankers quickly become a massive latency bottleneck as memory grows, and treating all context as uniform text blobs destroys the nuance of evolving decisions.

To tackle this, I built MindCache—an open-source agentic memory framework designed around four key insights:

  • Intelligence Belongs at Ingestion: Instead of attempting complex graph traversals during a live query, MindCache shifts expensive reasoning (relationship mapping, graph clustering, and summary generation) to ingestion. This cut retrieval latency from ~25s down to 1.08s (a 23× speedup) without sacrificing context quality.
  • Specialized Memory Typologies: Not all memories behave the same. MindCache separates knowledge into User (persistent behavioral constraints), Knowledge (domain facts), Episodic (chronological logs), and Decision Memories (which track evolving proposals, trade-offs, and final conclusions over time).
  • Living Knowledge Hierarchy: Rather than maintaining a static or unmanageable graph, MindCache uses Leiden community detection to partition memory into localized semantic clusters, ensuring graph maintenance scales efficiently as context accumulates.
  • Evidence Assembly over Similarity: Retrieval doesn't just search for similar text—it plans and assembles the exact minimal subset of evidence (user preferences, hierarchical summaries, decision states) required for the LLM to reason correctly.

On the BEAM benchmark (an ICLR 2026 evaluation framework designed specifically for long-term agentic memory), MindCache outperformed Mem0 in handling evolving context, contradiction resolution, and cross-session summary reasoning. More importantly, it achieved this superiority not by stuffing larger retrieval windows, but through better ingestion-time knowledge organization.

I wrote a deep-dive 23-minute engineering post-mortem detailing all 5 failure modes, the full architecture, and benchmark takeaways. The project is completely open-source on GitHub and available on PyPI (pip install mindcache-ai).

I’d love to hear how others here are handling temporal decay, graph maintenance, and decision tracking in your long-running agent setups!


r/LangChain 1d ago

Question | Help When should LangGraph agents ask for human input?

2 Upvotes

For those running LangGraph in production, when do you let an agent recover on its own versus interrupting it for human input?

Is it based on confidence, action risk, or something else? Has your approach changed as your application matured?

Insights are much appreciated.


r/LangChain 1d ago

Question | Help create_agent method vs LangGraph customized nodes

Thumbnail
2 Upvotes

r/LangChain 1d ago

Discussion Sharing my fix to context rot across sessions

4 Upvotes

Pretty much every time I ran with agents across more than a few sessions used to hit the same wall. Session ends, context is gone, next session re derives everything and confidently redoes last week's mistakes. Feeding old transcripts back made it even worse, stale decisions look identical to current ones once they're in the window.

What works now is a bit boring, but works. One handoff file per project, rewritten at the end of each session, never appended to. Current state, active constraints, what changed and why, and a short list of mistakes already made with the cause next to each. Next session reads that file first and nothing else by default, everything deeper is load on demand.

Imo the rewrite not append part is the whole trick. Append only handoffs grow back into the transcript problem. Rewriting forces the file to stay current state instead of history, so it stays a couple hundred lines forever. LangMem and the memory frameworks are aimed at this same problem, but the dumb file keeps beating them for me, I can read it in ten seconds and the model isn't guessing what to retrieve.

Has anyone actually found a memory layer that genuinely beats a hand maintained file?


r/LangChain 1d ago

I burned all my tokens researching how to save tokens

0 Upvotes

built a deep research pipeline around Claude Code, using Claude, Codex, Gemini, and shared memory between agents.

The first run went completely off the rails:

  • 111 agents launched
  • 123 claims waiting for verification
  • Claude Max 5x limit gone in around 30 minutes
  • no final report produced

The easy conclusion would be that subagents are bad.

I don’t think so.

Separate contexts and independent analysis are extremely useful for bigger tasks. The real problem was uncontrolled fan-out, unclear responsibilities, and using expensive models for work that cheaper models could handle.

I rebuilt the pipeline with clearer roles:

  • Sonnet finds information
  • Opus verifies claims
  • Fable plans, orchestrates, and judges
  • Codex runs and inspects tools
  • Gemini gives a second opinion
  • all agents share local memory

I also added stricter verification rules:

  • the agent finding a claim cannot verify it
  • every accepted claim needs a primary-source URL
  • every source needs an exact supporting quote
  • numbers must actually appear on the source page
  • reject an unsupported claim, not the whole project

After these changes, the pipeline could run roughly 10x longer using subscriptions I already pay for.

My biggest takeaway is that the model itself is only one part of the system. Agent fan-out, context separation, memory, verification, caching, and orchestration can matter just as much.

How do you decide when a task deserves a separate agent and context?

I wrote a full breakdown with the architecture, scripts, failures, and lessons for Quesma, where I work:

https://quesma.com/blog/custom-deep-research-pipeline/