Not all of us are token billionaires. Costs for frontier model inference has been going up. For example, GPT-5.5 costs twice as much as GPT-5.4. This is a guide with 17 ways of reducing token costs. Each measure is accompanied by estimated savings and the trade-offs necessary to make it work. As you’ll see, token costs can be reduced by 90% or more or be entirely free! The techniques are grouped…
If the model is the brain of the agent, connections to APIs, databases and apps are the arms. There are many ways to connect the arms to the agent: tools, Model Context Protocol (MCP), the Agent to Agent (A2A) protocol, command line interfaces (CLI), skills, a code interpreter and computer use (mouse and keyboard input). Characteristics In this article, I’ll compare these connectors based on the…
The term vibe coding just turned one. Andrej Karpathy, who coined it in February 2025 and long preferred autocomplete over agents, flipped to 80% agentic coding in January 2026 . Agentic coding has leveled up massively: Claude 4.5 Opus reached 80.9% on SWE-bench Verified , better harnesses enable longer runs and multi-agent collaboration, and we have new apps such as Codex for controlling them. In…
Unrealized potential due to lacking reliability A 2025 survey by Pan et al. (2025) among 306 AI agent practitioners found that reliability issues are the biggest barrier to adoption of AI agents in enterprise. To achieve the reliability required, practitioners are foregoing open-ended and long-running tasks in favor of workflows involving fewer steps. They control potential damage by building…
Climbing the tech wall. Image generated with GPT Image 1.5 In 2018, I graduated with a degree in economics and promptly pivoted to a career in data science. I effectively discarded the majority of the knowledge I had just acquired. My main motivation was my late discovery of a passion for programming. It took years of extra effort on nights and weekends to catch up to the capabilities of someone…
This is an analysis of the acclaimed book A Philosophy of Software Design (2nd Edition) by John Ousterhout in the context of AI coding. Building on it, I propose a theory of a reinforcing loop for development: design of software using the book’s principles enhances AI coding, and AI coding enhances the design process. Finally, I will share prompts to put it into practice. As the cover illustrates,…
2025 could be the year of agentic AI. The first agentic AI demos came out in early 2023 and the technology has gained momentum through better tools, smarter models, and the first successful commercial products. The interest in agentic AI is also reflected in the number of GitHub stars for frameworks: Star history of agentic AI frameworks, data retrieved on 2025-02-28 from star-history.com.…
HuggingFace recently released ModernBERT (Warner et al. 2024) , an updated version of the BERT language model (Devlin 2018) which backports many improvements from LLM research back to the classic 2018 model. In contrast to LLMs, ModernBERT is an encoder-only model that is fitted with a task-specific head outputting probabilities for structured NLP tasks, rather than tokens. While LLMs with their…
D2 code and rendered diagram of a Kafka cluster for a web shop Diagrams as code are an efficient way to communicate complex ideas and document software architecture. In this post I’ll explain how an AI assistant makes them even better. What is diagrams as code? It’s a diagram that is generated from markdown-like text. Rather than clicking and dragging, you write the text and the diagram is…
OpenAI recently added the ability to fine-tune their models using direct preference optimization (DPO). They call it preference tuning . Previously, their API only supported supervised fine-tuning (SFT). They join OpenPipe as one of the first pay-per-token APIs to offer DPO. This makes DPO more accessible to developers who don’t want the complexity of managing the training infrastructure…
Pydantic AI is a new agent framework by the company behind Pydantic, the popular data validation library. Pydantic has transformed how I write Python, so I’m excited for their take on agents. In this article I’ll walk through an example app and comment on my experience developing with PydanticAI. Note PydanticAI version 0.0.13 PydanticAI is in beta. This article is based on version 0.0.13. Code…
Frontier LLMs rarely give completely wrong answers. Even when their responses aren’t exactly what we need, they’re usually logical given the information provided. Recent advances in chain-of-thought reasoning, such as in models like OpenAI’s o1 and Alibaba’s QwQ , have led to remarkable achievements. These models now outperform most humans on complex tasks like competition mathematics (AIME 2024)…
Last year, my colleague Paavo Huoviala and I explored prompting and fine-tuning large language models for aspect-based sentiment analysis (ABSA) (Simmering and Huoviala 2023) . Like many researchers at the time, we spent considerable effort manually crafting prompts and selecting few-shot examples. But what if we could automate this process? Enter DSPy - a Python library that automatically…
Prompts are the key to guide LLMs for any task, from a chatbot to a text classifier. Longer prompts are usually better than shorter ones, as I’ll argue below. There is a tradeoff, though: each interaction with a long prompt has a longer input sequence, which increases inference cost and latency. Further, a long prompt takes up more of the model’s context window, leaving less for user interaction.…
On August 6 OpenAI released structured outputs in their API. Is structured outputs a replacement for instructor, outlines and other libraries that provide structured outputs for language models? Let’s compare them. OpenAI’s structured outputs makes the following code possible: import json from pydantic import BaseModel from openai import OpenAI class Ingredient(BaseModel): name: str amount: str…
Training and serving LLMs requires a tall software stack. You can engage with this stack at different levels of abstraction, from low-level frameworks like CUDA to ready-to-go inference APIs like the OpenAI API. The aim of this article is to provide an overview of the abstraction levels and help you choose the right one for your project. Typical questions are: “ Should I use OpenAI’s GPT models or…
It’s unfortunate, but there are many waiting times in data science. Dealing with them well can make work more productive and enjoyable. Common waiting times include: model is training data pipeline is running report is rendering Docker image is building tests are running someone else is reviewing your code huge upload/download Waiting isn’t new in software development. XKCD 303 These waits range…
The launch of the review analysis project has me working on various marketing tasks. Naturally, I built a tool to let LLMs help with the creative process. It’s called Text Tournament and the purpose is to compare ideas for company names, taglines, product descriptions and ad copy in a tournament-style competition. The project is available on GitHub under the MIT license. This is the companion blog…
The pace of publishing in machine learning is extremely high. There were 242,290 AI publications in 2022. That’s 663 per day, or one every two minutes. Based on comments on X, Reddit and Discord, I can see that many people feel FOMO, overwhelmed or inadequate because they can’t keep up, even in subfields they’re supposed to be experts in. Number of AI publications by year, Source: Stanford…
It’s easy to underestimate how vast and heterogeneous the world is. For entrepreneurs and developers this has two implications: There are many niches to exploit. It’s hard to scale. Detail creates opportunities Some examples of detail: geography, languages, currencies, time zones, cultural norms, consumer preferences, age groups, currencies, laws, corporate structures, payment systems and so on.…