Shivam Negi

Writing / Book review

SYSTEMS JOURNAL/FIELD NOTE 11/Book review

LLM Engineer's Handbook: RAG, Fine-Tuning, and Production LLMOps

I read Iusztin and Labonne's hands-on guide to LLM pipelines and rate it 4.5: a strong end-to-end system, honest on RAG, tuning, and serving, though the code has aged faster than the ideas.

16 min read9 systems diagrams

  • LLMOps
  • RAG
  • evaluation
Cover of LLM Engineer's Handbook: Master the Art of Engineering Large Language Models from Concept to Production by Paul Iusztin and Maxime Labonne
Book
LLM Engineer's Handbook: Master the Art of Engineering Large Language Models from Concept to Production
Author
Paul Iusztin and Maxime Labonne
Publisher
Packt Publishing, 2024
ISBN
9781836200079
Assessment
★★★★½ 4.5/5
provisional, based on public materials

VerdictA hands-on production manual for LLM pipelines, strongest on RAG, evaluation, and the deploy and monitor loop, not a theory of model internals.

I read this book the way it asks to be read: as a project, not a textbook. Iusztin and Labonne do not set out to teach me how a transformer works. They set out to get a language model application out of a notebook and into production, with data, retrieval, tuning, evaluation, and monitoring attached. That is the whole pitch, and I liked it more than I expected to.

The book is LLM Engineer's Handbook: Master the Art of Engineering Large Language Models from Concept to Production, by Paul Iusztin and Maxime Labonne, with contributions from Niladri Sen, Julien Chaumond, Hamza Tahir, and Antonio Gulli. Packt published it in October 2024. It runs to 522 pages, and its ISBN-13 is 9781836200079. The title promises mastery. I would not call it mastery. I would call it a solid apprenticeship with a deployment at the end, which is a more useful thing.

The book hangs on one idea, and it is a good one. It has me build a single production pipeline, then keep extending it. The pipeline is an LLM Twin, a system that answers questions in the voice and style of a particular author, using that author's public writing as its source material. It is a clever demo: narrow enough to be real, strange enough to be memorable, and it gives every technical choice a clear job. Retrieval hands the twin the right passages. Fine-tuning shapes tone where prompting falls short. Evaluation tells me whether a change helped or hurt. The loop runs again, with evidence at each step.

One honest note before I go further. The code has aged badly, and I will get to that. The architecture underneath has held up better than the commands around it.

The production pipeline the book builds

I start with data collection and preparation. The book uses crawlers that gather public written material, then cleaning and structuring, then storage in a form later stages can use. MongoDB is named as part of the tooling here, which points to widely used open source components rather than bespoke infrastructure. The point is not to accumulate a large dataset for its own sake. It is to end up with a dataset I can trace back to its sources, clean enough to retrieve from, and structured enough to support both retrieval and fine-tuning.

From data, I move through feature and retrieval stages, then to generation, then to deployment and monitoring. The book presents these stages as a loop, not a straight line. A deployed system produces behaviour I can observe, and observation provides evidence for the next change. Ship, observe, learn, fix, and repeat is the habit the book returns to throughout.

The book also covers deploying LLM pipelines as microservices, with scaling across GPU and CPU resources. The aim is separation of concerns. Ingestion, retrieval, inference, and serving can be developed, tested, and scaled on different schedules. The trade-off is complexity. Microservices add operational overhead, and for a small application worked on by one person, a simpler deployment may be enough. I read the book's position as: the overhead is justified when the goal is a system that can grow. I would weigh that against the scale of the application before copying the shape.

A simplified view of the pipeline the book buildsDatacollectionCleaningand storageRetrievalGenerationDeploymentandmonitoringFeedbackinto thenext change
Figure 1 A simplified view of the pipeline the book builds (swipe to see the full diagram)

The loop deserves emphasis on its own, because it is the habit the book keeps coming back to. A system is not shipped once and left alone. It is shipped, observed under real traffic, checked for failures, and improved one change at a time.

The deploy, monitor, and retrain cycle1. Ship a change2. Watch realtraffic3. Find failures4. Fix one thing
Figure 2 The deploy, monitor, and retrain cycle (swipe to see the full diagram)

RAG

