Study guide

6.2 Chunking: Breaking Content Into Retrievable Units

Salesforce Certified Agentforce Specialist Exam

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: Exam Overview & How Agentforce Agents Work

1.1 Agentforce Specialist (AI-201) Exam Facts & Spring '26 Blueprint 1.2 How an Agent Works & the Building Blocks of Agent Script 1.3 Hybrid Reasoning: Agent Script in Canvas View and Script View

2 Chapter 2: Deterministic Control, Topics (Subagents) & Actions

2.1 Deterministic Behavior: Filters, Variables & Template Expressions 2.2 Standard and Custom Topics (Subagents) 2.3 Standard and Custom Agent Actions

3 Chapter 3: Agent Types, Security Context, Channels & Agent API

3.1 When to Use an Employee Agent or a Service Agent 3.2 Security Context: Who the Agent Runs As and How It Affects Actions 3.3 Connecting Agents to Channels: Digital Experiences, Email, Voice & Slack 3.4 When to Use the Agent API

4 Chapter 4: Prompt Builder Fundamentals

4.1 When to Use Prompt Builder 4.2 Access Controls Governing Prompt Templates 4.3 Prompt Template Types: Field Generation, Flex & More 4.4 Creating, Activating & Executing Prompt Templates

5 Chapter 5: Grounding, Prompt Best Practices, Trust Layer & Model Access

5.1 Choosing the Right Grounding Technique 5.2 Best Practices for Writing Effective Prompts 5.3 Einstein Trust Layer Security and Privacy Features 5.4 Managing and Preventing Access to Specific Models

6 Chapter 6: Data 360 Fundamentals for Agentforce

6.1 Agentforce Data Library: Types and Concepts 6.2 Chunking: Breaking Content Into Retrievable Units 6.3 Indexing and Search Types: Vector, Hybrid & Keyword 6.4 Retrievers: Individual, Ensemble & Filtered Retrieval

7 Chapter 7: Testing Agents with Testing Center

7.1 Testing an Agent with Testing Center 7.2 How Testing Center Evaluations Work

8 Chapter 8: Deploying Agents and Prompt Templates

8.1 Deploying an Agent from Sandbox to Production 8.2 Deploying Prompt Templates from Sandbox to Production

9 Chapter 9: Governance and Observability

9.1 Managing and Monitoring Agents 9.2 Agent Analytics and Agent Optimization

10 Chapter 10: Multi-Agent Orchestration, MCP & A2A

10.1 When a Multi-Agent Architecture Is Appropriate 10.2 Open Multi-Agent Protocols: MCP and A2A

6.2 Chunking: Breaking Content Into Retrievable Units

Key Takeaways Explain This Topic AI

Chunking breaks text into smaller units such as passages, and Data 360 turns each chunk into a vector embedding for search.

Data 360 chunking strategies include section-aware, semantic-based passage extraction, conversation-based, prepend field chunking, and code extension.

Section-aware chunking is the default for HTML and PDF files in the search index advanced builder and keeps content under each heading together.

The max token limit for a chunk defaults to 512, and prepended fields are skipped if they exceed that limit.

Chunks are stored in a chunk data model object with fields such as Chunk__c, ChunkSequenceNumber__c, DataSource__c, and SourceRecordId__c.

Last updated: September 2026

6.2 Chunking: Breaking Content Into Retrievable Units

Quick Answer: Chunking breaks long content into smaller, semantically meaningful units , such as sections or passages, so each can be embedded as a vector and retrieved independently. Data 360 supports section-aware , semantic-based passage extraction , conversation-based , prepend field , and custom code extension chunking. The max token setting controls chunk size and defaults to 512 tokens . Chunk quality directly controls retrieval quality: if the right passage isn't a clean chunk, the retriever can't return it.

Why Chunking Matters

LLM token limits. You can't send a 60-page manual in every prompt.

Relevance. Retrieval compares a query with each chunk, so smaller, coherent chunks match precise questions better.

One chunk = one vector. All the meaning in a chunk is compressed into a single embedding. Mixing unrelated topics in one chunk blurs that meaning.

Cost and speed. Retrieving five relevant chunks is cheaper and faster than retrieving whole documents.

Data 360 automatically chooses the optimal chunking strategy based on content type , and advanced setup lets you configure it.

The Chunking Strategies

Strategy How it splits Best for

Section-aware Uses title and heading elements . All text under a heading stays together until the next heading. Never splits in the middle of a sentence or paragraph Structured HTML and PDF documents; default for HTML and PDF in the advanced builder

