Sub topic 14
Releasing a new version and validating the result
This chapter assumes you can read a conversation and its reasoning trace, classify a failure, and run a regression test set. It also assumes you are comfortable with rates and counts. The earlier chapters produced a diagnosed fix and a passing test set. Here you ship the fix and check that the real metrics moved.
Why a release is a separate step
A change that passes tests in the builder is still a hypothesis. Tests use a small, curated set of utterances. Production traffic is larger, messier, and includes cases you never wrote down. Releasing is how you find out whether the fix helps real customers.
Treat each release as a small experiment with four parts:
- A stated expectation, such as "Returns requests stop being answered by the order topic."
- A baseline, meaning the metrics before the change.
- A rollout, meaning the new version goes live.
- A comparison, meaning the metrics after the change, on comparable traffic.
If you skip the baseline or the expectation, you cannot say afterward whether the release worked.
Before you release
Run the full regression set
Run every test case, not only the one for your fix. A rewritten topic description can pull in utterances that belonged to a neighboring topic. A tighter instruction can make an action stop firing in a case that used to work. The full run catches these side effects.
Check each of the following before you activate:
- Every test that passed before still passes.
- The new test case, built from the failed conversation, now passes.
- Failures that remain are known and written down, not new.
Record the baseline
Capture the metrics you chose in the success-metrics chapter, for the period before the change. At minimum, record:
- Resolution rate and escalation rate.
- Escalations per topic, since your fix targets one topic.
- Feedback signals, such as thumbs-down counts, if you collect them.
- The number of sessions behind each figure.
Use a window long enough to include normal weekly patterns. A baseline taken only on a Monday after a product launch will mislead you.
Write the expectation down
For the returns example from the earlier chapters, the expectation might read: "Escalations in the Returns topic fall, order-status resolution stays flat, and no Returns conversation receives a delivery date." The last clause is checkable by conversation review. The first two are checkable by metrics.
Versions and activation
Agentforce Builder keeps agent changes in versions. You edit a draft, and you activate the version you want customers to reach. Only one version of an agent is active at a time, and the earlier version remains available. That gives you a rollback path: if the new version misbehaves, reactivate the previous one. Menu names and details change between Salesforce releases, so confirm the exact steps in the Agentforce documentation for your org.
Some practical habits follow from this:
- Name or describe each version with the change it carries, such as "Narrow Order Status scope, add Returns fallback." You will want this when you read a metric chart weeks later.
- Release one logical change at a time. If you edit three topics and an action in one version and the escalation rate moves, you cannot tell which edit did it.
- Note the activation time. Every comparison depends on knowing which sessions ran on which version.
If your org allows a sandbox or limited audience before full activation, use it for risky changes. Availability depends on how the agent is deployed, so check what your channel supports.
Early signals versus final results
Right after activation you cannot judge rates, because few sessions exist. You can still look for loud failures.
Early signals, checked within the first hours or day:
- Review a handful of the first conversations in the affected topic, using the reasoning trace.
- Confirm the intended topic and action are selected for the utterances you targeted.
- Watch for errors or failed actions, which often appear as a sudden pile of escalations.
Final results, checked once enough sessions accumulate:
- Rate comparisons against the baseline.
- Per-topic breakdowns.
- Feedback trends.
An early spike in escalations is a reason to look at conversations and consider rollback. A small rate difference after twenty sessions is not a result.
Comparing before and after
A difference in rates between two periods can come from your change, from different traffic, or from chance. Three habits reduce the risk of fooling yourself.
Compare like with like. Compare the same weekdays, the same channel, and the same topics. If a promotion or an outage changed what customers asked about, the traffic mix shifted and the comparison is weak.
Check the sample size. Ten sessions going from 50% to 70% resolved is two sessions. A rough significance check helps you decide whether a gap is worth believing. The script below uses a two-proportion z-test, which is a standard way to compare two rates.
from math import sqrt
def two_proportion_z(x1, n1, x2, n2):
"""z-score for the change from rate x1/n1 (before) to x2/n2 (after)."""
p1, p2 = x1 / n1, x2 / n2
pooled = (x1 + x2) / (n1 + n2)
se = sqrt(pooled * (1 - pooled) * (1 / n1 + 1 / n2))
return (p2 - p1) / se
# Hypothetical counts from reviewed or exported sessions.
before = {"n": 200, "resolved": 120, "escalated": 70}
after = {"n": 200, "resolved": 144, "escalated": 50}
for name in ("resolved", "escalated"):
z = two_proportion_z(before[name], before["n"], after[name], after["n"])
print(
f"{name}: {before[name] / before['n']:.0%} -> "
f"{after[name] / after['n']:.0%}, z = {z:.2f}"
)The script prints:
resolved: 60% -> 72%, z = 2.53
escalated: 35% -> 25%, z = -2.18As a rough rule, a z-score beyond about 1.96 in either direction suggests the gap is unlikely to be chance alone. The test assumes sessions are independent, which is only approximately true, since one customer can produce several sessions. Treat it as a sanity check, not proof.
Watch for metrics that improve for the wrong reason. A lower escalation rate is good only if customers are being helped. If you removed an escalation path, the rate falls while unresolved customers pile up. Always read the escalation rate next to the resolution rate and a sample of conversations.
Guarding against regressions elsewhere
Look beyond the topic you changed. Compare escalations per topic across the whole agent before and after. A fix to Returns that raises escalations in Order Status means the narrower Returns description or the new exclusions are catching or missing the wrong utterances.
Also read a sample of conversations that your regression set does not cover. Pick some from the changed topic and some from neighbors. Any real failure you find becomes a new test case, which keeps the regression set growing with the agent.
Decision rules
Decide in advance what each outcome triggers, so you are not rationalizing afterward.
| Observation | Action |
|---|---|
| Targeted metric improves, no other topic worsens | Keep the version and record the result |
| Targeted metric flat, conversations show the fix works | Wait for more sessions, or check traffic mix |
| Targeted metric flat, conversations show the old failure | Diagnose again; the cause was misclassified |
| Another topic worsens | Roll back, add a test for the side effect, retry |
| Errors or escalation spike right after activation | Roll back first, investigate second |
Rolling back is cheap and reversible. Staying on a bad version while you debug is costly because customers keep hitting it.
Closing the record
After each release, write a short entry: what changed, the baseline, the expectation, the result, and the decision. Keep it with the version description. When a metric drifts later, this log tells you which release to suspect.
Exercise
You activate a new version that narrows the Order Status topic. After three days, the overall escalation rate fell from 35% to 28%, but the resolution rate also fell from 60% to 55%, and Returns escalations doubled. What do you conclude, and what do you do next?
Show answer
The lower escalation rate is not a success, because resolution dropped and Returns escalations rose. The narrowed Order Status topic probably stopped catching some requests, and Returns is not handling them. Review Returns conversations and their reasoning traces to confirm. Consider rolling back to the previous version if customers are being left unresolved, then add test cases for the misrouted utterances. Fix the Returns topic description, rerun the full regression set, and release again as a single, separate change.
Exercise
Why should you record a baseline and write an expectation before activating a version, and why release one logical change at a time?
Show answer
Without a baseline you cannot tell whether a metric changed, and without an expectation you can explain any outcome after the fact. Releasing one change at a time lets you attribute a metric movement to a specific edit. If several edits ship together and a metric moves, you cannot tell which edit caused it or which one to roll back.