Home / Work / Meta · Instagram Ads
Case Study 02 — AI Research Infrastructure · RAG System

Turning Sales Conversations into Research Signal Using AI

Your customers are probably telling your sales team exactly what they need. Does your product team know? At Instagram Ads, I built a retrieval-augmented generation (RAG) system that turned thousands of scattered sales conversations into a queryable research layer — grounded, sourced, and current.

RAG
Retrieval + generation, built on Claude
2 months
To first product roadmap contribution
Cross-org
Shared documentation standard, sales × research
Real-time
Sales signal access for research & product
01 The Opportunity

Surfacing the intelligence we already had.

When I joined Instagram Ads, I quickly saw a big opportunity: our sales teams had rich, qualitative conversations every week with managed Instagram businesses, but those insights rarely made it back to research and product in a structured way. Thousands of businesses, thousands of conversations, holding years of accumulated context: priorities, adoption barriers, competitive pressures, unmet needs.

I recognized early that if this knowledge could be standardized and retrieved well, it could become a compounding asset for the entire org. So to bridge this, I built an internal Retrieval-Augmented Generation (RAG) system that transformed these ongoing sales conversations into a living knowledge layer for research and product teams.

What that bet paid off in
Product acceleration. Within the first two months, this RAG system helped inform the Mid-funnel Ads "Shortened Conversion Journey" roadmap.
Research efficiency. Not replacing research, but eliminating the dead time before research starts. Sharper hypotheses from day one. Faster scoping. Studies that don't rediscover what sales already knows, but dig deeper into the why.
A common documentation standard. Just as importantly, it created a shared standard between teams that had historically worked with different information cultures.
Where insights were dying
UXR & DS — structured, AI-ready ✓
Research reposstandardized · searchable
Data science logsstructured · queryable
vs.
Sales intelligence — scattered, non-standard ✗
Zoom recordingsno transcription standard
Call notesrep-by-rep format
CRM entriessometimes missing
Slack threadsgone in 90 days
insight graveyard
valuable · perishable · inaccessible
02 The Solution — A RAG Architecture

Two components: retrieval grounds it, generation makes it usable.

The system had two core components that mirror a RAG architecture:

Retrieval. Given a research or product question (for example, "How are small businesses reacting to recent changes in Instagram Shopping?"), the system searched across sales artifacts to find the most relevant conversations and resources.

Generation. An LLM (Claude) then synthesized these retrieved materials into concise, contextual answers, while exposing the underlying sources so teams could inspect, validate, and go deeper.

This separation of retrieval and generation was essential: retrieval grounded the answers in real conversations, and generation turned raw, messy inputs into something interpretable and actionable.

The RAG architecture — two components, one grounded answer
Research or product question
"How are small businesses reacting to changes in Instagram Shopping?"
RAG system
Retrieval
Semantic search
across sales artifacts: call notes · transcripts · CRM entries
Retrieved evidence
most relevant conversations + resources
Generation
Claude synthesis
retrieved material → concise, contextual answer
Answer + cited sources
inspect · validate · go deeper
Under the hood
Documents are chunked into searchable units and embedded — converted to vectors that capture semantic meaning. A query finds the most semantically similar chunks (not just keyword matches) and passes them as context to Claude. Claude's job is synthesis and reasoning over that context, not recall from training data. The result: answers grounded in your actual organizational knowledge, not the model's general world knowledge.
03 Retrieval Challenge — Wrestling with Real-World Data Formats
Fixing retrieval — two horizons
The corpus was non-standard
Rep-by-rep formats · sparse notes · missing transcripts. Sparse notes → sparse embeddings that never surface in search.
S
Short-term fix: human-in-the-loop design choice
Every answer lists its "most relevant resources" → researchers verify · feedback refines prompts & query patterns
L
Long-term fix: standardize the process hardest
Documentation guidelines co-built with sales leadership — what to capture, how to tag, useful vs. noise
Retrieval becomes trustworthy
A corpus worth searching · evidence worth citing

The AI was ready. The data wasn't.

Retrieval is only as good as the corpus it searches, and the sales corpus was completely non-standard. Every rep had their own approach to documentation. Some took detailed notes; some left only a date and a company name. Some uploaded transcripts; most didn't.

This mattered because RAG doesn't fix bad data — it faithfully retrieves it. Sparse notes produced sparse embeddings that never surfaced in search. Inconsistent formats meant semantically identical insights were chunked and ranked unpredictably.

Short-term fix — human-in-the-loop validation. Every generated answer included a list of the "most relevant resources" the model drew from. This did two things: it gave researchers and PMs direct access to the underlying conversations, and it let me continuously provide feedback on whether the surfaced resources were actually relevant — which helped refine prompt design and query patterns over time. In practice, retrieval quality depended heavily on how well the model could interpret real-world, messy documentation and still find the right pieces of evidence.

