Production AI
Production AI Patterns
Runnable, measured demos for the production AI articles: checks between steps, retries, saved state, and recovery after a crash, in Python and JavaScript.
Runnable demos of what it takes to run AI features in production: checks, retries, state, and failure handling. They accompany the AI engineering series on snehalagrawal.com. Each demo is self-contained and runs locally in Python and JavaScript with Ollama: no API keys or paid services.
| Demo | Article | What it shows |
|---|---|---|
| 01-reliable-llm-pipeline | Building Reliable LLM Pipelines | A four-step pipeline for customer emails: how errors compound across steps, what checks between steps catch and miss, what retries fix, and what a crash costs with and without saved state |
Linting
The repository has one lint setup for every demo: Ruff for Python and ESLint for JavaScript.
npm install # ESLint (repository root)
pip install -r requirements-dev.txt # Ruff
npm run lint # both
Conventions
- Every demo has a README with the exact setup that produced the numbers in its article.
- Generated files (
runs/,data/tokenizer.json) and.envfiles are not committed.
From the repository's README on GitHub, synced Nov 15, 2026.