Semantic-based passage extraction Uses HTML tags as boundaries: headings h1 – h6 , thematic breaks hr , bold and strong text on its own line, paragraphs p , and line breaks br when a chunk exceeds the token limit. Falls back to window-based extraction for long passages Knowledge articles and HTML content; the default method when creating a default search index

Conversation-based Splits transcribed audio or video into chunks, typically when the speaker changes Call recordings and meeting transcripts

Prepend field chunking Adds metadata fields such as Title or Product Name (DMOs), File Path (blob store UDMOs), or Labels, Title, URL (web crawler UDMOs) to the start of each chunk Giving chunks context so they're easier to match

Code extension A custom chunking function you deploy and select in advanced setup Domain-specific boundaries, such as keeping related PDF sections together or prompt-driven chunking through LLM gateway calls

Section-aware settings

Max Token : combines adjacent small sections into a larger chunk, which prevents overly small chunks when short paragraphs or list items are misread as sections.

Overlap Tokens : used only when one section produces multiple chunks . It copies tokens from the end of one chunk to the start of the next, for smoother context across chunk boundaries.

Semantic passage extraction details

HTML tags are stripped before chunking by default (you can disable this).

If there's no content between two headings, those headings and the following content are combined into one chunk.

If a paragraph contains no HTML, aggregation happens at the sentence level .

Chunk Size: The 512-Token Default

The max token limit is 512 by default for a chunk.

When a default search index is created, Data 360 uses semantic passage markers to split content as small as possible, then combines pieces until it reaches the chunk size you specify or the 512-token default.

Prepend fields count toward the limit. Data 360 skips prepending if the prepended fields are longer than 512 tokens.

The optimal size requires experimentation and varies by RAG or agent use case.

Planning questions Salesforce suggests:

Perspective Question

Retrieval How many words are needed to understand the chunk on its own? Does 400–500 words work, or does a smaller self-contained piece (possibly with prepended fields or enrichment) capture it?

Prompt augmentation How many chunks does the LLM need for a usable answer? Is a small factoid enough, or does it need more context?

UDMO indexes (files, web) Augmentation relies on chunk text, so chunks usually need to be larger to include context

DMO indexes (records) You can augment with other fields or even the original document, so chunks can be smaller. Watch the context window and cost

Field Selection: What to Chunk

Index long, free-text fields such as Description, Summary, Content, or Resolution.

Don't index categorical fields such as Status (Open or Closed) or other picklist-like values. Semantic search needs longer textual scope.

Avoid redundant fields (Summary, Title, and Description that say the same thing). They create near-duplicate chunks that crowd out other documents. For example, nine results might represent only three documents.

When fields represent the same content, index the longest (such as Description) and prepend the short one (such as Title).

Separate results by field with DataSource__c , which stores the original field name and can be used as a retriever pre-filter .

Where Chunks Live

When you create a search index configuration, Data 360 creates a chunk data model object (CDMO) and an index data model object (IDMO) , which stores the embeddings.

  • Chunk DMO field Meaning
  • Chunk__c The generated chunk text
  • ChunkSequenceNumber__c The order in which the chunk was generated, starting at 0
  • Citation__c A reference to the source data for the chunk
  • DataSource__c API name of the source field (a default pre-filtering field )
  • DataSourceObject__c API name of the source DMO or UDMO
  • SourceRecordId__c ID of the source record
  • RecordId__c Primary key of the chunk record
  • Enriched Chunks

For vector or hybrid indexes built from unstructured data, you can turn on enriched content chunks . Data 360 then generates three chunks per original chunk: the original text , a metadata chunk (keywords, entities, topics, title, summary), and a questions chunk (questions the content can answer). Enrichment improves retrieval, especially for Q&A actions or where prepend fields aren't possible, but it raises indexing cost . Access enriched indexes through a retriever to benefit from reranking and intent alignment.

Loading diagram... From document to retrievable chunks

Troubleshooting Scenario

A field service agent gives incomplete installation steps for a double-door refrigerator, although the article has all eleven steps. In the retriever playground , the admin sees the article was split into two chunks . Only the first includes the keyword "double-door refrigerator," so the second scores lower and isn't returned.

Fixes to consider:

Increase the number of results so the second chunk is included. This is Salesforce's documented fix for this example.

Prepend the article Title to every chunk so each carries the product name.

Adjust max tokens or use section-aware chunking so the whole procedure stays in one chunk.

Consider enriched chunks so question-style metadata helps matching.

Exam Traps

Picklists and short categorical fields make poor chunk sources.

Duplicate fields reduce document diversity in results.

The default max token is 512, and oversized prepend fields are skipped.

Conversation-based chunking is for transcribed audio and video, split by speaker.