I've been exploring the maths on how to optimise agents, for both accuracy and robustness. Generally, robustness means small changes in inputs to system (e.g. a prompt) don't change the end outcome much (e.g. an agents answer). When building AI agents, it often seems small changes to the prompt can make or break they agent. They are very fragile. Part of the issue is we don't really know what small is. Unlike distance in a 3d space, there is no good definition for the distance between two prompts. Without this definition, its hard to have a reliably good optimisation or reinforcement learning routine. So I did some exploration and found some good statistical measures that are a a near-distance with distance and can help provide the foundation for a more mathematically provable robust agent. Interestingly, these show that distance is a function of both the prompt and the question being asked. https://lnkd.in/gg6dfFka
love it. I wonder how it changes across the different models or even different versions of the same model (eg. Opus 4.8 vs Opus 5)