Use Case: One AI Assistant, Two Memories — How an Insurance Broker Settled the RAG vs CAG War

Some projects stall on technology. This one stalled on a blog war. A 300-person insurance broker came to me with an internal AI assistant that had been “two months from launch” for eight months — not because anything was broken, but because the team had split into two camps that each read a different article. One side had seen “RAG is dead” and wanted the entire knowledge base stuffed into a million-token context. The other had built a vector pipeline and wanted everything indexed, including an 80-page underwriting manual that changes twice a year. Both sides were right about half the corpus — and that sentence, once everyone accepted it, shipped the project in five weeks. Here’s the whole story, numbers included.

What I’ll Cover in This Blog

✔️ The scenario: a stalled assistant and two teams armed with opposite blog posts
✔️ The corpus audit that dissolved the argument
✔️ The architecture: a cached stable pack plus permission-aware retrieval from Salesforce
✔️ The results: latency, accuracy, cost per query, and the update workflow
✔️ What generalizes to your knowledge base

Now, let’s dive in! 🔥

The Scenario

Varena Insurance Brokers (anonymized, details adjusted) runs its business on Salesforce — Sales Cloud and Service Cloud as the system of record for clients, policies, and claims tickets. The goal: an internal assistant for brokers and service staff that could answer two very different kinds of questions:

🔹 “What’s our underwriting position on coastal commercial property?” — answered from the underwriting manual, product guides, and compliance policies.

🔹 “Where does the Hartley renewal stand, and what did we quote them last year?” — answered from live CRM records, claims history, and tickets.

Camp Long-Context had a fair point: the manuals fit easily in a modern context window, and their prototype answered synthesis questions beautifully. Camp RAG had a fair point too: client records change hourly, and brokers must never see accounts outside their book of business. Each camp kept citing benchmarks at the other — mostly the misquoted ones I unpacked in part one. The project needed an audit, not another article.

The Corpus Audit: One Knowledge Base, Two Species

We spent three days measuring what the knowledge actually was, instead of arguing about what architecture deserved it. The split was almost comically clean:

The corpus audit: stable knowledge versus volatile recordsThe stable half — underwriting manual, product guides, compliance policies, about 140K tokens, updated quarterly, readable by all — fits caching; the volatile half — client records, claims, tickets, quotes, millions of records changing hourly with per-broker permissions — demands retrieval.One Knowledge Base, Two SpeciesTHE STABLE HALFunderwriting manual · product guides ·compliance policies · terminology~140K tokens totalupdates twice a year, on release datesevery employee may read all of itquestions need cross-document synthesis→ CACHED CONTEXT (CAG)THE VOLATILE HALFclient records · policies · claims ·tickets · quotes · renewal historymillions of recordschanges hourly, every business daystrict per-broker visibility (book of business)answers need record-level citations→ PERMISSION-AWARE RETRIEVALBoth camps were right — about different halves. The audit ended the war in one meeting.abubakarsolutions.com
The corpus audit that dissolved the architecture argument, by Abubakar Asif

Run the stable half through the five CAG conditions from part two: 140K tokens fits the effective window with headroom ✓, versioned twice a year ✓, one permission scope ✓, queried constantly by 300 people ✓, synthesis-heavy questions ✓. Five for five. Now run the volatile half: it fails four of the five instantly — unbounded scale, hourly churn, per-broker ACLs, record-level citations. No single architecture was ever going to serve both. The knowledge base wasn’t one thing. It was two things wearing one name.

The Architecture: One Assistant, Two Memories

What we built in the five weeks that followed:

🔹 The stable pack, cached. The underwriting manual, product guides, and compliance policies — curated, deduplicated, and versioned as one 140K-token “knowledge pack” with a version header. It rides in the assistant’s prompt as a byte-identical cached prefix: written once per release, read at ~0.1x input cost on every query. No chunking, no embeddings, no retrieval misses on the questions where a miss hurts most — “what’s our position when X and Y apply” questions that need six sections of the manual at once.

🔹 The live half, retrieved from Salesforce. Client, policy, claim, and ticket data stays where it lives — in the CRM — and the assistant fetches it per query through permission-aware access, so Salesforce sharing rules decide what each broker’s assistant can see. Nothing is copied into an index that would need its own security model; the enforcement stays in the platform, the same principle as securing Salesforce-hosted MCP access. Every answer about a client cites the records it read.

