The State and Observer Patterns in a Python Agent LoopIn a hurry? An agent is a model calling tools in a loop. The model decides how many rounds there are. Your code only decides the ceiling. The State pattern gives each situation the loop can be in it12KAOct 5 · 24 min readthearchitectsmind.hashnode.dev
Dependency Injection and Interface Segregation in a Python RAG RetrieverIn a hurry? Dependency injection means an object is handed the things it uses instead of creating them itself. My vector store is handed its embedding model. A test hands it a fake that returns numbe1AOct 3 · 21 min readthearchitectsmind.hashnode.dev
The Composite Pattern in a Python LLM PipelineIn a hurry? Composite is a container that answers the same call as the things it holds. Calling code can't tell one step from a whole pipeline, and doesn't need to. That only works if every step takOct 1 · 16 min readthearchitectsmind.hashnode.dev
Template Method, and Why Your LLM's Memory Isn't Its Chat HistoryIn a hurry? Here's the whole post. Template Method is a base class that runs the steps and asks the subclass for one of them. The steps that must never differ live where no subclass can touch them. Sep 27 · 19 min readthearchitectsmind.hashnode.dev
Strategy and the Registry Pattern Never Clicked for Me Until a Model Started Calling My FunctionsIn a hurry? Here's the whole post. Phase 3 lets a model ask my code to run one of my Python functions, and puts the answer back into the conversation. The data became polymorphic. A reply used to beSep 24 · 15 min readthearchitectsmind.hashnode.dev