RAG receives serious attention here, and that is one of the strongest reasons to pick up the book. Retrieval augmented generation is the full name, RAG for short. The book covers two pipelines, and keeping them apart matters. The feature pipeline turns raw source material into retrievable units, with the metadata and structure that make those units useful. The retrieval pipeline finds the right units at request time and hands them to the model in a form it can use. Many introductions merge these two stages. When retrieval then breaks, the fault is hard to locate. With the stages separated, the fault may be in how the material was prepared, how it was indexed, how the query was formed, or how the retrieved material was used. Four places to check, not one undifferentiated whole. The production RAG chapters are a highlight.

The RAG material covers the practical decisions that determine whether retrieval actually helps. How should source material be split into chunks. How should those chunks be represented for search. How should different retrieval signals be combined. How much retrieved material should be passed to the model. Every decision is a trade-off. Short chunks are precise but can lose context. Long chunks keep context but can dilute the signal with irrelevant material. More retrieved material gives the model more to work with, but it also adds cost and latency, and it can introduce material that distracts from the question. The book is useful here because it treats these as engineering choices to test, not defaults to accept without a second thought.

Diagnose the failure before choosing the fixApplication output missesits targetDoes it lack currentreference information?Test retrieval and sourcequalityDoes it misunderstand thetask?Improve instructions andvalidate outputDoes it state retrievedfacts incorrectly?Check generation, grounding,and output checks
Figure 3 Diagnose the failure before choosing the fix (swipe to see the full diagram)

I apply the diagnostic habit above before I change a prompt or a model. Each row of the table below is one question to ask, what good looks like, and the red flag that indicates something is off.

CheckWhat good looks likeRed flag
Retrieved passagesPassages match the question and support the answerTop passages are off topic or stale
ChunkingEach chunk holds one clear idea with its contextChunks cut mid thought or mix topics
QueryThe query names the key terms and the intentThe query is vague or missing a key term
GroundingThe answer sticks to the retrieved materialThe answer adds facts with no source
Output formatThe answer fits the format the app expectsThe format breaks the next step

That table is a habit, not a score. If a row fails, I fix that row first. I do not tune a model to cover for weak retrieval.

Fine-tuning and alignment

Fine-tuning appears here as one tool among several, not the default answer to every problem. That ordering matters. Prompt engineering is cheaper and faster to change. Retrieval can supply knowledge the model does not have. Fine-tuning earns its place when behaviour needs to stay stable across many inputs, when the style or format required is hard to pin down in a prompt, or when the task needs consistent handling of one specific kind of input. The book covers fine-tuning and preference alignment, including direct preference optimisation, known as DPO, and the use of synthetic data. DPO is worth noting. It reflects a shift in practice away from supervised fine-tuning alone, toward methods that shape behaviour from comparisons between preferred and less preferred outputs. The SFT and DPO chapters were the most immediately useful part of the tuning material for me.

Synthetic data needs care. It can help when labelled examples are scarce, when the behaviour required is narrow, or when real examples are hard to obtain. It also carries risks. Data made by a model can repeat that model's errors, narrow the range of behaviour, or bake in assumptions that nobody checks against real inputs. I treat synthetic data as a starting point that needs validation, not as a substitute for understanding the task. Preference alignment raises the same point about evaluation. A tuned model can become more consistent in style while becoming less reliable in substance. It can also become more cautious in ways that make it less useful. The only way to tell is to measure behaviour before and after tuning on the same cases, with criteria that match what the application actually needs.

Two approaches side by sidePrompting firstLightweight changeNo weight updatesFast to test and reviseLimited when stable behaviour is neededFine-tuningStable behaviour across inputsNeeds clean data and evaluationSlower to change once trainedUseful for consistent style and format
Figure 4 Two approaches side by side (swipe to see the full diagram)

Evaluation

Evaluation is where this book separates production work from demo work. The book treats LLM evaluation as its own topic, and as a continuous activity, not a single check at the end. That framing is sound. A language model application can fail in many ways. It can retrieve the wrong material. It can misunderstand the request. It can give a fluent answer with no support in the sources. It can give a correct answer in a format downstream systems cannot use. One aggregate score will not separate those failures. Evaluation has to be built around the failure modes that matter for the application in question, and it has to be repeated every time the system changes.

The practical consequence is straightforward. I build an evaluation set early, before tuning or retrieval changes make comparison hard. It should include representative inputs, hard inputs, and inputs likely to expose known weaknesses. It should also include cases where the right move is to say the available material does not support an answer. A system that always sounds confident is a liability when accuracy matters.

Tip Keep a fixed test set before you change anything. Change one thing at a time, then re-run the same cases.
A practical evaluation loopDefine the targetState what success and failure mean for this applicationConstruct casesInclude representative, difficult, and adversarial inputsMeasure the stagesTest retrieval, generation, and output checks separatelyReview failures by handRead a sample of failures and group them by causeChange one thingAlter a single stage and measure again on the same cases
Figure 5 A practical evaluation loop (swipe to see the full diagram)

