Sub topic 2
How Content Becomes Searchable Chunks and Vectors
Assume you know basic Salesforce administration, Knowledge articles, large language models, and Agentforce topics and actions. The working model is: published content becomes chunks, chunks become vectors, and a retriever returns the best matches for an agent or prompt.
How content becomes searchable chunks and vectors
Data Cloud ingests eligible Salesforce Knowledge content from a data stream. The content is split into smaller sections called chunks. A chunk should contain enough context to answer part of a question without becoming so large that unrelated information is included.
An embedding model converts each chunk into a vector, which is a numeric representation of the chunk's meaning. A search index stores the chunk text, its vector, and selected metadata. Vector search can then find content that means something similar to the user's question, even when the words differ.
Creating a search index
Create a search index over the data model object that contains the ingested article content. Select the text fields that should be searchable and the fields that identify the article, language, status, product, or audience.
Use a source query to confirm that the expected articles are published before troubleshooting the index:
SELECT Id, Title, UrlName, PublishStatus, Language, LastPublishedDate
FROM Knowledge__kav
WHERE PublishStatus = 'Online'
AND Language = 'en_US'
ORDER BY LastPublishedDate DESC
LIMIT 20Creating and testing a retriever
A retriever is the configuration that queries the index. Set its search input, returned fields, and maximum result count. Test it with real questions, including questions that use different wording from the articles.
Filters, returned fields, and result count
Filters limit results to permitted or relevant records. Common filters include publication status, language, product, region, and audience. Return the fields the prompt needs, such as article title, URL, chunk text, and last-published date.
A result count that is too low can omit the answer. A count that is too high can add noise and increase prompt size. Start with a small value and measure answer quality.
Using an Agentforce Data Library as a shortcut
An Agentforce Data Library can package supported sources and retrieval settings for an agent. It is useful when you want a managed path instead of configuring every search component separately. Review its source scope, filters, and returned content before relying on it. The shortcut still depends on published, ingested, indexed, and accessible content.
Exercise
Why can a semantically similar article be missed even when it exists?
Show answer
Ingestion or indexing may be incomplete, a filter may exclude it, the language may differ, or the chunk may not contain enough useful context.