SfSkills Domains Docs GitHub

Home / data / vector-database-management

vector-database-management

Use this skill to design, configure, and maintain vector indexes in Salesforce Data Cloud via the Setup UI. Covers chunking strategy selection, index refresh mode, PII field exclusion, and index rebuild workflows. Trigger keywords: vector index, Data Cloud vector database, chunking strategy, index refresh mode, search index rebuild, embedding model selection, create a search index, choose vector or hybrid search. NOT for developer-facing retrieval APIs, Apex vector search queries, or SOQL-based retrieval - use agentforce/data-cloud-vector-search-dev.

Open the skill folder on GitHub


Vector Database Management

This skill covers creating, tuning, and maintaining Data Cloud search indexes (the vector store behind Agentforce and Prompt Builder retrieval) through the Data Cloud UI: setup mode, chunking, embedding model, filter fields, freshness, cost, and rebuilds. The 262 Data Cloud guide calls the object a "search index configuration"; this skill uses "search index" and "vector index" for the same thing.


Before Starting

Gather this context before working on anything in this domain:


Questions to Ask Before Configuring

QuestionWhy it mattersWhat a good answer addsWhat proper configuration adds over just doing it
"Is the content in English, another Latin-script language, or a non-Latin language?"Max tokens default to 512, and Data Cloud approximates tokens by words (Latin) or punctuation (non-Latin); non-Latin chunks can exceed the limit and lose textEmbedding model (E5-Large V2 or Multilingual E5-Large) and a max-token setting below 512 where neededChunks that are fully embedded instead of silently truncated
"Will queries use product codes, error numbers, or other exact terms?"Easy Setup builds a hybrid index; vector-only search lacks domain vocabularyHybrid vs vector-only decisionExact-term questions that still find the right passage
"What will retrievers filter on?"Filter fields are chosen at setup (up to 10, 1:1 or N:1 relationships), and only defined filter fields can be used by retrieversThe filter field listRetrievers scoped to the right subset without rebuilding
"Which fields hold personal or regulated data?"Every field you chunk is copied into the chunk DMO and embeddedA field list that excludes those fieldsNo personal data sitting in a chunk DMO that the retriever can return
"How fresh must answers be, and how is the source data stream refreshed?"A Ready index processes source changes incrementally, but only after the data stream ingests them; Full Refresh replaces all data each cycleThe data stream refresh mode and scheduleFreshness that matches the business need without reprocessing the whole corpus
"How many vectors will this index hold, and how often will it be queried?"Data Queries billing for vector search counts the number of vectors in the indexA cost estimate per query volumeNo surprise credit consumption after go-live

What a proper configuration adds over clicking Easy Setup and moving on: the chunking and model fit the content, filter fields exist before retrievers need them, sensitive fields are kept out, and the team knows what a rebuild or a query costs.


Core Concepts

What a search index creates

Creating a search index configuration creates two Semantic DMOs: a chunk DMO (Chunk__c, ChunkSequenceNumber__c, source references) and an index DMO (RecordId__c, VectorEmbedding__c). It also creates a default retriever that cannot be customized; custom retrievers are built in Einstein Studio.

Easy Setup vs Advanced Setup

SettingEasy SetupAdvanced Setup
Chunking strategyPassage extraction (default)Choose per field or file type; optional prepend fields
Embedding modelE5-Large V2E5-Large V2, Multilingual E5-Large, or Whisper-Large-V3 (as listed in the Search Index Reference)
Search typeHybridVector or hybrid, chosen on the Select Source Object page; hybrid adds ranking factors such as recency or popularity
Filter fieldsNot part of the Easy Setup stepsUp to 10
Transcription (audio, video)Not part of the Easy Setup stepsDefault transcription model, optional timestamps

Chunking is token-based

Data Cloud splits content into sentences, merges sentences up to the max-token setting (default 512), and embeds each chunk. Semantic-based passage extraction uses HTML structure (headings, lists, bold subheadings) as boundaries and works best for HTML; PDF results depend on how the text is encoded. Conversation-based chunking splits transcripts by speaker. Prepend fields add context such as a title to every chunk. UNVERIFIED (2026-10-03): a configurable chunk overlap setting; the 262 Data Cloud guide does not describe one.

What you can change later

Edit lets you add fields (DMO) or file extensions (UDMO). Other settings, including chunking strategy and embedding model, are view-only. Changing them means a new index. Rebuild re-runs the full index for a configuration that did not process correctly.

Freshness

Index status moves Submitted, In-progress, Ready, or Failed. In Ready, the indexing job runs incrementally on changes in the source object. The source object is fed by a data stream whose refresh mode is Incremental, Upsert, or Full Refresh; Full Refresh deletes and replaces all data each cycle.

Cost

Unstructured Data Processed is billed once per file across transcription, chunking, and vectorization, and costs the same for vector and hybrid indexes. Data Queries for vector search count the number of vectors in the search index.


Common Patterns

Replace an index whose chunking does not fit

  1. Record the current configuration: data space, object, fields, chunking strategy, max tokens, embedding model, filter fields.
  2. Create a second index with Advanced Setup and the new settings (count it against the 10-index limit).
  3. Wait for Ready, then compare results with the validation queries in references/examples.md.
  4. Point custom retrievers at the new index and activate the new retriever versions.
  5. Delete the old index. Deletion is blocked while any retriever references it.

Keep an index fresh without reprocessing everything

Use Incremental (or Upsert for file connectors) on the source data stream instead of Full Refresh, and set the refresh schedule to the freshness the use case needs.


Decision Guidance

SituationRecommended ApproachReason
Queries mix natural language and exact codesHybrid indexKeyword search covers vocabulary that vector search misses
Non-English or mixed-language corpusMultilingual E5-Large, max tokens below 512 for non-Latin textToken approximation differs by script
Poor results on long HTML articlesPassage extraction plus a title prepend fieldUses document structure and adds context
Need to change chunking or the embedding modelBuild a new index in parallel, then cut overThose settings are view-only after creation
Index stuck in FailedRebuild from the configuration pageRebuild re-runs the full index
Source data stream uses Full Refresh on a large corpusSwitch to Incremental or Upsert where the connector allowsFull Refresh replaces all data each cycle
Fields contain personal dataLeave them out of the chunked fieldsChunked text is stored in the chunk DMO

  1. Scope. Record the data space, object, language, query style, filter needs, and expected query volume in templates/vector-database-management-template.md.
  2. Choose fields. Pick text fields to chunk and exclude personal or regulated fields; pick up to 10 filter fields.
  3. Choose setup and model. Easy Setup for a quick hybrid index on English content; Advanced Setup for language, max tokens, prepend fields, or filters.
  4. Create and wait for Ready. Watch the status; use Rebuild if it fails.
  5. Validate. Run the vector_search or hybrid_search queries in references/examples.md against representative questions and inspect the returned chunks and scores.
  6. Set freshness and cost guardrails. Confirm the data stream refresh mode and schedule; estimate query cost from the vector count.
  7. Record the configuration. Keep the template current and, where the index must move between orgs, add it to a data kit.

Review Checklist


Salesforce-Specific Gotchas

See references/gotchas.md. The two that cause the most rework: chunking strategy and embedding model are view-only after creation, and an index cannot be deleted while a retriever still references it.


Output Artifacts

ArtifactDescription
Search index configuration recordData space, object, fields, chunking, max tokens, model, search type, filter fields
Validation query setvector_search or hybrid_search queries with expected chunks
Freshness and cost noteData stream refresh mode, schedule, and vector-count query cost
Data kit entryWhen the index must be deployed to another org

Package files