From Adapter to Actor: Architectural Patterns for Integrating AI in Your Application
How you integrate an LLM into your application fundamentally depends on who has control: does your code decide the flow while the LLM just responds, or does the LLM decide what to do next? This distinction leads you to two very different architectural patterns. Pattern 1: LLM as Infrastructure When the interaction is simple—you send a prompt, you receive a response—the LLM is infrastructure. It’s just another external service, like a translation service or geocoding. ...