Skip to product information
Prompt engineering to reduce hallucinations
Prompt engineering to reduce hallucinations
Description
Book Introduction
“Hallucination is not a bug, it’s a creative characteristic of LLM!”
How to 'properly' control hallucination properties
The first prompt guidebook


The biggest obstacle when using or applying LLM to services is 'hallucination'.
This book views hallucination, previously considered a simple bug, as a controllable property, and covers various prompt engineering techniques, RAG, and agent design strategies to reduce it, along with code exercises.

You'll also learn how to implement reliable, production-grade AI applications through hands-on training using cutting-edge tools like OpenAI, Gemini, and Langchain. This book will serve as an essential guide for AI engineers and developers who want to move beyond simply "trying out" AI and integrate it directly into their services.
  • You can preview some of the book's contents.
    Preview

index
[CHAPTER 01: Prompt Engineering Overview]

1.1 What is Prompt Engineering?
1.2 Large-scale language models
1.3 Basic Settings
__Google Colaboratory
__OpenAI API
__Gemini API
1.4 LLM Practice
1.5 Today's Prompting Techniques
__Zero-shot and few-shot prompting
__CoT prompting
__Search Augmentation Creation

[CHAPTER 02 Hallucination Prevention Techniques]

2.1 Definition and Types of Hallucination
2.2 Types of Hallucination Occurrence
__Realistic hallucination
__logical hallucination
__Contextual hallucination
2.3 Techniques to prevent hallucination
__Improving data quality
__Improving model architecture
__Post-verification technique
__Prompt Engineering Techniques
2.4 Prompt Engineering Techniques
Understanding the Self-Attention Mechanism
__Prompt Engineering with Self-Attention in Mind
Why Prompt Engineering Is Possible
2.5 Self-consistency
2.6 CoT Prompting
2.7 Knowledge Generation Prompting
2.8 Self-verification
2.9 CoVe prompting
2.10 Assessment and Diagnostic Tools
__Need for LLM Hallucination Evaluation
__Benchmark dataset
__Open source diagnostic tool
__Usage in corporate environments

[CHAPTER 03 Advanced: Prompt Application]

3.1 Prompt Chain
__Prompt Chain Concept and Utilization
__Prompt Chain Implementation Example and Detailed Analysis
3.2 Langchain Framework
__Introducing the Langchain
__Range Chain Components
__Range Chain Practice
3.3 ReAct
__Background of ReAct's emergence
__ReAct's structure
__ReAct example
3.4 Reflection
__Mechanisms of Reflection: Execution, Evaluation, Reflection, and Recording
__Reflection Example
3.5 Prompt Guardrail
__The need for guardrails
Two Approaches to Guardrail Design: Norms and Virtues
__[Example 1] Output Content Verification Using ShieldGemma
__[Example 2] Multi-tier guardrail architecture
3.6 Multi-agent system
__Inherent limitations of single-agent architecture
__Multi-agent architecture
__Major Collaboration Patterns and Hallucination Control
__Multi-agent architecture example
3.7 Domain-Specific Prompts
Understanding Domain-Specific Prompts
__Domain-Specific Prompt Example
3.8 LLM System Evaluation and Observability
__What, why, and how to measure?
__Building an offline evaluation pipeline
__Evaluation Example: Diagnosing and Improving a RAG System Using Langsmith

[CHAPTER 04 Grounding and Knowledge Integration]

4.1 Grounding Concept and Necessity
4.2 Create search augmentation
The need for __RAG
__RAG architecture
__Embedding and Vector Storage
__Data Processing Pipeline
Building a __RAG Example Pipeline
__RAG, how do you control hallucination?
__RAG's effect
4.3 Data Integration and Knowledge Graph
__Introducing knowledge graphs
__Why should we combine knowledge graphs with RAG?
__RAG implementation pattern using knowledge graph
__Implementing a Knowledge Graph RAG: Text-to-Cypher
__ Limitations of knowledge graph implementation methods
4.4 Chain considering grounding technique
__RAG chain
__router chain
__Self-correcting RAG loop
4.5 Knowledge Integration through Agent Design
__Configuring agent tools for knowledge integration
__Analyzing the thought process of an agent solving complex questions
__Combining long-term memory and knowledge graphs
Knowledge Integration Using __RangeChain Agents

[CHAPTER 05: Practical Project: Creating an Agent]

5.1 First Project: My Own Encyclopedia Chatbot
5.2 Second Project: Real-Time Question-Answering Agent
5.3 Third Project: Stock Trend Analysis Agent
5.4 Finishing the Project

[Appendix: Introduction to Advanced Techniques and Tools]

A deep prompting technique
B Key Tools and Libraries
C Building Responsible AI

Detailed image
Detailed Image 1

Publisher's Review
Start with a single line of prompt
Completion of LLM service controlling hallucination


The challenge AI engineers face today is to preserve the creativity of LLMs while reducing errors.
This book provides a systematic and practical solution to solve hallucination, one of the most difficult problems in the field of AI.
Starting with the fundamental principles of prompt engineering, you will learn techniques such as Chain of Thought (CoT), Self-Consistency, Chain of Verification (CoVe), and Reflection, and learn various ways to maximize the capabilities of the LLM, such as making the model structured and re-verifiable by itself.
Furthermore, by combining reliable external knowledge and verification systems through RAG, knowledge graph, and multi-agent structures, we complete a hallucination-free AI service architecture.

By following real-world projects like personalized encyclopedia chatbots, real-time QA agents, and stock trend analysis agents, you can gain experience in creating reliable AI services that go beyond simply "calling" models.

● Step 1 | LLM and Prompt Engineering Fundamentals - Understanding Basic Concepts and Setting Up a Practice Environment
● Step 2 | Hallucination Prevention Techniques - Self-Consistency, CoT, CoVe, Self-Verification, Knowledge Generation Prompting
Step 3 | Prompt Application - Langchain, ReAct, Reflection, Multi-Agent Design
● Step 4 | RAG and Knowledge Integration - External Data Linkage, Knowledge Graph, and Stable Search
Step 5 | Practical Project - Complete a personalized chatbot, real-time Q&A, and trend analysis agent.
Step 6 | Latest Techniques and Tools - Advanced Prompting Techniques, Responsible AI Implementation Strategies

Target audience for this book

● Developers responsible for building reliable AI services
● AI engineers and MLOps experts who are interested in improving the reliability and accuracy of LLM
● Practitioners who wish to learn advanced analysis techniques using LLM
● Professionals who want to deepen their LLM application skills based on their knowledge of Python and machine learning.

A word from beta readers who read it first

● This book extends the concept of prompt engineering to the more advanced realm of "AI system design." The book's greatest strength lies in its explanation of cutting-edge technologies like RAG, reflection, and multi-agent, along with rich code examples.
_Lee Seok-gon
● Only now has an LLM book properly focused on hallucinations appeared.
This is a must-read for anyone interested in prompt engineering.
_Lee Jang-hoon
● It contains not only theory but also practical application cases, so it will serve as a useful guide for those who want to utilize AI more reliably.
_Shin Jin-wook
GOODS SPECIFICS
- Date of issue: September 30, 2025
- Page count, weight, size: 476 pages | 183*235*18mm
- ISBN13: 9791169214421
- ISBN10: 1169214428

You may also like

카테고리