AI Systems Engineering Patterns
Reference guide based on AI Systems Engineering Patterns by Alex Ewerlof.
Interface Patterns
- Structured JSON Prompting — Validate input against schema before reaching the LLM
- Prompt Template Pattern — Treat prompts as source code, user input as variables
- Structured Outputs — Force AI output to valid JSON via native constraints
Prompting & Context Patterns
- Context Caching — Cache static prompt portions to reduce cost (up to 80%)
- Progressive Summarization — Compress oldest messages to maintain fixed context size
- Memory Management — Distinguish episodic (events) from semantic (facts) memory