Skip to main content
Cognitive Revolution

Write, Change, Recall, Forget: MongoDB's Pete Johnson on How Retrieval Drives Agent Performance

96 min episode · 3 min read
·
Pete Johnson

Episode

96 min

Read time

3 min

Topics

Fundraising & VC, Design & UX, Artificial Intelligence

AI-Generated Summary

Key Takeaways

  • Retrieval over context stuffing: Naively filling million-token context windows costs multiple dollars per call and degrades answer quality. Academic research shows only the first and last ~7,000 tokens carry significant weight, with middle content confusing models. Enterprises now prioritize selecting the right 200,000 tokens per agentic loop rather than maximizing context. Effective retrieval via vector search, lexical search, and pre-filtering combined is the primary lever for improving both cost-adjusted agent performance and answer accuracy.
  • Embeddings are not commoditized: Developers commonly assume embedding models are interchangeable, but Voyage AI models rank at the top of Hugging Face's MTEB benchmark, delivering up to 14% retrieval quality improvement over common alternatives like OpenAI or Gemini embeddings. Adding a re-ranker on top of any embedding model yields an additional 5–10% retrieval quality boost. Anthropic has no embedding model and actively recommends Voyage. Embedding model selection is a concrete, high-leverage decision that directly affects hallucination rates.
  • Hybrid search in a single API call: MongoDB's rank fusion and score fusion aggregation pipeline stages allow developers to combine vector search, lexical search, and metadata pre-filtering in one round-trip server call. Previously, developers had to execute searches separately and merge results manually. The dollar re-rank stage further integrates re-ranking into the same pipeline. This architectural consolidation reduces latency, eliminates custom merging code, and lowers maintenance burden for production RAG pipelines.
  • Contextualized chunking eliminates chunk-size iteration: Traditional embedding models require developers to iterate through multiple chunk sizes to balance retrieval quality against storage cost, since smaller chunks lose context and larger chunks degrade precision. Voyage AI's contextualized chunking accepts both the target sentence and surrounding context as separate inputs, returning a single vector array that encodes both. This inverts the normal trade-off, achieving higher retrieval quality at smaller chunk sizes without manual iteration cycles.
  • Write-change-recall-forget memory architecture: Effective agent memory systems require two developer responsibilities: querying memory with a token budget to retrieve the most relevant context across short-term, long-term, and taxonomic memory types, then returning the agent's output back to the memory system for curation and storage. Forgetting is the hardest unsolved problem. Taxonomic memory, which stores domain-specific terminology and retrieves only the five or so relevant terms per agentic loop rather than all hundred, is emerging as a distinct memory type in Fortune 500 deployments.

What It Covers

MongoDB Field CTO Pete Johnson traces database evolution from SQL's 1970 origins through MongoDB's 2007 founding to today's AI agent infrastructure. The conversation covers vector search architecture, hybrid retrieval methods, the Voyage AI acquisition, enterprise memory system design patterns, and why agent performance and cost optimization depend fundamentally on retrieval quality rather than context window maximization.

Key Questions Answered

  • Retrieval over context stuffing: Naively filling million-token context windows costs multiple dollars per call and degrades answer quality. Academic research shows only the first and last ~7,000 tokens carry significant weight, with middle content confusing models. Enterprises now prioritize selecting the right 200,000 tokens per agentic loop rather than maximizing context. Effective retrieval via vector search, lexical search, and pre-filtering combined is the primary lever for improving both cost-adjusted agent performance and answer accuracy.
  • Embeddings are not commoditized: Developers commonly assume embedding models are interchangeable, but Voyage AI models rank at the top of Hugging Face's MTEB benchmark, delivering up to 14% retrieval quality improvement over common alternatives like OpenAI or Gemini embeddings. Adding a re-ranker on top of any embedding model yields an additional 5–10% retrieval quality boost. Anthropic has no embedding model and actively recommends Voyage. Embedding model selection is a concrete, high-leverage decision that directly affects hallucination rates.
  • Hybrid search in a single API call: MongoDB's rank fusion and score fusion aggregation pipeline stages allow developers to combine vector search, lexical search, and metadata pre-filtering in one round-trip server call. Previously, developers had to execute searches separately and merge results manually. The dollar re-rank stage further integrates re-ranking into the same pipeline. This architectural consolidation reduces latency, eliminates custom merging code, and lowers maintenance burden for production RAG pipelines.
  • Contextualized chunking eliminates chunk-size iteration: Traditional embedding models require developers to iterate through multiple chunk sizes to balance retrieval quality against storage cost, since smaller chunks lose context and larger chunks degrade precision. Voyage AI's contextualized chunking accepts both the target sentence and surrounding context as separate inputs, returning a single vector array that encodes both. This inverts the normal trade-off, achieving higher retrieval quality at smaller chunk sizes without manual iteration cycles.
  • Write-change-recall-forget memory architecture: Effective agent memory systems require two developer responsibilities: querying memory with a token budget to retrieve the most relevant context across short-term, long-term, and taxonomic memory types, then returning the agent's output back to the memory system for curation and storage. Forgetting is the hardest unsolved problem. Taxonomic memory, which stores domain-specific terminology and retrieves only the five or so relevant terms per agentic loop rather than all hundred, is emerging as a distinct memory type in Fortune 500 deployments.
  • Problem selection determines AI ROI: Enterprises stuck in POC purgatory typically chose problems without pre-existing performance metrics, making ROI attribution impossible. The framework for selecting high-value AI problems requires three criteria: the problem ranks among the top 10–15 business priorities, the organization already has clean data for it, and current performance metrics exist before AI is introduced. Call centers and software delivery lifecycle are cited as reliable starting points because cost-per-call and idea-to-deployment time are already tracked.
  • Shared embedding spaces reduce development token costs: Voyage AI's four text model variants (nano, small, medium, large) share a single embedding space, meaning vectors generated by one model are compatible with the others. Developers can embed their full corpus using the large model while running all development queries through the open-weight nano model, which runs locally at zero token cost. This eliminates embedding API costs during the development and testing phase, though a modest retrieval quality trade-off applies when mixing model sizes.

