6.2 Chunking: Breaking Content Into Retrievable Units

Key Takeaways

  • 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

StrategyHow it splitsBest for
Section-awareUses title and heading elements. All text under a heading stays together until the next heading. Never splits in the middle of a sentence or paragraphStructured HTML and PDF documents; default for HTML and PDF in the advanced builder
Semantic-based passage extractionUses HTML tags as boundaries: headings h1h6, 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 passagesKnowledge articles and HTML content; the default method when creating a default search index
Conversation-basedSplits transcribed audio or video into chunks, typically when the speaker changesCall recordings and meeting transcripts
Prepend field chunkingAdds 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 chunkGiving chunks context so they're easier to match
Code extensionA custom chunking function you deploy and select in advanced setupDomain-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:

PerspectiveQuestion
RetrievalHow 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 augmentationHow 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 fieldMeaning
Chunk__cThe generated chunk text
ChunkSequenceNumber__cThe order in which the chunk was generated, starting at 0
Citation__cA reference to the source data for the chunk
DataSource__cAPI name of the source field (a default pre-filtering field)
DataSourceObject__cAPI name of the source DMO or UDMO
SourceRecordId__cID of the source record
RecordId__cPrimary 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:

  1. Increase the number of results so the second chunk is included. This is Salesforce's documented fix for this example.
  2. Prepend the article Title to every chunk so each carries the product name.
  3. Adjust max tokens or use section-aware chunking so the whole procedure stays in one chunk.
  4. 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.
Test Your Knowledge

A company indexes long, well-structured PDF manuals with clear headings. Which chunking strategy keeps each heading's content together and is the default for PDF and HTML in the advanced builder?

A
B
C
D
Test Your Knowledge

What is the default max token limit for a chunk in Data 360?

A
B
C
D
Test Your Knowledge

An admin indexes a Case DMO's Status, Priority, Subject, Description, and Summary fields, where Summary repeats Description. Retrieval quality is poor. What change best follows Salesforce's guidance?

A
B
C
D
Test Your Knowledge

Which chunking approach adds fields such as Title or Product Name to the beginning of each chunk to give it more context?

A
B
C
D