Building Agent-Powered Applications Your guide to generative AI, RAG, fine-tuning, and orchestration for production use (Vasyl Zvarydchuk)(Z-Library)
AI
No description
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
AI guide
# Building Agent-Powered Applications
## 【One-Line Pitch】
A practical, end-to-end guide for software engineers and data scientists who want to move from traditional development into building production-ready generative AI applications—covering everything from NLP fundamentals through LLM architecture, prompt engineering, RAG, fine-tuning, and agent orchestration.
## 【Book Arc】
- **Opening (~0%–10%)**: Establishes the AI/NLP foundation—neural networks, supervised vs. unsupervised vs. reinforcement learning, tokenization, embeddings, and similarity metrics. Designed as a refresher for data scientists and an accessible entry point for software engineers new to AI concepts.
- **Early (~10%–23%)**: Dives into embeddings in depth—static vs. contextual, word-level vs. sentence-level—and transitions into LLM architecture. Explains sequence-to-sequence models, encoder-decoder designs, and transformer fundamentals with concrete code examples.
- **Early (~23%–32%)**: Covers LLM training objectives (causal vs. masked language modeling), training datasets, benchmarking, small language models, and multimodal models. Explains practical usage concerns: context windows, sampling/randomness, and hallucinations.
- **Middle (~32%–48%)**: Moves into prompt engineering—basic and advanced techniques, few-shot learning with example selection, and classifier-based example routing (e.g., NL2SQL categorization). Bridges model understanding to practical application design.
- **Late (~48%–100%)**: Progresses through RAG, fine-tuning, and AI agent orchestration for production. Includes evaluation strategies, jailbreak/adversarial prompt testing, and production deployment considerations. (Note: excerpts thin out here; later chapters are summarized from TOC and early references.)
## 【Key Takeaways】
- **Supervised vs. unsupervised vs. reinforcement learning form the conceptual bedrock** (Early): The book uses intuitive analogies—a mother teaching a child animal names (supervised) vs. an alien grouping creatures by similarity (unsupervised)—to make ML paradigms accessible before diving into LLM specifics.
- **Static embeddings are efficient but context-blind** (Early): Words like "bass" (fish vs. instrument) share the same vector in static embeddings, which are precomputed look-up tables. This limitation motivates contextual embeddings, where word representations shift based on surrounding text.
- **Contextual embeddings are trained as part of the model** (Early): Unlike static embeddings, contextual embeddings are generated dynamically at runtime and optimized alongside other model parameters—a key distinction for understanding how modern LLMs represent meaning.
- **Sentence-level embeddings enable semantic search and RAG** (Early): Mapping entire sentences to fixed-size vectors unlocks practical tasks like semantic similarity comparison, document classification, and retrieval-augmented generation—a foundation for later chapters.
- **Causal vs. masked language modeling serve different purposes** (Early): CLM (used by GPT, LLaMA, Mistral) predicts the next token with unidirectional attention, ideal for generation. MLM (used by BERT) predicts masked tokens from bidirectional context, traditionally better for understanding tasks—though large CLM models now rival MLM on many benchmarks.
- **Hallucinations stem from multiple, compounding causes** (Middle): Training data errors, sampling randomness (temperature, top-k, top-p), ambiguous prompts, and conflicts between prompt and internal knowledge all contribute. The book also notes the term's contested history and suggests alternatives like "fabrication" or "confabulation."
- **Few-shot learning works by showing input-output relationships** (Middle): Examples teach the LLM expected input structure, output format, and—most critically—the mapping between them. This mapping inference is what enables the model to generalize to new queries.
- **Classifiers can route prompts to specialized example groups** (Middle): For tasks like NL2SQL, categorizing prompts by complexity (simple, nested, joins) before calling the LLM ensures the model receives the most relevant examples, improving output quality.
## 【Reading Tips】
- **Skim Chapter 1 if you're a data scientist**: The opening chapter is explicitly designed as a refresher for ML practitioners—skip ahead if you're comfortable with supervised/unsupervised learning, tokenization, and basic embeddings.
- **Deep-read the embedding sections (Early)**: Static vs. contextual and word-level vs. sentence-level embeddings are foundational for understanding RAG and semantic search later. These distinctions recur throughout the book.
- **Work through the encoder-decoder code example (~29%)**: The Spanish translation example with token IDs and logits is concrete and walkable—it demystifies how sequence-to-sequence models actually produce output step by step.
- **Pay attention to the hallucination causes list (Middle)**: This is practical knowledge for production—understanding why models fabricate helps you design prompts, choose sampling parameters, and set user expectations.
- **Note the NL2SQL classifier example (Middle)**: It's a template for a general pattern—using lightweight classifiers to route prompts to specialized few-shot examples—that you can adapt to many domains.
## 【Coverage Limits】
This guide covers the first half of the book in detail (foundations through prompt engineering). Later chapters on RAG, fine-tuning, agent orchestration, and production evaluation are referenced but not deeply excerpted in the source material—readers should expect those topics to be covered in the full text.
##
Page 18
...................... 424 Appendix 1: Expert Insights 427 Appendix 2: Bibliography 433 Other Books You May Enjoy 442 Index 445 xxv Preface Who this book is...
View in text
Excerpt 2
ec1the correct class. Common idx_90f617d9architectures for idx_dd1f2e73classification include logistic regression, decision trees, random forests, and neural...
View in text
Excerpt 3
larly well-suited for tasks like text generation, including storytelling, creative writing, dialog systems (chatbots), code generation, and summarization. Be...
View in text
Excerpt 4
ng pattern between input and output to generate a response. Most LLMs do not offer a dedicated API for providing examples. Instead, examples can be included...
View in text
Excerpt 5
osition, or cue words. Another strategy involved developing knowledge-based systems that relied on handcrafted rules for domain-specific summarization. While...
View in text
Excerpt 6
more efficient and reliable option. Summary Congratulations! You've just completed a deep exploration of several core practical language tasks. We started wi...
View in text
Excerpt 7
opacity mirrors our understanding of the human brain itself. Despite decades of neuroscience, we still do not fully know why certain neurons fire and others...
View in text
Excerpt 8
and thus are significantly faster than with quick select. Tree-based methods split embeddings by dimensions, building a tree structure. In this way, they ach...
View in text
Tags
AI categories
Artificial IntelligenceAIProgramming
Text Preview (First 20 pages)
Registered users can read the full content for free
Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.
Generating text preview…
Loading comments...
Reply to Comment
Edit Comment