🔹 The seam. The prompt is exactly the hybrid anatomy from part two: cached prefix (instructions + tool schemas + knowledge pack, byte-identical), then the uncached suffix (retrieved records + the question). The one incident worth confessing: an engineer added a “current date” line at the top of the prompt in week four, silently killing every cache hit for two days. The bill noticed before anyone else did. Dynamic content goes after the cache boundary — now it’s a lint rule.

The two-memory assistant architectureThe assistant combines a cached stable knowledge pack — underwriting manual and policies at one-tenth input cost — with permission-aware retrieval from Salesforce records enforced by sharing rules, producing answers with record-level citations.One Assistant, Two MemoriesSTABLE MEMORY140K-token knowledge packcached prefix · ~0.1x input costrebuilt on each manual releaseLIVE MEMORYSalesforce records: clients · policies · claimsfetched per query · sharing rules enforceper-broker visibility · record citationsTHE ASSISTANTcached prefix + retrieved suffixsynthesis from the pack ·facts from live records ·dynamic content after the cache boundary300 usersbrokers · service staffgrounded, cited answerscache readper-query fetchNeither camp lost. The manual got long context; the CRM got retrieval; the argument got retired.abubakarsolutions.com
The two-memory architecture: cached knowledge pack plus permission-aware CRM retrieval, by Abubakar Asif

The Results

Measured against a 40-question eval set (built before the build, per the deploy-what-you-understand rule) and a month of production traffic:

🔹 Underwriting questions: the cached pack answered synthesis questions the old vector prototype had botched — the eval’s cross-referencing questions (“coastal commercial and prior claims and the compliance rider”) went from the retrieval prototype’s frequent partial answers to consistently complete ones, because nothing relevant could fail to be retrieved. This is exactly the corpus profile where the CAG paper’s results genuinely apply.

🔹 Client questions: answered from live records with record-level citations, and — the part the compliance officer cared about — a broker cannot get an answer about an account they can’t open in Salesforce. The prompt never held data the user wasn’t entitled to, because filtering happened at fetch, not in instructions.

🔹 Cost: the stable pack costs ~$0.03 of cached input per query (140K tokens at 0.1x on verified Sonnet 5 pricing) instead of ~$0.28 uncached — and the alternative nobody now argues for, caching everything clients-included, was impossible anyway at millions of records with per-broker visibility. The retrieved suffix averages a few thousand tokens. Total input cost per query landed around a nickel.

🔹 The update workflow is the quiet win. When the underwriting manual’s new edition ships, one script rebuilds the pack, bumps the version header, and re-warms the cache — a fifteen-minute release. Client data needs no pipeline maintenance at all, because it was never copied out of Salesforce in the first place. Two memories, each maintained the way its nature demands.

The results scoreboardSynthesis questions answered completely from the cached pack, client answers permission-safe with record citations, about five cents of input per query, and a fifteen-minute release process when the manual updates.Five Weeks Later: The ScoreboardSYNTHESISCross-manual questionsanswered completelyno retrieval misses on the40-question eval setPERMISSIONSSharing rules decideevery answerno answer about an account thebroker can’t open · record citationsCOST~$0.05input per querycached pack ~$0.03 + retrievedsuffix · vs ~$0.28 uncachedMAINTENANCE15 minper manual releaserebuild pack · bump version ·re-warm cache · no data pipelineEight months of argument. Three days of audit. Five weeks of build.The knowledge base was never one thing — the architecture stopped pretending it was.abubakarsolutions.com
The Varena scoreboard after five weeks, by Abubakar Asif

What Generalizes

Varena’s pattern transfers to almost any business with a system of record:

✔️ Audit the corpus before choosing the architecture — measure size, churn, permissions, and question types per content set. The argument usually dissolves in the data.
✔️ Most knowledge bases are two species wearing one name: a small stable canon and a large volatile stream. Architect for both, separately.
✔️ Cache the canon: curated, versioned, one permission scope, byte-identical prefix, rebuilt on release.
✔️ Retrieve the stream: live, permission-filtered at the source of record, cited at record level.
✔️ Keep enforcement in the platform — sharing rules and ACLs at fetch time, never “please don’t show broker A broker B’s clients” in a prompt.
✔️ Put an eval set on the seam before launch — synthesis questions for the cached half, freshness-and-permissions questions for the retrieved half.

The teams that stay stuck in the RAG-vs-CAG war are arguing about the whole knowledge base. The teams that ship stopped treating it as one thing.