Long-term fix — standardize how intelligence gets captured. UXR and DS teams at Meta already had structured repositories — standardized formats, clean metadata, consistent tagging — so building an AI layer on top of those was relatively straightforward. Sales data required something different: before retrieval, before any of the AI work, we needed a standardized process for how customer intelligence would be captured going forward.

AI did its best at tagging and theming the backlog, but the durable fix was organizational. I worked with sales leadership to establish documentation guidelines — what to capture after each call, how to tag it, what level of detail makes a note useful versus noise. The hardest part was influence without authority: translating what "useful for research and product" meant into something that also made sense for someone managing 40 accounts and a quota.

"Getting the data ready meant changing how another organization worked — without the authority to mandate it."
04 Evaluation Challenge — Using an LLM as a Judge

Generation had to be constrained, then evaluated at scale.

Once retrieval was grounded, generation brought its own challenges — ones that only showed up as usage scaled beyond me and a handful of early users.

Constraining the model. The system prompt enforced three guardrails:

Guardrail 01
Hallucination Risk
Claude could only make claims present in retrieved content. If the answer wasn't in the documents, it said so — no filling gaps with plausible-sounding inference.
Guardrail 02
Evidence Transparency
Every answer surfaced its source documents so researchers could verify, dispute, or pull the original conversation. Trust required provenance, not just output.
Guardrail 03
Research Reliability
Consistent output format across queries, so two researchers asking similar questions got comparable, traceable responses — not whatever the model felt like that day.

Even with these constraints, RAG systems can fail in a few predictable ways — especially on open-ended qualitative queries:

01
Incomplete response
Sometimes misses the top-ranked documents that support the response — especially when it retrieves a lot of supporting documents.
02
Consolidation limitations
Struggles to summarize too much context into a coherent response.
03
Contradictory extractions
Produces weak extractions when the source has too much noise or contradictions.
04
Incorrect specificity
When prompts are too general, too specific, or lack context, the LLM can generate responses that don't answer the query.
05
Wrong format
Can ignore parts of the instructions — like returning a table, list, or diagram when the task requires one.

Thus, for evaluating at scale we used the LLM-as-judge approach: a separate model pass graded outputs against a rubric derived from the guardrails above.

The judge's rubric — nine dimensions
Groundedness
Is every claim in the answer traceable to a retrieved source?
Response correctness
Does the response actually answer the query?
Citation accuracy
Do the cited sources actually support the claims attributed to them?
Refusal correctness
When evidence was thin, did the system say so instead of improvising?
Consistency
Do similar queries produce comparably structured, comparable-quality answers?
Clarity
Is the response tone and output format clear enough for product usage?
Coverage
Evaluates the variety and breadth of information retrieved and generated.
Noise robustness
Can it handle irrelevant or misleading information without compromising response quality?
Latency
How quickly the system finds information and responds — crucial for user experience.
RAG answer
generated + cited
LLM judge
scores against rubric
Human audit
researchers calibrate scores
Refine
rubric · prompts · retrieval
↩ feeds back into the system — evaluation runs continuously

Human review didn't disappear. Researchers periodically audited judge scores against their own reads to calibrate the rubric and catch what the judge missed. The judge made evaluation continuous; humans kept it honest.

Design note Why This Stayed Separate — For Now

Sales signals are valuable. They're also biased by design.

Sales reps are relationship managers, not researchers. They don't probe neutrally. They don't avoid leading questions. Their notes reflect what the client said — filtered through what the rep heard, what felt important to them, and what they were comfortable writing down.

These biases are exactly why this system wasn't merged into the existing research or DS repositories. Both already fed into a shared Insights tool, where signals from studies and data science were weighted against each other. Adding sales intelligence to that mix — with low confidence in how the AI would weigh relationship-colored notes against high-confidence study data — risked degrading the quality of the whole layer.

The ongoing conversation: could this eventually become another signal inside the Insights tool, once trust in the weighting is established? Or does it work better as a standalone market signals layer — pairing sales intelligence with app reviews, Reddit sentiment, and competitive signals, all under the same retrieval architecture? Both directions were on the table.

Where could this go next?
Direction A
Merge into Insights Tool
Alongside UXR + DS. Needs weighting trust first.
Direction B
Market signals tool
+ app reviews, Reddit, competitive signals. Same RAG architecture, broader inputs.
Why it's not merged yet: relationship bias · framing bias · selection bias · unverified probing. Low confidence in AI weighting against high-confidence study signals.
Takeaway AI as Organizational Memory

The most valuable AI systems don't invent intelligence from scratch — they make existing intelligence searchable, trustworthy, and easy to share.

The biggest lesson from this work was not just how to build and evaluate a RAG system, but what makes one actually useful. In this case, that meant turning scattered sales conversations into a living layer of organizational memory, so research and product could start from context instead of rediscovering it.

Next Study

Building trust in automation

Optym · RouteMAX →