Inference and serving

Inference optimisation and serving are covered as production concerns, not optional extras. The book covers inference optimisation and quantisation, including LLM.int8(), and deploying pipelines as microservices with GPU and CPU scaling. The relevance is direct. A system that works in a notebook can still be too slow, too costly, or too fragile to serve real requests. That gap, between a working prototype and a working service, is where many projects stall. The book addresses it by treating latency, cost, and resource use as design constraints from the start. The inference optimisation and quantisation chapter earned its place as a highlight too.

Quantisation is a good example. Reducing the precision of model weights can cut memory use and speed up inference, but it can also change behaviour in ways that need to be measured. The decision to quantise is therefore not purely technical. It depends on how accurate the application needs to be, what hardware is available, and how much small change in output can be tolerated. A reader who understands that trade-off is in a stronger position than one who simply enables the setting and hopes for the best.

A simplified request pathUser requestRetrievalModelinferenceOutputvalidationResponse
Figure 6 A simplified request path (swipe to see the full diagram)

The same request is shown below as a step by step exchange. It makes the handoffs visible, and handoffs are where production faults tend to hide.

A production request, step by stepUserAppRetrieverModelAsk a questionFetch passagesReturn passagesGenerate with contextReturn an answer
Figure 7 A production request, step by step (swipe to see the full diagram)

Strengths, limitations, and what it will not teach

The main strength here is coherence. One pipeline gives a reason to learn each technique, and it gives each technique a place in a larger system. Following the pipeline produces something that resembles a real application, with data ingestion, retrieval, generation, evaluation, and deployment, rather than a pile of isolated examples. That is a solid achievement for a technical book. It is also why the book works well as a study project over several weeks, rather than as a book to rush through in one sitting. The parts I would praise most are the same parts that make the book work: the LLM Twin end-to-end system from raw data to a deployed endpoint, the SFT and DPO chapters, the production RAG chapters, and the inference optimisation and quantisation chapter.

Now the honest part. The code does not run as printed. Packages moved on, interfaces changed, and some of the examples need repair before they do anything at all. Anyone following along should expect to spend time fixing versions and pins before the pipeline runs. Running the repo once also costs roughly 25 US dollars, mostly on AWS SageMaker, which is not a fortune but is worth knowing before starting.

The other criticisms land too, in smaller ways. The book is shallow on the why in places: it shows me how to wire a stage up and leaves me to work out the reasoning behind the choice. The stack is opinionated and AWS-shaped, so a reader on different infrastructure will be translating as they go. And there is no agents chapter, which was a defensible choice in 2024 and looks like a gap now.

So why 4.5? Because the weak spots are mostly the code and the edges, and the rating is about the system the book teaches. The pipeline, the separation of the two RAG stages, the evaluation discipline, and the deploy and monitor loop are durable ideas. The commands around them are not, and the book never really claims otherwise. I docked it for the code rot and the thin reasoning in places, and I still rate it 4.5, because the architecture it teaches is the part I would keep.

The limits follow from the same choices. A book built around one pipeline is less handy as a reference for a reader who wants one technique on its own, because the explanation of that technique may lean on earlier stages. A reader who wants depth on model internals should look elsewhere as well. This book is about engineering around the model, not designing the model itself. I would check current tool versions and interfaces against the companion materials and the tool documentation before trusting a specific command. The architectural ideas are the durable part, and the specific commands are the part that ages.

A practical study plan and exercise

I treated the book as a project, not as a text to read passively. The plan below assumes familiarity with Python and basic experience calling a language model through an API or a local setup. First, I set up the pipeline skeleton and put data in motion. A small set of source documents can be collected, cleaned, stored, and used to retrieve a relevant passage for a test question. That should be working before anything more elaborate is added. I would also budget a little cloud spend up front, since running the repo is not free.

Second, I built and tested the RAG loop. A small evaluation set of questions with known answers drawn from the source material can be put together, and retrieval can be checked for how often it returns the passage that supports the answer. Then one change can be tried, such as changing the size of the retrieved units or the number of passages passed to the model, and the result measured again on the same questions. One change, same test set. That is the discipline.

Third, I added fine-tuning and alignment. A small, clean tuning set for a narrow behaviour, such as consistent formatting or a consistent tone, can be prepared, and the tuned model compared with the prompted model on the same evaluation cases. The comparison should record where tuning helped, where it made no difference, and where it made things worse. That record is the point.

