Sub topic 9
Resetting the Conversation and Confirming the Fix
This chapter covers the last step of the test loop. You change a topic or instruction, then check that the change fixed the problem and didn't break anything else. It assumes you can already open the conversation preview in Agentforce Builder, send test utterances, and read the reasoning trace. It also assumes your agent has at least one topic and one action.
Why a reset is part of the test
A preview conversation is a single session. The agent carries the earlier messages forward, and those messages influence the next reply. If you edit a topic description halfway through a session and send the same utterance again, you are no longer running the same test. The agent now sees a longer history, which includes its own earlier wrong answer.
Three things can carry over inside one session:
- Conversation history. The agent reads earlier turns when it picks a topic. A previous turn about returns can pull a follow-up message toward the Returns topic, even if the follow-up alone would match another topic.
- Collected inputs. If the agent already asked for an order number and received it, it may reuse that value and skip asking again. That hides a missing-input bug.
- Earlier errors. A failed action or a refusal stays in the transcript. The agent may mention it or change its behavior because of it.
A reset starts a new session with an empty history. In the preview panel, look for a reset or refresh control, usually a circular-arrow icon near the top of the conversation. The exact label and position can change between releases. Use it every time you want to know whether a change worked.
The rule is simple. A test result only counts if it comes from a fresh session that started after your last change.
What a clean retest looks like
A retest has four parts: the change, the reset, the same input, and a comparison with the expected result. Skipping any one makes the result hard to trust.
- Make one change. Edit one topic description, one instruction, or one action input description. If you change three things and the test passes, you don't know which change helped. You also don't know whether the other two are harmless.
- Save the change. The preview runs against what the builder has saved. If the preview still behaves as before, check that your edit was saved and that the preview picked up the new version. Some releases need you to refresh the preview after a save.
- Reset the conversation. Start from an empty session.
- Send the exact failing utterance. Use the same wording, spelling, and punctuation. Then open the reasoning trace and compare the topic, action, and inputs with your test record.
Checking the reply alone is not enough. A reply can look right for the wrong reason. For example, the agent may answer a return question from general knowledge without running the Look Up Order action. The trace shows the path the agent took. The reply shows only where it ended up.
Recording before and after
Keep a record for each test, and fill in the "after" fields in the retest. The template from the earlier chapter works with two extra lines.
Test: "Can you change the shipping address on my order?"
Expected topic: Order Changes
Expected action: none (agent explains it cannot change addresses and offers a handoff)
Expected reply: Declines politely and offers to connect the customer to a person
Run 1 (before change)
Observed topic: Order Status
Observed action: Look Up Order (input: none provided)
Observed reply: Asked for an order number
Result: fail
Notes: Order Status description mentions "anything about an existing order".
Change made: Narrowed the Order Status description to "report the current
status and delivery date of an order" and added a scope line to the
Order Changes topic.
Run 2 (after change, conversation reset first)
Observed topic: Order Changes
Observed action: none
Observed reply: Explained that address changes are not supported, offered handoff
Result: passTwo runs of the same test with different results are useful evidence. When you hand work to a teammate, the record shows what you saw, what you changed, and why you think the change worked.
The retest loop
The loop has two exits. The fix works and the regression checks pass, or the fix fails and you go back to the trace.
Retest in three rings
A single passing run is the weakest form of confirmation. Widen the check in rings, from closest to the change to furthest.
Ring 1: the exact failing utterance
This confirms the specific bug is gone. Reset, send the utterance word for word, and check the topic, action, inputs, and reply in the trace.
Ring 2: variants of the same request
A fix that works only for one phrasing is usually a patch, not a repair. Write three or four paraphrases of the failing request and test each in its own fresh session. For the address example:
1. Can you change the shipping address on my order?
2. I typed the wrong street. Can you fix it?
3. Send my package somewhere else instead.
4. update delivery address order 00012345If variant 1 passes and variants 2 to 4 fail, the topic description probably matches the wording of your test, not the intent behind it. Rewrite the description in terms of what the customer wants, not the phrases they might use.
Ring 3: the regression set
Every change can affect topics you did not touch. Narrowing the Order Status description fixed the address request, but it could also make "Where is my package?" stop matching Order Status. Keep a small set of earlier passing tests and rerun them after each fix, using a reset before each one. Start with the five utterances from your starter set: a typical request, a variant phrasing, an unsupported request, an out-of-scope request, and a guardrail test. Add each bug you fix to this set, so the same mistake is caught if it comes back.
| Ring | Question it answers | Typical size | When to run |
|---|---|---|---|
| 1. Exact utterance | Did the specific bug go away? | 1 test | After every change |
| 2. Variants | Does the fix hold across wording? | 3 to 5 tests | After the exact test passes |
| 3. Regression set | Did the change break anything else? | Your whole saved set | Before you call the fix done |
Resetting between tests, not only after changes
Reset before each separate test case, not only after edits. A series of unrelated utterances in one session is a different test from the same utterances sent one at a time.
Suppose you send "Where is my order 00012345?" and then "What's the weather like today?" in the same session. The agent might handle the second message by treating it as a follow-up to the order conversation. In a fresh session, it would correctly treat it as out of scope. The first test left behind context that changed the second.
Multi-turn conversations are the exception. If you want to test whether the agent keeps context, such as asking for the order number once and reusing it, send those turns in one session on purpose. Write the full sequence in the test record and treat it as one test with several steps.
Test: Multi-turn order lookup
Reset first: yes
Turn 1: "I want to return the shoes I bought last week."
Turn 2: "Order 00012345"
Expected: Turn 1 selects Returns and asks for the order number.
Turn 2 runs Look Up Order with 00012345 without asking again.
Result: pass or failModel variability
Agent replies are generated by a language model, so wording can differ between runs even with the same instructions. Topic selection and action choice are usually stable for clear requests, but they can vary for borderline ones.
This has two consequences for retesting:
- A single pass on a borderline case is weak evidence. If the request was ambiguous before your fix, run it two or three times in separate fresh sessions. One pass and one fail means your fix has not removed the ambiguity.
- Judge the trace, not the exact wording. Do not fail a test because the reply used "unable" where you wrote "cannot". Fail it when the topic, the action, the input values, or the meaning of the reply is wrong.
If results flip between runs, the instructions are still underspecified. Tighten the scope or add an explicit rule, then run the three rings again.
Simulated and live mode when retesting
The mode you choose affects what a passing retest proves.
- Simulated mode produces made-up action outputs. A pass shows that the agent chose the right topic and action and passed sensible inputs. It does not show that the real action works, because the output was not real.
- Live mode runs real actions against your org's data. A pass shows the whole path works. Resetting the conversation does not undo anything an action did. If a test runs an action that updates a record or sends a message, that change stays after the reset.
A practical sequence is to confirm topic and action selection in simulated mode, then run a smaller set of final checks in live mode. For tests that write data, use a sandbox org or test records, and note in your test record which mode produced each result.
When the retest still fails
A failed retest is information. Use the trace to decide which of these happened.
| What you see in the trace after the change | Likely cause | Next step |
|---|---|---|
| Same wrong topic as before | The change did not reach the session, or the description still overlaps | Confirm the save, reset again, then compare the two topic descriptions side by side |
| A different wrong topic | The change moved the boundary too far | Add a scope line to the topic that should have matched, rather than widening the description |
| Right topic, wrong or missing action | The instruction does not say when to run the action | Add a clear instruction that links the situation to the action |
| Right action, wrong input values | The input description is vague or the agent had not collected the value | Clarify the input description and say when to ask the customer for it |
| Right path, reply wording is off | Tone or format instructions are missing | Add a short reply instruction, then retest |
| Pass on Ring 1, fail on Ring 3 | The fix broke another topic | Revert or narrow the change, then rerun the regression set |
If you cannot tell whether the change was applied, add a small marker to test with. For example, add a temporary instruction that makes the agent end its reply with a specific word. If the word does not appear after a reset, your edit has not reached the preview. Remove the marker once you have confirmed this.
Habits that keep retesting honest
- Change one thing at a time and write down what it was.
- Reset before every retest, and before every unrelated test case.
- Reuse the exact failing utterance first, then try variants.
- Keep every fixed bug as a permanent regression test.
- Record the mode (simulated or live) with each result.
- Prefer a revert over a stack of small patches when a change makes things worse. Going back to the last passing version is faster than debugging two changes at once.
Manual retesting has limits. Once your regression set grows past a dozen or so utterances, resetting and checking each one by hand takes a long time and is easy to get wrong. That is the signal to look at batch testing, which the next chapter covers.
Exercise
You edited the Order Status topic description, saved it, and then sent the previously failing utterance in the same conversation window without resetting. The reply is now correct. Why is this not enough to confirm the fix, and what should you do?
Show answer
The session still contains the earlier turns, including the agent's wrong answer and any inputs it collected. Those can change how it picks a topic, so the correct reply may come from carried-over context and not from your edit. Reset the conversation, send the exact failing utterance again, and check in the reasoning trace that the expected topic and action were chosen. Then try paraphrases of the request and run the regression set.
Exercise
After a fix, the address-change request passes, but "Where is my package?" now lands on a different topic. Which ring of retesting catches this, and what is a sensible next step?
Show answer
Ring 3, the regression set, catches it, because it reruns earlier passing tests after a change. Read the reasoning trace for the failing utterance to see which topic was chosen. Then narrow the change, for example by adding a scope line to the topic that should handle the request instead of widening its description. Reset and rerun the failing utterance, its variants, and the whole regression set.