Build an Advanced RAG Application (From Scratch)
by Manning Publications (Hamza Farooq)
Build semantic search, RAG, semantic caching and agentic routing by hand, without LangChain or LlamaIndex.
Overview
Build an Advanced RAG Application (From Scratch) is a Manning Early Access Program (MEAP) book by Hamza Farooq, founder and CEO of Traversaal.ai, a former research scientist at Google and an adjunct professor at institutions including Stanford, UCLA and the University of Minnesota. The MEAP started in October 2024 and was last updated in April 2026; seven of eight chapters are available and publication is estimated for early 2027, at about 325 pages, with a Korean translation already listed. Its premise, stated in the author's welcome letter, is building search engines and RAG systems without pre-built frameworks such as LangChain or LlamaIndex so every pipeline stage can be customised. Part 1 covers the world of large language models and an in-depth look at the transformer architecture. Part 2 is retrieval: encoder models for semantic-based retrieval systems, then semantic search from scratch. Part 3 turns to generation, starting with decoders in action, which covers greedy, beam search and sampling decoding, zero-shot, few-shot and chain-of-thought prompting, and risks such as hallucination and prompt injection, followed by a full RAG chapter. Part 4, Agentic RAG, covers enterprise RAG with agentic routing, semantic caching and query rewriting, and then deploying RAG into production. A hotel-search scenario runs through the book and becomes a search engine with semantic ranking, and the material also covers fine-tuning for domain adaptation and serving quantized open-source models with vLLM and Ollama. Some model comparisons still reference the GPT-4 era, and no public companion code repository surfaced in our research.
At a Glance
- Topic
- RAG
- Level
- Intermediate
- Format
- Book
- Cost
- Paid
- Duration
- ~325 pages (estimated), 8 chapters in 4 parts, self-paced
- Provider
- Manning Publications (Hamza Farooq)
- Hands-on
- Yes — code/exercises
- Certificate
- None
What You’ll Learn
- ✓Explain how transformer encoders and decoders differ and where each fits in a RAG system
- ✓Build semantic search from scratch using encoder embeddings instead of a framework
- ✓Build a hotel search engine that ranks results by semantic relevance
- ✓Choose between greedy decoding, beam search and temperature, top-k or top-p sampling for generation
- ✓Apply zero-shot, few-shot and chain-of-thought prompting to turn retrieved results into evidence-backed answers
- ✓Implement semantic caching to make production RAG deployments more cost-effective
- ✓Add agentic routing and query rewriting to an enterprise RAG pipeline
- ✓Deploy quantized open-source LLMs for RAG using vLLM and Ollama
Highlights
- •Deliberately framework-free, so you learn what LangChain and LlamaIndex abstract away
- •Written by a former Google research scientist who is an adjunct professor at Stanford and UCLA
- •Goes past naive RAG into agentic routing, semantic caching and query rewriting for enterprise workloads
- •One running hotel-search scenario ties the retrieval, ranking and generation chapters together
- •Also covers the generation side that RAG tutorials skip: decoding strategies, prompt injection and hallucinations
Who It’s For
Best For
- ✓Python developers who have outgrown LangChain or LlamaIndex RAG tutorials
- ✓Search and ML engineers building domain-specific retrieval systems
- ✓Teams that need cost-controlled RAG on self-hosted open-source models
Prerequisites
- •Hands-on Python experience
- •General AI concepts and NLP basics
- •Basic machine learning and experience working with APIs
FAQ
What is Build an Advanced RAG Application (From Scratch)?
A Manning early-access book for Python developers who want to build retrieval-augmented generation systems without leaning on LangChain or LlamaIndex. Starting from transformer fundamentals, you build semantic search from scratch, a hotel search engine with semantic ranking, a full RAG pipeline, and enterprise features such as agentic routing, semantic caching and query rewriting, then deploy open-source LLMs.
Is Build an Advanced RAG Application (From Scratch) free?
Build an Advanced RAG Application (From Scratch) is a paid resource.
What level is Build an Advanced RAG Application (From Scratch) for?
Build an Advanced RAG Application (From Scratch) is aimed at a intermediate audience. Recommended background: Hands-on Python experience, General AI concepts and NLP basics, Basic machine learning and experience working with APIs.
How long does Build an Advanced RAG Application (From Scratch) take?
Expect roughly ~325 pages (estimated), 8 chapters in 4 parts, self-paced. Most learners work through it at their own pace.
What will I learn from Build an Advanced RAG Application (From Scratch)?
You'll learn: Explain how transformer encoders and decoders differ and where each fits in a RAG system; Build semantic search from scratch using encoder embeddings instead of a framework; Build a hotel search engine that ranks results by semantic relevance; Choose between greedy decoding, beam search and temperature, top-k or top-p sampling for generation; Apply zero-shot, few-shot and chain-of-thought prompting to turn retrieved results into evidence-backed answers; Implement semantic caching to make production RAG deployments more cost-effective; Add agentic routing and query rewriting to an enterprise RAG pipeline; Deploy quantized open-source LLMs for RAG using vLLM and Ollama.
Topics
Sources
This page was written from 4 sources, 2 on domains other than manning.com.