Evaluating Knowledge Interventions › Multi-edit and sequential interventions
Language AI HandbookAll chapters Single-edit evaluation is the pedagogical case. Production interventions are sequential: you refresh one fact, then another, then unlearn a third, and you must know the evaluation remains honest after each step. Two failure modes dominate.
Interference between edits. Editing fact A and then fact B can interact. If both edits touch the same subject, the second may overwrite the first, or they may compose into nonsense. The evaluation must run after each step and re-run the earlier slices to confirm they survive. We can simulate this with our toy model by applying a sequence and measuring each slice at every step.
Evaluation drift. The evaluation slices themselves evolve (you add probes, retire stale ones). If you compare the metric at step 1 computed on slice S1 against the metric at step 5 computed on slice S5, you are comparing incomparable numbers. Auditable evaluation versions the slices (the slice_hashes above) and reports per-version metrics so a change in score can be attributed to the model, not the test.
Interference and drift compound in a way that is easy to miss: if you upgrade the slices between edits, a score drop could be an interference effect, a drift effect, or both, and the factors cannot be separated from the final number alone. Hold the slice version fixed across checkpoints to separate changes in measured behavior from changes in the tests. Then, when you do version the slices, run a re-evaluation pass on the new version using the recorded model states, so the version change is measured as a change in the metric with everything else held fixed.
PythonIn [31]Expand
def sequence_evaluation(edits_seq, facts):
"""Score a fixed probe set after each change, including earlier targets."""
target_keys = {(edit["subject"], edit["relation"]) for edit in edits_seq}
if len(target_keys) != len(edits_seq):
raise ValueError(
"Use a separate versioned reference for repeated target keys"
)
model = ToyKnowledgeModel(facts, TEMPLATES, temperature=0.0, seed=0)
history = []
lookup_probes = (
make_edit_surface(edits_seq)
+ make_distinct_slice(edits_seq, facts)
+ make_same_relation_slice(edits_seq, facts)
)
for index, edit_spec in enumerate(edits_seq, start=1):
model.edit(
edit_spec["subject"], edit_spec["relation"], edit_spec["new_obj"]
)
if index == 2:
# A deliberately coupled toy update undoes the first edited answer.
prior = edits_seq[0]
model.edit(prior["subject"], prior["relation"], prior["old_obj"])
results = score_items(model, lookup_probes)
history.append(
{
"step": index,
"edit": edit_spec,
"summary": summarize(results),
"targets": [
result
for result in results
if result["slice"] == "edit_surface"
],
}
)
return history
edits_seq = [
{
"subject": "The Night Orchard",
"relation": "author",
"old_obj": "Mara Vale",
"new_obj": "Jonah Reed",
},
{
"subject": "Tide Atlas",
"relation": "publication_year",
"old_obj": "1984",
"new_obj": "1985",
},
]
seq_history = sequence_evaluation(edits_seq, facts)We hold both target probes fixed and keep their answers after every step. The pooled curve uses both final goals as its denominator. At step one, it counts the second target as a failure against the final goal even though its edit has yet to run. Report a separate rate over applied edits if the question is current progress. The helper accepts distinct target keys. If the second intervention intentionally supersedes the first value of the same key, specify a versioned expected answer at each checkpoint. A planned supersession is a different outcome from interference.
VisualizationOut [33]Expand

ConsoleOut [34]Expand
step 1: edited The Night Orchard [author] -> Jonah Reed
edit_surface acc=0.50 (n=2)
distinct acc=1.00 (n=2)
same_relation acc=1.00 (n=4)
step 2: edited Tide Atlas [publication_year] -> 1985
edit_surface acc=0.50 (n=2)
distinct acc=1.00 (n=2)
same_relation acc=1.00 (n=4)After the second edit, the later target is correct and the first target has reverted. The unchanged aggregate target score hides this swap. Track each prior target through the sequence alongside the preservation probes.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!