The independent daily for Salesforce admins, developers and architects

Curated by Abhinav (opens in a new tab)

Connecting Data Cloud to Agentforce Studio to build an agentic RAG pipeline (opens in a new tab)

Readers will learn how to configure a custom retriever in Agentforce Studio, create a Flex Prompt Template in Prompt Builder, and deploy a subagent that grounds responses in live Data Cloud vector data.

The article explains how to configure a custom retriever in Agentforce Studio to fetch vectorized chunks from a Data Cloud data model object. It details setting result limits, mapping target fields, and activating the retriever so it can be referenced elsewhere.

Next, it walks through creating a Flex Prompt Template in Prompt Builder by modifying a standard knowledge template. The author shows how to add the retriever as an action, bind the query parameter, and write strict instructions that force verbatim source extraction and handle missing data gracefully.

Finally, the piece covers assembling an Agentforce Service Agent, keeping only essential routing subagents, and linking the custom Prompt Template as an action. The author validates the workflow by testing destination queries and confirming the agent returns accurate, grounded answers sourced directly from the live Data Cloud index.

Read the original at Salesforce Break (opens in a new tab)

Worth reading?

Recommended

Use custom Python chunking to improve Agentforce retrieval accuracy in Data 360 (opens in a new tab)

You will learn how to deploy Python-based Code Extension functions to override default chunking in Data 360 search indexes.

Why read this

The guide demonstrates how structure-aware splitting preserves table headers and speaker labels, resulting in more accurate Agentforce responses.

The article argues that poor chunking, not the language model, is often the real cause when an Agentforce agent misses details from a PDF or misreads a conversation, because retrieved snippets lose their context before the model sees them. Native Data 360 chunking (section-aware and semantic passage extraction) works well for standard content, but it struggles with complex multipage PDFs, dense tables and multispeaker transcripts when character or token-based splitters are used. Code Extension functions let developers deploy sandboxed, stateless Python chunking logic inside the Salesforce trust boundary, authored with the Data Custom Code SDK, deployed via the Salesforce CLI or UI, and wired into search index creation. The authors caution that their regex and pattern-based examples are illustrative happy-path code, not production-grade, and can produce false positives and negatives.

The piece tests three scenarios, comparing native chunks with custom ones. In a quarterly financial report, native splitting left numbers stranded without their column headers, making a growth-rate question unanswerable; a structure-aware function that detects table boundaries and repeats headers in sub-chunks lets the agent give a precise segment comparison. In a recorded escalation call with five speakers, native chunking produced unattributed walls of text, while a sliding-window function over speaker turns (window of 6 turns, stride of 3, capped at 1,500 characters) kept questions with their answers and preserved speaker names and timestamps, so the agent could identify a contractual downtime commitment. In a regulated-sector document, native chunking exposed SSNs, card numbers, emails, phone numbers, medical record numbers and other identifiers in the vector index; a regex pass before chunking masked the standard formats, though proprietary identifiers such as medical record, payer member, case and token numbers passed through until organization-specific patterns were added. The conclusion is that Code Extension is an escalation path for complex data rather than a replacement for native chunking, and it points developers to the documentation, the Code Extension setup in Data 360 and a video playlist to get started.

Read the original at Salesforce Developers Blog (opens in a new tab)

Worth reading?

Recommended

Tracing retrieval-augmented generation accuracy failures backward through the context pipeline (opens in a new tab)

You will learn how to isolate and fix accuracy failures in a retrieval augmented generation pipeline by tracing errors backward through parsing, chunking, and retrieval stages.

Why read this

The article also outlines Salesforce specific tools and architectures that improve enterprise document processing and query performance.

The authors describe a RAG application that passed standard text benchmarks above 90% but gave customers wrong answers in production. On complex, customer-representative enterprise documents, accuracy fell to about 46%. Errors could start at any stage: parsing, chunking, enrichment, embedding, retrieval, or answer generation. The central point is that an LLM only sees the context the pipeline preserves, so if information was lost earlier, a stronger model or a rewritten prompt will not recover it. The recommended debugging method is to trace each wrong answer backward through the pipeline, checking first whether the needed context arrived intact and then whether retrieval, chunking, or parsing removed it.

On parsing, the article argues that one strategy does not fit every page. Simple prose can go through a fast deterministic parser, while pages with tables, charts, or diagrams need processing that can interpret visual structure and relationships. Multi-page tables should be kept as one logical unit so their headers still apply after a page break. The authors say their Intelligent Parsing approach routes content by complexity at the page level, raising accuracy in a staged benchmark from 65.1% to 84.4%.

On chunking, the authors recommend treating chunk boundaries as units of meaning rather than storage limits. Headers should stay with their tables, diagrams with their explanations, and procedural steps in order, with overlap used when a split is unavoidable. Chunks can be enriched with summaries, tags, structural context, likely user questions, and file-level details such as title and filename. The article also cites SFR Embedding v3, which extends context capacity from 512 to 8,000 tokens, and reports that enriched indexing raised accuracy from 84.4% to 86.8%.

For retrieval, the article warns that the most semantically similar chunk may belong to the wrong product or context. Explicit constraints such as product, region, or customer tier should be applied as metadata pre-filters before similarity ranking. Questions whose answers depend on facts spread across documents may need GraphRAG, which builds a knowledge graph so an agent can traverse multi-hop relationships; the article says it is slated for general availability in November 2026. Each retrieval method should match the question’s shape.

Finally, the authors advise measuring one change at a time against a human-validated end-to-end benchmark, so that each gain can be attributed to a specific stage. They also cover latency: moving payloads under 100 MB from a Spark-based batch architecture to a service-based Just-in-Time indexing architecture cut indexing time three to four times, from more than 30 minutes to about seven to ten minutes.

Read the original at Salesforce Engineering (opens in a new tab)

Worth reading?