Notable Moment

When Johnson visited customers in Mexico City and São Paulo, both assumed their US competitors were far ahead in AI adoption. The opposite was true — those two companies were the most sophisticated he encountered across seven countries in 2026. Johnson attributes this to hyperscaler data centers now existing in virtually every country, eliminating the geographic infrastructure gaps that defined previous technology waves.

Know someone who'd find this useful?

Episode Transcript

Hello, and welcome back to the Cognitive Revolution. Today, my guest is Pete Johnson, a thirty year technology veteran now serving as field CTO of AI at MongoDB. We start with a brief history of database technology going back to the 1970 introduction of SQL and unpacking how the relative scarcity of disk space at that time informed data normalization as a design principle. And then how decades of Moore's law and the resulting evolution of constraints ultimately led to the creation of MongoDB in 2007. This history puts today's acceleration into stark relief. As Pete recounts, in a remarkably short period of time, we've gone from being effectively forced to implement rag pipelines by the very limited context windows of GPT four class models to rag is dead when we first got million token contexts, to the brief token maxing window and subsequent budgetary fallout, to today where rag is again a major enterprise priority as company data is increasingly available for AI systems to use. Usage itself is scaling and naively maxing out the context window costs multiple dollars each and every time. Pete's key point above all is that agent performance and especially cost adjusted agent performance depends heavily on effective retrieval. With this in mind, MongoDB has continued to ship the improvements that developers need to take full advantage of AI. Vector search, sorting methods which combine traditional and vector search results into a single result set, a re rank tool called dollar re rank, and their own embedding models powered by the acquisition of Voyage AI, which have some pretty cool features like a shared embedding space across model sizes and a Matryoshka data structure. Interestingly, while MongoDB customers are free to use whatever embedding models they like, Pete insists that embeddings are contrary to popular belief, not yet commoditized. From there, we go on to talk about how developers are using these tools to build memory systems. The write, change, recall, forget loop that Pete sees as the general pattern and why forgetting is currently the hardest part. For now, Pete says it's important to remember that we're only eighteen months or so into building AI agents. And as such, there is no established right answer and nothing like a lamp stack for AI that enterprises can confidently buy and deploy without meaningful customization. We also touch on the lessons he's learned from talking to customers in India, Brazil, Mexico, and Europe all just this year. And to my surprise, he reports that the most advanced companies he's spoken to in 2026 were in fact outside of The United States. Without further ado, I hope you enjoy this speed run through database history and high level AI readiness strategy for enterprises and survey of the still fast evolving frontier of agent memory with Pete Johnson, field CTO of AI at MongoDB. The cognitive revolution is brought to you by Mercury, the banking platform loved by over 300,000 entrepreneurs. I use Mercury's virtual cards, which …

Get the full transcript (16,510 words) + summary by email — free

One-time email with the complete transcript and AI summary of this episode. No account needed.

One email, no spam. We’ll also show you what SignalCast does.

Browse all Cognitive Revolution transcripts →

You just read a 3-minute summary of a 93-minute episode.

Get Cognitive Revolution summarized like this every Monday — plus up to 2 more podcasts, free.

Pick Your Podcasts — Free

Keep Reading

More from Cognitive Revolution

We summarize every new episode. Want them in your inbox?

Similar Episodes

Related episodes from other podcasts

Explore Related Topics

This podcast is featured in Best AI Podcasts (2026) — ranked and reviewed with AI summaries.

Read this week's AI & Machine Learning Podcast Insights — cross-podcast analysis updated weekly.

You're clearly into Cognitive Revolution.

Every Monday, we deliver AI summaries of the latest episodes from Cognitive Revolution and 192+ other podcasts. Free for one show.

Start My Monday Digest

No credit card · Unsubscribe anytime