Connect with me on LinkedIn →

Is your assistant project stuck in the same argument? Send me a one-paragraph description of your knowledge base — I’ll tell you where the split line runs.

What’s in your “stable canon” — the documents you’d cache tomorrow if the war ended today? Tell me on LinkedIn.

About the Author — Abubakar Asif

SALESFORCE ARCHITECT · AI SPECIALIST · CLOUD ARCHITECT · PAKISTAN

Abubakar Asif — Salesforce Solution Architect, AI & Cloud Specialist based in Pakistan

Abubakar Asif is a Salesforce Solution Architect and artificial intelligence, Google Cloud and CRM specialist based in Pakistan — a top-rated AI, cloud infrastructure and Salesforce expert, and a National AI Research Engineer. He began as a core member and AI researcher with Google Developer Group, known for AI-powered brain-state recognition research, then built AI models and the applications around them for STEM education with STEM Wizards Academia, Toronto.

TRUE AI PIONEER · PRE-GENAI ERA

Abubakar is not just an AI adopter — he is a researcher who built models before “AI” became a buzzword. Before ChatGPT, Claude, Grok or Gemini existed, he was training and deploying custom neural networks from mathematical first principles.

A turn toward Salesforce and AI made him a Solution Architect, which opened the rest: CTO at Sunshine AI, where he led the technology and architecture that earned the startup Salesforce Consulting Partner status and drove healthy partner revenue; consultant and lead roles across Australia, Indonesia, the United States and the United Kingdom; and CTO at Shift Financial Planning, building next-generation financial planning powered by AI and Open Banking APIs.

Today he is Chief Technology Officer at Kalala Consulting, leading AI, CRM and cloud architecture — Salesforce, Agentforce, Data 360, Google Cloud and Microsoft Azure — for clients across financial services, healthcare, education and other industries. He writes here at abubakarsolutions.com about Salesforce architecture, Agentforce and AI enablement, Google Cloud, and the data foundations that make all of it work.

Connect on LinkedIn  ·  Work with Abubakar  ·  More about him

About Me

As a Computer Engineering graduate, I have cultivated a diverse skill set in the field of IT over the past four years. My career began with a strong foundation in full-stack application development, which laid the groundwork for my subsequent expertise in artificial intelligence and Salesforce.

Services

Most Recent Posts

Featured Services

Essential Solutions for AI, Cloud & CRM Success

These featured services are the cornerstone of my offerings, designed to address the most critical needs of your business. Each service is crafted to deliver impactful results, ensuring you achieve your AI, cloud, and CRM objectives and drive success.

AI Enablement & AI Agents

From data foundations to production AI: custom agents, automation, and AI systems integrated into the platforms you already run.

Cloud Infrastructure & Architecture

Google Cloud and Azure environments designed to run your CRM, data, and AI workloads as one secure, cost-aware system.

Salesforce Implementation & Development

End-to-end implementation, customization, data migration, and integration that make Salesforce your unified system of record.

Support and Maintenance

Comprehensive support and ongoing optimization to keep your AI, cloud, and CRM systems performing at their best.

TRUE AI PIONEER · PRE-GENAI ERA - a researcher, not just an adopter. Before ChatGPT, Claude, Grok, or Gemini, he was training and deploying custom neural networks from mathematical first principles.

Award-Winning AI & Neurotech Innovation

AI Based Brain State Recognition

  • Self-Acquired Dataset

    EEG/EOG signals collected from 10 subjects using KL710 Biomedical Kit.

  • Dual-State Recognition

    Eye state classification via EOG & emotional state detection (happiness, sadness, depression, normal) via EEG.

  • Breakthrough in Neurotech & AI

    Achieved 98.3% accuracy in brain state classification using advanced machine learning models.

  • Recognized & Awarded Funding

    My project "AI-Based Brain State Recognition using EOG and EEG Signals" received funding under NGIRI-2024-25 by the Government of Pakistan and was praised for its innovation and impact by the Pakistan Engineering Council (PEC).

Feedback

What People Think About Me

Your Partner in AI, Cloud & CRM

Unlock the full potential of your AI, cloud, and CRM stack by hiring a dedicated architect.

Abubakar Does AI, Cloud & CRM!

Services

AI Enablement

Cloud Infrastructure

Salesforce

Administrator & Developer

Follow For Updates

© 2026