LLM App Production Checklist: Cost, Caching, Retries, and Safety
Eleven practices that keep an LLM feature alive in production, ranked by impact, each with a wrong example, a right example, and a way to verify…
Category
Practical Python for engineering work. Language fundamentals, tooling, testing, concurrency, data, web APIs, and AI features.
34 articles
Eleven practices that keep an LLM feature alive in production, ranked by impact, each with a wrong example, a right example, and a way to verify…
Separate deterministic tests from evals, build a golden dataset, score with code before judges, and read pass rates…
Expose your own tools and data to AI assistants through the Model Context Protocol: a complete Python server,…
Turn model replies into validated Python objects: one Pydantic schema, schema-constrained generation where available, and a repair loop…
Python 3.13 ships an optional build without the GIL and an experimental JIT. Learn what each one does…
uv replaces pip, venv, pip-tools, pipx, and pyenv with one fast tool. Learn the project workflow, the lockfile,…
An agent is a loop around a model that can ask for tools. Build one in plain Python…
Install Ollama, pull an open model, and call it from Python with streaming, error handling, and a speed…
Retrieval-augmented generation in about 150 lines of plain Python: chunking, retrieval, a grounded prompt with citations, a refusal…
Turn text into vectors, store them in a NumPy matrix, and rank by cosine similarity. A complete semantic…
Use the v1 OpenAI Python client properly: explicit timeouts, bounded retries, specific error handling, streaming output, and tests…
Python 3.12 brings cleaner generic syntax, unrestricted f-strings, smarter error messages, and the removal of distutils. Here is…
Build a complete task API with FastAPI: typed request and response models, a database session per request, proper…
Validate untrusted data with typed models, write field and model validators, serialize with model_dump, and load typed settings…