
by Hernán Díaz Rodríguez, PhD · Professor at the University of Oviedo
Building Applications with Language Models teaches how to build reliable applications on top of an already trained language model. Over twelve chapters, it builds, piece by piece, the customer service assistant of North Cycles, a bicycle store in Portland, Oregon: prompts that work, examples and reasoning, structured outputs, semantic search, RAG, context and cost management, function calling, LoRA fine-tuning, evaluation and guardrails. The last chapter puts all the pieces together into an application with a web interface.
Everything runs on free, open models, with no API keys or paid services: Qwen2.5-1.5B-Instruct on Colab’s free GPU and, without a GPU, Qwen3-0.6B on the processor. Every figure in the book comes from an experiment you can repeat in the chapter’s notebook. This edition is not a plain translation: the store, its data and every experiment are its own, run in English.
It belongs to the AI in Practice series: hands-on books on artificial intelligence, with original experiments, a notebook and a video in every chapter.
¿Prefieres español? La edición española, Ingeniería de aplicaciones con modelos de lenguaje, está en la raíz del repositorio.
Each chapter has its notebook on Google Colab and its video, with Robotín and the author. All the videos are in the YouTube playlist.
data/ folder by themselves the first time.North Cycles and all its data are fictional: e-mails, FAQ, terms and conditions, catalog, orders, stock and the test sets of each chapter, in data/. The manual labels used in chapter 10 are in chapter_10/.
This material is distributed under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) license: it can be used and adapted for teaching and study, crediting the author, but not for commercial purposes. The models used by the notebooks have their own licenses: Qwen2.5 and Qwen3 (Apache 2.0), multilingual-e5-base (MIT) and bge-reranker-v2-m3 (Apache 2.0).