Hands-On Large Language Models versus Prompt Engineering for LLMs.
Both show up on every "best" list. They're not competitors. They're a sequence. Here's which one to read first, and when.
Reviewed by Ashish Sheth · Updated May 2026
Author
Jay Alammar, Maarten Grootendorst
John Berryman, Albert Ziegler
Pages
425
282
Published
2024
2024
Publisher
O'Reilly Media
O'Reilly Media
Level
beginner to intermediate
intermediate
Amazon Rating
4.5/5 (392)
4.1/5 (60)
Goodreads Rating
4.29/5 (254)
3.89/5 (79)
Hands-On Large Language Models
Strengths
+ 275+ custom diagrams make abstract concepts visual and intuitive
+ Accessible to beginners without prior PyTorch/TensorFlow knowledge
+ Practical code examples covering real use cases like semantic search and RAG
+ Well-structured progression from foundations to advanced techniques
Caveats
− Limited depth on transformer internals despite the author's blog reputation
− Image generation sections lack clarity
− May be too introductory for experienced ML practitioners
Prompt Engineering for LLMs
Strengths
+ Focuses on understanding why techniques work, not just memorizing patterns
+ Written by practitioners who build one of the world's largest LLM products
+ Good visual explanations and exercises throughout
+ Research-backed approach with references for deeper exploration
Caveats
− Heavy GPT-3 focus makes some content feel dated
− Longer than it needs to be, some sections are unnecessarily verbose
− Some later chapters feel too abstract for practical application
The verdict
Read Hands-On Large Language Models first to build foundations, then move to Prompt Engineering for LLMs for advanced concepts.
Hands-On Large Language Models
Check Price on Amazon →
Prompt Engineering for LLMs
Check Price on Amazon →
Frequently asked
Which is better, Hands-On Large Language Models or Prompt Engineering for LLMs?
Read Hands-On Large Language Models first to build foundations, then move to Prompt Engineering for LLMs for advanced concepts.
Is Hands-On Large Language Models good for beginners?
Yes, it's one of the most beginner-friendly LLM books available. No PyTorch or TensorFlow experience needed. The 275+ diagrams carry a lot of the explanation load.
Is this just a collection of prompt templates?
No. It focuses on understanding why prompts work at the architectural level. You'll learn principles that apply to any model, not templates that stop working when models update.