Fourth, I extended evaluation and serving. The evaluation set should gain hard cases, including cases where the right answer is that the sources do not support a confident answer, and the pipeline should be deployed in a form that can be queried again and again. Outputs can then be sampled over several days, reviewed by hand, and checked for failure patterns. The final exercise is to write a short note, in plain language, that states what the system does, what it depends on, where it fails, and what change would most improve it. A clear note of that kind shows the system is actually understood.

Who should read it and how it compares

The likely audience is a software engineer or data scientist who already understands the basics of language models and now needs to build and maintain a system that uses them. It also fits a practitioner who built a prototype with prompting alone and reached the point where retrieval, tuning, or evaluation is needed to make it reliable. That is a common moment, and this book addresses it directly.

It is less suited to a reader who wants an introduction to language models from first principles, or depth on the mathematics and architecture of transformers. It is also less suited to a reader who wants a quick reference for one technique, because the explanations are tied to the pipeline the book builds. If the goal is to build a working system and understand the loop from data to deployment to monitoring, this is the more direct choice. If the goal is to survey the range of current practice without building one system, a survey will serve better.

The closest comparison on this site is AI Engineering, by Chip Huyen, which is already reviewed here. The two books cover overlapping ground, so the difference matters more than the overlap. AI Engineering is the broader survey. It covers the landscape of building with language models, from data and evaluation to deployment and operations, with a wide view of the choices a team faces. LLM Engineer's Handbook is the narrower, deeper companion. It commits to one pipeline and follows it through, which gives it more depth on the mechanics of RAG, on how retrieval and generation interact, and on the deploy, retrain, and monitor loop as it applies to that pipeline.

The practical consequence is that the two books work well together. AI Engineering provides a map of the territory and a feel for the trade-offs in each choice. LLM Engineer's Handbook then provides a concrete system where those trade-offs can be tested. The comparison with Build a Large Language Model From Scratch, by Sebastian Raschka, which is also reviewed here as LLM From Scratch, is simpler, because the two books ask different questions. Raschka's book is about the model itself: how a transformer is built, how it is trained, and how its parts work together. The Handbook is about the system around the model: how to supply it with knowledge, how to shape its behaviour, how to test it, and how to serve it.

Size is one more way to see the difference, and it is only about size. Longer does not mean better. It only shows how much ground the book tries to cover in print. The page counts below are the publisher figures. Packt lists this book at 522 pages, Packt lists Generative AI with LangChain at 484 pages, and Towards AI lists Building LLMs for Production at 465 pages.

Publisher page countsLLM Engineer's Handbook522 pagesGenerative AI with LangChain484 pagesBuilding LLMs for Production465 pages
Figure 8 Publisher page counts (swipe to see the full diagram)
The Handbook alongside its closest companionsLLM Engineer's HandbookOne pipeline, followed end to endDeeper on RAG, evaluation, and the deploy andmonitor loopBest for building a working systemAI EngineeringBroader survey of LLM engineering choicesWider view of team and organisationaltrade-offsBest for mapping the territory beforebuilding
Figure 9 The Handbook alongside its closest companions (swipe to see the full diagram)

Further reading and public sources

  • Packt catalog entry for LLM Engineer's Handbook, ISBN 9781836200079. Check the catalog for the current edition and companion materials.
  • Google Books edition page for LLM Engineer's Handbook: https://www.google.co.nz/books/edition/LLM_Engineer_s_Handbook/jHEqEQAAQBAJ
  • Related reviews on this site: AI Engineering and LLM From Scratch.

Verdict

I rate LLM Engineer's Handbook 4.5 out of 5, and that is my own judgment after reading it, not a hedge. It is a hands-on production manual for LLM pipelines, strongest on RAG, evaluation, and the deploy and monitor loop. It earns its place as a practical companion to a broader survey such as AI Engineering. It is not a theory of model internals, and it should not be read as one. Its value sits in the pipeline it builds, in the discipline it applies around evaluation and monitoring, and in the way it treats fine-tuning, retrieval, and serving as parts of one system, not as separate topics.

The code rot is real: expect to fix versions before anything runs. The system design in this book is production-shaped in a way the code no longer is. Read it for the pipeline and the evaluation discipline, keep a terminal open and a search engine handy, and it earns its 4.5.

Shivam Negi is an AI engineer and Principal Data Scientist who works on evaluating voice agents, small language models, and applied ML. More about me