Sub topic 10
Answering questions from Knowledge
This chapter assumes you know how topics, instructions, and actions fit together, and that you can add a standard action to a topic in Agentforce Builder. It also assumes you know what Salesforce Knowledge articles are. The chapter covers the Answer Questions with Knowledge action: what it does, how to set it up, and the errors people hit most often.
What the action does
The Answer Questions with Knowledge action lets an agent answer a user's question from your Knowledge articles instead of from the model's general training. The action searches your articles, retrieves the most relevant passages, and passes them to the model. The model then writes a reply based on those passages.
Grounding the reply in your articles keeps answers specific to your company. It also keeps them consistent with your published policies.
How a request flows
The search runs on behalf of the current user, so the user only gets answers drawn from articles they are allowed to see.
Set it up
Before you add the action, check three things:
- Salesforce Knowledge is enabled, and the articles you want are published.
- The articles are indexed for search, so the action can retrieve them.
- The agent's user has access to the Knowledge objects and to the data categories that hold the articles.
Then add the action to a topic:
- Open the agent in Agentforce Builder and select the topic that handles questions, such as "Product Help".
- Choose to add an action and select Answer Questions with Knowledge from the standard actions.
- Review the input. The action takes the user's question as text, and the agent fills it from the conversation.
- Save, then write instructions that say when to use it.
Write instructions that point to it
The agent only uses the action reliably if the topic tells it when to. Be specific about the question types and about what to do when nothing is found.
Topic: Product Help
Classification description:
Answer how-to and policy questions about our products and services.
Instructions:
1. For any how-to or policy question, use the Answer Questions with Knowledge action before replying.
2. Base the reply only on what the action returns.
3. If the action returns no relevant answer, say so and offer to connect the user with a support agent. Do not guess.Instruction 3 matters most. Without it, an agent may fall back on general knowledge and give a confident answer that your articles do not support.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| Agent says it found nothing | Article is unpublished, not indexed, or in another language | Publish and index it, then retest |
| Answer is vague or off topic | Articles are long, or titles do not match how users ask | Split articles by question and improve titles |
| Some users get answers and others do not | Data category or object access differs between users | Check permissions for the user running the agent |
| Agent answers without calling the action | Instructions do not say when to use it | Add an explicit instruction naming the action |
Verify it works
Open the conversation preview and ask a question that you know one article answers. Check that the action ran and that the reply matches the article. Then ask something your articles do not cover. The agent should say it has no answer instead of inventing one.
Exercise
A user asks a policy question that no article covers, and the agent answers confidently anyway. Which part of the topic should you change, and how?
Show answer
Change the topic instructions. Add a rule that the agent must base replies only on what the Knowledge action returns, and that when it returns nothing relevant, the agent says so and offers a next step such as a handoff instead of guessing.
Exercise
Two users ask the same question. One gets a correct answer and the other is told nothing was found. What should you check first?
Show answer
Check each user's access to the Knowledge objects and the data categories that contain the article. The search runs as the current user, so differing visibility explains different results.