# chiphuyen/aie-book

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/chiphuyen-aie-book).**

13,779 stars · 2,004 forks · Jupyter Notebook

## Links

- GitHub: https://github.com/chiphuyen/aie-book
- awesome-repositories: https://awesome-repositories.com/repository/chiphuyen-aie-book.md

## Description

This project serves as a comprehensive educational resource and technical handbook for engineers building applications powered by large language models. It provides a structured framework for mastering the principles of artificial intelligence engineering, covering the full lifecycle of model development from initial design to production deployment.

The repository distinguishes itself by offering a deep dive into the practical implementation of advanced design patterns, including retrieval-augmented generation, agentic tool orchestration, and parameter-efficient model adaptation. It emphasizes the importance of rigorous system evaluation, providing methodologies for assessing model reliability, monitoring health, and mitigating risks such as adversarial prompt injections.

Beyond core engineering patterns, the content addresses the broader operational requirements of production-ready systems. This includes techniques for optimizing inference latency, curating synthetic training datasets, and designing robust prompt templates. The material is organized to support developers through real-world case studies, community-contributed study notes, and technical documentation that bridges the gap between theoretical concepts and applied software engineering.

## Tags

### Artificial Intelligence & ML

- [Large Language Model Guides](https://awesome-repositories.com/f/artificial-intelligence-ml/large-language-model-guides.md) — Provides a comprehensive educational framework for mastering the principles and design patterns of large language model engineering.
- [Parameter Efficient Fine-Tuning](https://awesome-repositories.com/f/artificial-intelligence-ml/parameter-efficient-fine-tuning.md) — Adapts pre-trained models to specific domains using parameter-efficient methods to achieve high performance.
- [Retrieval-Augmented Generation](https://awesome-repositories.com/f/artificial-intelligence-ml/retrieval-augmented-generation.md) — Connects language models to external knowledge bases to ground generated responses in verified and up-to-date information.
- [Agent Tool Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/integration-deployment/agent-frameworks/tool-use-and-execution/agent-tool-integrations.md) — Connects autonomous agents to external software tools and APIs to extend their functional capabilities. ([source](https://github.com/chiphuyen/aie-book/blob/main/chapter-summaries.md))
- [AI Evaluation Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-evaluation-analysis/ai-evaluation-frameworks.md) — Automates the assessment of artificial intelligence outputs and reasoning quality through comparative analysis.
- [Model Fine-Tuning](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-training-and-tuning/fine-tuning-and-customization/model-fine-tuning.md) — Adapts pre-trained models to specific domains or tasks using parameter-efficient methods to achieve high performance. ([source](https://github.com/chiphuyen/aie-book/blob/main/resources.md))
- [Agentic Tool Orchestration](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-tool-orchestration.md) — Enables autonomous systems to execute multi-step workflows by dynamically invoking external APIs and data retrieval functions.
- [Prompt Injection Techniques](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-security-and-governance/adversarial-security-research/prompt-injection-techniques.md) — Implements defensive instruction structures and input validation to mitigate risks from malicious injections and jailbreaking attempts.
- [AI Observability and Evaluation](https://awesome-repositories.com/f/artificial-intelligence-ml/artificial-intelligence-tooling/ai-observability-evaluation.md) — Provides diagnostic and benchmarking tools to inspect model reasoning and validate performance metrics. ([source](https://github.com/chiphuyen/aie-book/blob/main/ToC.md))
- [Retrieval Augmented Generation](https://awesome-repositories.com/f/artificial-intelligence-ml/language-model-orchestration/retrieval-augmented-generation.md) — Implements retrieval-augmented generation patterns to ground language model responses in external data sources.
- [Inference Optimization Techniques](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-deployment-and-serving/inference-optimization-and-tuning/inference-optimization-techniques.md) — Implements methods to improve the speed, latency, and resource efficiency of model inference. ([source](https://github.com/chiphuyen/aie-book/blob/main/chapter-summaries.md))
- [AI Observability and Evaluation](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/training-monitoring-and-profiling/ai-observability/ai-observability-and-evaluation.md) — Offers tools for tracing, benchmarking, and monitoring large language model application execution. ([source](https://github.com/chiphuyen/aie-book/blob/main/resources.md))
- [Model Optimization Techniques](https://awesome-repositories.com/f/artificial-intelligence-ml/model-optimization-techniques.md) — Provides methods and strategies for fine-tuning neural network layers to adapt foundation models to specific tasks. ([source](https://github.com/chiphuyen/aie-book/blob/main/ToC.md))
- [Parameter-Efficient Training Toolkits](https://awesome-repositories.com/f/artificial-intelligence-ml/parameter-efficient-training-toolkits.md) — Enables model fine-tuning by updating only a small subset of parameters to reduce memory usage. ([source](https://github.com/chiphuyen/aie-book/blob/main/chapter-summaries.md))
- [Prompt Engineering Strategies](https://awesome-repositories.com/f/artificial-intelligence-ml/prompt-engineering-strategies.md) — Provides configurations for structuring instructions to guide AI agent reasoning and defend against adversarial attacks. ([source](https://github.com/chiphuyen/aie-book/blob/main/resources.md))
- [Retrieval-Augmented Agents](https://awesome-repositories.com/f/artificial-intelligence-ml/retrieval-augmented-agents.md) — Designs autonomous systems that combine external data retrieval with tool use to execute complex multi-step tasks. ([source](https://github.com/chiphuyen/aie-book/blob/main/ToC.md))
- [Automated Model Judges](https://awesome-repositories.com/f/artificial-intelligence-ml/automated-model-judges.md) — Assesses model performance using quantitative metrics and judge-based frameworks to identify hallucinations and behavioral biases.
- [Model Capability Assessment](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-evaluation-and-validation/model-capability-assessment.md) — Provides tools for benchmarking and selecting models based on specific application requirements. ([source](https://github.com/chiphuyen/aie-book/blob/main/chapter-summaries.md))
- [Inference Optimizations](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-optimization-and-inference/serving-and-runtime/inference-optimizations.md) — Streamlines model execution through techniques like quantization and speculative sampling to improve throughput and response speed.
- [Prompt Engineering Guides](https://awesome-repositories.com/f/artificial-intelligence-ml/prompt-engineering-guides.md) — Crafts structured instructions and context to guide model behavior and improve the quality of generated responses. ([source](https://github.com/chiphuyen/aie-book/blob/main/chapter-summaries.md))
- [Synthetic Data Curation Tools](https://awesome-repositories.com/f/artificial-intelligence-ml/synthetic-data-curation-tools.md) — Generates and validates high-quality training data to align model behavior with specific application goals and performance criteria.
- [Training Data Curators](https://awesome-repositories.com/f/artificial-intelligence-ml/training-data-curators.md) — Designs and synthesizes high-quality, diverse data to align model behavior with specific application goals and performance criteria. ([source](https://github.com/chiphuyen/aie-book/blob/main/chapter-summaries.md))
- [Prompt Optimization Strategies](https://awesome-repositories.com/f/artificial-intelligence-ml/prompt-optimization-strategies.md) — Improves model outputs through in-context learning, iterative refinement of instructions, and defensive techniques. ([source](https://github.com/chiphuyen/aie-book/blob/main/ToC.md))
- [Prompt Templates](https://awesome-repositories.com/f/artificial-intelligence-ml/prompt-templates.md) — Structures instructions for language models to perform specific tasks by defining clear roles, operational constraints, and required output formats. ([source](https://github.com/chiphuyen/aie-book/blob/main/prompt-examples.md))
- [Language Model Interaction Patterns](https://awesome-repositories.com/f/artificial-intelligence-ml/language-model-orchestration/language-model-interaction-patterns.md) — Implements standardized methods and structural patterns for communicating with and executing tasks via language models. ([source](https://github.com/chiphuyen/aie-book#readme))
- [Natural Language Query Generators](https://awesome-repositories.com/f/artificial-intelligence-ml/natural-language-query-generators.md) — Translates natural language questions into structured query language statements by analyzing table schemas and database dialect requirements. ([source](https://github.com/chiphuyen/aie-book/blob/main/prompt-examples.md))

### Education & Learning Resources

- [Generative AI Development Guides](https://awesome-repositories.com/f/education-learning-resources/curricula-instructional-design/curricula-roadmaps/ai-machine-learning-roadmaps/generative-ai-curricula/generative-ai-development-guides.md) — Serves as a technical handbook covering the end-to-end lifecycle of building, fine-tuning, and deploying generative artificial intelligence applications.
- [LLM Engineering Guides](https://awesome-repositories.com/f/education-learning-resources/educational-resources/systems-applied-computing/machine-learning-education/llm-engineering-guides.md) — Offers practical implementation strategies and best practices for building, evaluating, and deploying production-ready large language model applications.
- [Engineering Principles](https://awesome-repositories.com/f/education-learning-resources/educational-resources/languages-and-programming-concepts/software-engineering-languages/software-engineering/engineering-principles.md) — Teaches best practices and design patterns for building and optimizing applications powered by large language models. ([source](https://github.com/chiphuyen/aie-book/blob/main/ToC.md))
- [Educational Resources](https://awesome-repositories.com/f/education-learning-resources/educational-resources.md) — Provides structured notes, chapter summaries, and technical resources to support mastery of engineering principles. ([source](https://github.com/chiphuyen/aie-book#readme))
- [Architectural Case Studies](https://awesome-repositories.com/f/education-learning-resources/architectural-case-studies.md) — Documents real-world scenarios and practical applications demonstrating the implementation of software design patterns. ([source](https://github.com/chiphuyen/aie-book#readme))
- [Educational Use Cases](https://awesome-repositories.com/f/education-learning-resources/educational-use-cases.md) — Curates examples demonstrating specific AI capabilities and safety challenges. ([source](https://github.com/chiphuyen/aie-book/blob/main/misalignment.md))

### Operating Systems & Systems Programming

- [Inference Cache Management](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/process-and-memory-management/memory-management/inference-cache-management.md) — Allocates and manages key-value cache buffers during model inference to optimize memory usage. ([source](https://github.com/chiphuyen/aie-book/blob/main/resources.md))

### Security & Cryptography

- [Content Moderation](https://awesome-repositories.com/f/security-cryptography/content-moderation.md) — Filters harmful or inappropriate content from inputs and outputs using AI-specific safety techniques. ([source](https://github.com/chiphuyen/aie-book/blob/main/prompt-examples.md))

### System Administration & Monitoring

- [Health Monitoring](https://awesome-repositories.com/f/system-administration-monitoring/health-monitoring.md) — Provides systems for tracking the operational status and uptime of services in production environments. ([source](https://github.com/chiphuyen/aie-book/blob/main/chapter-summaries.md))
