I've spent the last few weeks wrestling with a problem that I suspect many AI builders share: my research assistant agent was smart, but it had the memory of a goldfish and the spending habits of a trust fund kid.

Every time I asked it to help me find research papers on AI/ML topics, it would recommend articles I'd already read. It would suggest the same paper three times in a single conversation. And worse—it was using GPT-4 for every single query, even when a simpler model would have worked fine.

So I built something better. A research assistant that actually remembers what I've read and thinks about how much each query costs before it runs.

Here's how I did it.

The Problem: Amnesia Is Expensive