Shivanath Devinarayanan · Updated
On this page
RAG is not memory. Vectors are not architecture. A production system keeps three context layers apart: source of truth (enterprise documents and governed RAG), working context (the in-flight session), and durable episodic memory (facts, decisions, and approvals that last longer than a context window).
Dense retrieval (pgvector, Pinecone, Qdrant, Data Cloud vectors) sits next to sparse lexical search (BM25 / tsvector). Reciprocal Rank Fusion mixes the ranks. A cross-encoder reranker (Cohere Rerank, or an equivalent) scores the shortlist. LightRAG-style dual-level graphs keep entities and themes from collapsing into chunks. Graph stores such as Neo4j handle multi-hop questions vectors cannot. Salesforce data context is on context before agency .
Why it matters
Chunk-and-embed will miss a SKU, an acronym, or a clause that only lexical search catches. Pure keyword search will miss a paraphrase. Fusion plus rerank is how you stop feeding the model noise. Compression after rerank is how you stop paying for that noise.
Working context dies when the session ends. If last quarter's exception is not in durable memory, the agent repeats it. Cold start is an architecture failure, not a prompt failure.
In a generic org
A partner asks why a deal slipped. The query decomposes. Lexical search finds the opportunity id. Vectors find similar slippage notes. The graph walk finds the reviewer who blocked the last write. Rerank keeps the top passages. Durable memory already knows this account prefers a human on discount changes. The CRM agent proposes a next step. It does not invent a policy from a nearby chunk.
Three context layers
- 1. Source of truth. Static policy, contracts, and product docs. Semantic chunking on document structure. Parent-child indexing when a sentence retrieves and a section must be read. HyDE when the question is abstract.
- 2. Working context. Sliding windows and summaries inside the live session. This layer is allowed to forget.
- 3. Durable episodic memory. Temporal facts, human approvals, and exceptions. Agents query it at session start so the plant does not relearn the same refusal.
Stack
- pgvector
- Pinecone
- Qdrant
- Data Cloud vectors
- BM25 / tsvector
- RRF
- Cohere Rerank
- Neo4j
- LightRAG
How to hire
Hiring starts with a governed production agent on one documented job, then a consultation.
Bring one documented job. Start at stand up production AI agents , then book a consultation . Agentforce is the Salesforce runtime: Agentforce that stays in production .
SHIVANATH DEVINARAYANAN · SALESFORCE MVP HALL OF FAME ·
SD
SHIVANATH DEVINARAYANAN · SALESFORCE MVP HALL OF FAME ·
SD
Home · About · Services · Portfolio · Success Stories · Writing · News · Events · Contact · Media kit · Privacy Policy