For the archived Jenkins report, I would preserve the failing build’s execution context alongside the sanitized error: agent image, JDK and Maven versions, pipeline revision, and the stage that failed. The same dependency-resolution message can require a different investigation after an agent-image change.
Those fields can guide retrieval without treating the previous incident’s fix as automatically applicable. A useful fixture would repeat the same visible error under two different agent configurations and check whether the assistant proposes the appropriate diagnostic checks for each, rather than copying the nearest historical resolution.