After taking a break for a bit I’m back revamping my AI 🤖 project architecture....
Teri Radichel @teriradichel@infosec.exchange
After taking a break for a bit I’m back revamping my AI 🤖 project architecture. I asked a lot of questions at the AWS Heroes Summit to various service teams and fellow heroes to try to get strategies to produce better results for less token burn.
Basically I was told that what I’m doing will burn a lot of tokens / credits.
Beyond that I’ve been following various sources and watching podcasts and conference presentations to get other ideas.
I’m working on two optimization approaches, the second of which I’ll get to later after proving that theory. But here’s the first change.
I already alluded to it but I created an architecture GitHub repo with the high level most important rules agents need to follow to maintain the correct architecture framework and concurrency model. It’s not a ton of detail but rather the things they most often get wrong using the data model and a fix for the concurrency issues.
In mapping that out I broke down the main final component I was completing when things went haywire that was doing the deployment tracking into four different projects:
- tracker xml updater
- error logger
- success logger
- diagram
All of those were in one project and there’s some complex logic that goes into each of those.
By breaking it apart each agent can focus on a much smaller aspect of the work with shorter instructions and area of focus.
One problem I was having is that are are specific rules for logging success.
When logging errors it just needs to log *everything*. An error in the error logging itself can cause an error to not be logged. So now the error logger is really simple. It logs everything.
The success logger can validate things and send anything that goes wrong to the error logger.
The things that need to be added to the diagram or logged can be written to a queue as files that get processed, eliminating concurrency issues.
The other thing I did was expand my agent framework to create a group of projects based on an architecture README.
That facilitated quickly breaking down the deploy project that was handling all the resources into one main coordinator with shared code and numerous smaller projects in separate repos very quickly,
What that means is once some code is working it can be more easily locked down and the complexity of all the individual projects is dramatically reduced.
I also separated configuration from code, making it easy to generate new configuration for new resources without breaking deployment code.
Some people told me they used dumber smaller models for planning to reduce cost. That doesn’t work for me. I proposed a planning step to a smaller model and it basically got everything wrong when evaluating with a smarter model. I have other ideas on that but for the moment doesn’t work on this project with existing models.
That said, dividing the logic into smaller projects has seemed to slow the burn rate. Or is it a coincidence? So much inconsistency it’s hard to know.
Also the burn rate slowed but the model performance degrades terribly at midnight like clockwork. It improved in the wee hours of the morning as I was sucked in and working too long again.
I hope at some point, someone will figure out what is causing that.
Anyway I was running 6-8 agents at a time last night revamping all the code to work in the new architecture. It seems to be going well but it didn’t exactly work out of the gate. The agents didn’t name things according to architecture specifications. Things didn’t run on first try. Agents keep trying to tell me to change the parallel processor which is working fine. Not all functionality was rebuilt in the new architecture as requested. Had to explicitly tell it to pull in missing functionality.
We’ll see if I can get it running again today, sans concurrency issues. Stay tuned.