Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Tharsis T.P. Souza & Jonathan K. Regenstein, Jr.

Rating 3.5 AI initial rating

No description

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A hands-on field guide for turning LLM demos into dependable production applications, using open source tools to master evaluation, safety, context, alignment, structured outputs, RAG, and fine-tuning. Best for data scientists, ML engineers, and technical leaders who need to build and validate real LLM systems rather than just experiment. 【Book Arc】 - **Opening (~0%–10%)**: Frames the book's purpose—closing the gap between "playing with LLMs" and building reliable LLM-based applications (LLMBAs)—and argues for open source as a personal laboratory for understanding trade-offs before enterprise deployment. - **Early (~10%–32%)**: Establishes first principles: defining enterprise requirements, understanding model types (base, instruction-tuned, domain-adapted), licensing, decoding strategies, temperature and nondeterminism, and the conceptual design for evaluating multiple LLMBAs. - **Middle (~32%–48%)**: Tackles the "evals gap" in depth—benchmarks like ARC-AGI, LLM-as-a-judge methodology and its biases, BLEU-based scoring, and orchestration with LangSmith for tracking, comparison, and production monitoring. - **Late (~48%–75%)**: Moves into implementation skills signaled by the table of contents—structured outputs with Pydantic, retrieval augmented generation, fine-tuning, and alignment evaluation using DPO and synthetic preference datasets. - **Ending (~75%–100%)**: Covers safety and alignment planning across six phases (policy definition through incident response), common pitfalls, an epilogue on falling costs, and an appendix on local LLM deployment tools. 【Key Takeaways】 - **Open source is a learning laboratory** (Opening): Running local models lets you feel the difference between 7B and 70B parameters and understand speed-quality trade-offs without API costs or rate limits—building intuition that transfers to enterprise decisions. - **Requirements precede models and prompts** (Early): Success starts with concrete enterprise requirements and data lineage tracking, not vague "we want to use AI" aspirations; without this foundation, initiatives either stall in compliance or create hidden liability. - **Model type determines fit** (Early): Base, instruction-fine-tuned, and domain-adapted models form a general-to-specific progression; licensing terms vary by family and version and must be reviewed before commercial deployment. - **Nondeterminism is structural, not a bug** (Early): Temperature reshapes the output distribution before sampling, and even temperature zero retains residual nondeterminism from MoE routing and GPU floating-point behavior. - **Evaluation is the core discipline** (Middle): LLM-as-a-judge enables scalable scoring but carries positional, egocentric, and length biases plus prompt-drift sensitivity—and judge models may lack domain expertise in finance, law, or medicine. - **Orchestration tools close the evals gap** (Middle): LangSmith adds experiment tracking, human-in-the-loop annotation, and production monitoring that ad-hoc scripts cannot provide at scale. - **Structured outputs make judges reliable** (Middle): Pydantic-validated response formats turn unstructured judge text into clean, parseable scores—a pattern reusable across evaluation pipelines. - **Safety needs a phased plan** (Late): Alignment work spans policy definition, user research, evaluation frameworks, safety architecture, tool selection, and incident response—treated as an engineering process, not an afterthought. 【Reading Tips】 - Deep-read the evaluation chapters (Middle): the LLM-as-a-judge limitations and LangSmith orchestration are the book's most transferable engineering content. - Skim the first-principles chapter if you already know decoding strategies and temperature—but do not skip the licensing table and requirements discussion. - Treat code examples as templates: the SEC-filing summarization pipeline recurs as a running case study, so follow it end-to-end rather than reading snippets in isolation. - For the safety and alignment phases, read as a checklist for organizational planning; the excerpts show structure but not full implementation detail. 【Coverage Limits】 The excerpts cover the opening, evaluation, and safety-planning material in detail but only gesture at RAG, fine-tuning, and structured-output chapters via the table of contents; this guide cannot verify their specific content.
Page 13
272 Phase 5: Implementation and Tools Selection 273 Phase 6: Incident Response 274 Common Pitfalls 275 Conclusion 276 9. Epilogue: LLMBAs in the Era of Falli...
View in text
Excerpt 2
ammar, factual knowledge, reasoning patterns, and even some emergent abilities, but fundamentally they are text completion engines rather than conversational...
View in text
Excerpt 3
valuate_with_llm(judge_model: str, candidate_summary: str, reference_summary: str) -> Dict[str, float]: Use an LLM to evaluate a candidate summary against a...
View in text
Excerpt 4
izing SEC filings. TASK = Generate a 1-liner summary of the following excerpt from an SEC filing. """ • The input data: sec_filing • The function: generate_s...
View in text
Excerpt 5
ific litera‐ ture, regulations, and technical documentation. This enables accurate responses aligned with professional standards and current best practices....
View in text
Excerpt 6
gs that we will retrieve, and we then pass them to our LLM. We find those relevant chunks by running a vector search with cosine similarity, which ChromaDB u...
View in text
Excerpt 7
n_logits, dim=-1) k = 10 top_k_probs, top_k_indices = torch.topk(next_token_probs, k, dim=-1) # Print the actual tokens, skipping special tokens top_k_tokens...
View in text
Excerpt 8
ect prompt injection would be adding malicious instructions to a legitimate request, such as asking a translation app, “Translate ‘Hello’ to Spanish. Ignore...
View in text
Tags
AI categories
Artificial IntelligenceData ScienceSoftware
Publisher: O'REILLY
Publish Year: 2026
Language: English
File Format: PDF
File Size: 3.2 MB
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…