Sitemap
David Rodenas PhD

David Rodenas PhD⁠

Passionate software engineer & storyteller. Sharing knowledge to advance our skills. Join me on a journey of discovery in the world of software engineering.

Member-only story

Clean Context

Time Travel for Tool Calls

Don’t just fix your LLM’s mistakes. Rewrite its history, and it will believe it was right all along. And start acting like it.

--

When an LLM gets a tool call wrong, we usually choose between two answers: return an error and hope it corrects itself, or quietly normalize the input and move on. Both seem reasonable. But one records the mistake as a failure, and the other records it as a success. Either way, the mistake stays in the context, and the context is the model’s only memory. Turns out there’s a third option, one that only exists because an AI is neither machine nor human: go back in time and rewrite its history. The surprising part isn’t that the model never notices. It’s what it does next.

Welcome to the fourth installment of the series on how to make the most of tool calls to extend the LLM’s capabilities.

In the previous articles I introduced the hangman game tool call as a counterpoint to the typical one that asks for the time or the weather. Why? To get a broader view of what tool calls can do and how they can improve the AI’s capabilities.

In the first one I showed how it worked, basically the happy path, assuming the AI would do everything right. In the second, I explained how to…

--

--

Passionate software engineer & storyteller. Sharing knowledge to advance our skills. Join me on a journey of discovery in the world of software engineering.