Sub topic 4
Preparing Knowledge articles for retrieval
This chapter assumes you know basic Salesforce administration (objects, fields, permission sets) and have seen Knowledge articles in Lightning Experience. It covers what must be true of your articles before Data Cloud can ingest them.
Why article preparation matters
A retriever can only return what the search index contains. The index is built from article content, so weak articles produce weak answers. Fixing the source is cheaper than tuning the retriever later.
Only published content is retrievable
Salesforce Knowledge stores each article version as a record in the Knowledge__kav object. A version has a publish status: Draft, Online, or Archived. Only Online versions are meant to reach customers, so check that the articles you expect are in that state.
This SOQL query lists the 20 most recently published English versions:
SELECT Id, Title, UrlName, PublishStatus, Language, LastPublishedDate
FROM Knowledge__kav
WHERE PublishStatus = 'Online'
AND Language = 'en_US'
ORDER BY LastPublishedDate DESC
LIMIT 20If an article you need is missing from the results, it is still a draft, is archived, or exists in another language.
What makes an article retrieval-friendly
Retrieval works on passages of text, not whole articles. Later chapters explain chunking. For now, write so that any passage makes sense alone.
- Use a specific title that states the question or task, such as "Reset your router to factory settings".
- Put one topic in each article. Split long catch-all articles.
- Use headings and short paragraphs so each section stands on its own.
- Spell out names and terms instead of writing "it" or "the above".
- Remove outdated or duplicate articles. Conflicting versions lead to conflicting answers.
- Fill the rich text fields that hold the real content, and not only the summary.
Fields and visibility settings to review
Several article settings affect who can see content and how you filter it later.
| Setting | Why it matters for retrieval |
|---|---|
| Language | Lets you filter results to the customer's language. |
| Channels (internal, customer, partner) | Shows which audiences may see the article. Check this before exposing it to a customer-facing agent. |
| Data categories | Can serve as a filter and as an access boundary. |
| Validation status | Helps you separate reviewed content from unreviewed content. |
| `UrlName` | Gives a stable identifier for citing the source. |
Not every one of these fields reaches Data Cloud automatically. The next chapters show how to choose the fields you bring in.
Pre-ingestion checklist
- Run the SOQL query and confirm the expected articles are
Online. - Confirm the language and channel of each article match your agent's audience.
- Merge or archive duplicates and outdated versions.
- Check that titles and headings describe their content.
Exercise
A customer-facing agent keeps giving an old return policy even though an editor changed the article yesterday. Name two things to check in Knowledge before touching the retriever.
Show answer
First, check whether the edit was published. A draft version does not replace the Online version, so the old text stays live. Second, check for a duplicate or older article that states the old policy and is still Online. Either one can supply the outdated text. After both checks, confirm the index has refreshed.