The AI Encyclopedia 中文 Coming soon

iPhone · iPadEnglish & ChineseWorks offline

The AI Encyclopedia

AI 百科全书

From understanding and using to building and research

What is AI, really? Why does a language model sometimes say something wrong with full confidence? Can you work through attention by hand?
A complete three-volume AI textbook, from understanding AI to training, evaluating, shipping and research, made into an app you can read, experiment with and practise in.

Coming soon to the App Store Read a page

Free to download: read the preface, the appendices and Parts 1–2 (chapters 1–12) in full · one purchase unlocks the whole book · no ads, no account

Today: continue reading, reviews due and a word of the day
  • 72chapters章
  • 191figures幅图
  • 69hands-on labs个互动实验
  • 360drills道互动题
  • 12scenarios个情景模拟
  • 463flashcards张术语卡

Read in English, Chinese, or both中文、英文,或者对照着读

Three volumes, 12 parts and 72 chapters, plus a preface and Appendices A–E. Every paragraph is written in both English and Chinese: read them side by side or choose one, and in a single-language mode tap a paragraph to see the other. The interface switches between English and Chinese too.

  • Guided and Full modes: Guided folds long code, program output and big tables into a single line so you can follow the main thread
  • 191 figures you can zoom full screen, typeset math, and wide tables that turn into cards on iPhone
  • Tap a term for its definition; highlights, notes, bookmarks and find in page; paper, sepia and night themes
  • “Explain simply”: select a passage and an on-device model explains it another way (iOS 26 on supported devices; the text never leaves your device)
The reader, open at Chapter 32
Knowledge map of chapter prerequisites

Learn it by working it out动手算一遍,才算真的懂

69 interactive labs, at least one for every chapter, rebuild the book’s own examples and numbers: which sorts the same text messages better, keyword rules or naive Bayes; why gradient descent diverges when the learning rate is only slightly too high; and causal attention over three positions, worked out step by step.

  • Change the parameters, draw your own data, retrain, and watch the results move; every lab links to its chapters
  • Neural network playground, 2-D diffusion, prompt-injection sandbox, GPU memory estimator and more
  • 12 branching scenarios: play an analyst, an engineer or a product lead, read logs, chats and metrics, make the call and reach one of several endings
Lab: causal attention by hand
Scenario: a travel-policy assistant
The arcade is always free

A minute a round, and the book sticks一局一分钟,把书玩熟

Term Rush, Fermi estimates and true-or-false quickfire, plus a fresh daily challenge. The terms come from the book’s glossary, every number in the 48 Fermi questions is stated in the text, and the true-or-false questions are adapted from the chapter quizzes.

No purchase needed. Flashcards, key-point cards, search and the knowledge map are always free too.

The arcade

A page from the book先读一段

Section 32.3 of Chapter 32, “Understanding the Transformer from Scratch”. In the app you can read it side by side or in one language, and tap an underlined term for its definition.

Chapter 32 · Understanding the Transformer from Scratch第 32 章

32.3By hand: causal attention over 3 positions手算:3 个位置的因果注意力

with q = k = (1, 2, 3) and values (10, 20, 30), the three outputs under a causal mask are 10, 18.81 and 29.48.

q = k = (1, 2, 3),值 (10, 20, 30),因果掩码下三个位置的输出是 10、18.81、29.48。

One dimension, no scaling needed (√1 = 1):

一维、不需要缩放(√1 = 1):

  • position 1 sees only itself: weight [1], output 10;
  • position 2: scores 2×1 = 2, 2×2 = 4, softmax → 0.119, 0.881, output 0.119×10 + 0.881×20 = 18.81;
  • position 3: scores 3, 6, 9, softmax → 0.002, 0.047, 0.950, output about 29.48.
  • 位置 1 只能看自己:权重 [1],输出 10;
  • 位置 2:分数 2×1 = 2、2×2 = 4,softmax → 0.119、0.881,输出 0.119×10 + 0.881×20 = 18.81;
  • 位置 3:分数 3、6、9,softmax → 0.002、0.047、0.950,输出约 29.48。
Causal attention at position 3 reads positions 1–3, excluding future Token 4. Query–key scores determine weights over values. Keys and softmax are omitted here; arrows show permitted information flow only.
Causal attention at position 3 reads positions 1–3, excluding future Token 4. Query–key scores determine weights over values. Keys and softmax are omitted here; arrows show permitted information flow only.位置 3 的因果注意力只能读取位置 1–3,不能读取未来的 Token 4。查询与各键决定权重,再对值加权;本图省略键和 softmax,只示意允许的信息流。

This chapter’s lab · Causal attention by hand
Work the book's 3-position example step by step — scores, causal mask, row-wise softmax, weighted sum — to get 10, 18.81 and 29.48; then edit the values or remove the mask.

Contents目录

Three volumes, 12 parts and 72 chapters, plus front matter and appendices. The preface, the appendices and Parts 1–2 are free in full; every other chapter has a free preview of its opening and first section.

Free free in fullPreview opening and first section free

Before you start

Front matter前言

  1. 1Before You BeginFree
  2. 2ContentsFree
  3. 3Knowledge MapsFree
  4. 4Reading Routes and ProjectsFree
  5. 5Writing Spec and Stable IDsFree

Volume I

Understanding, Using and Foundations理解、使用与基础

Parts 1–4 · Chapters 1–24

Part 1 · Chapters 1–6

Understanding AI认识人工智能

  1. 1What AI Really IsFree
  2. 2How AI Got HereFree
  3. 3Data, Algorithms, Models and ComputeFree
  4. 4Training, Inference and ReasoningFree
  5. 5What AI Can Do and Why It FailsFree
  6. 6Knowledge Map and Learning RoutesFree

Part 2 · Chapters 7–12

Using AI for Real Tasks使用 AI 完成真实任务

  1. 7Turning a Problem into a TaskFree
  2. 8Prompts and ContextFree
  3. 9Search, Research and Fact-CheckingFree
  4. 10Documents, Spreadsheets and Data AnalysisFree
  5. 11AI-Assisted ProgrammingFree
  6. 12Workflows and Human–AI Division of LabourFree

Part 3 · Chapters 13–18

Math, Programming and Data Foundations数学、编程与数据基础

  1. 13Python from ScratchPreview
  2. 14Vectors, Matrices and TensorsPreview
  3. 15Functions, Derivatives and OptimisationPreview
  4. 16Probability, Statistics and InformationPreview
  5. 17Data Processing and Experimental DatasetsPreview
  6. 18Search, Logic and Planning BasicsPreview

Part 4 · Chapters 19–24

The Complete Machine Learning Method机器学习的完整方法

  1. 19Regression, Classification and GeneralisationPreview
  2. 20Trees, Ensembles and Support Vector MachinesPreview
  3. 21Clustering, Dimensionality Reduction and Anomaly DetectionPreview
  4. 22Probabilistic Models and Causal InferencePreview
  5. 23Recommendation, Ranking and Time SeriesPreview
  6. 24A Machine Learning Project End to EndPreview

Volume II

Deep Learning, Large Models and Creation深度学习、大模型与创作

Parts 5–8 · Chapters 25–48

Part 5 · Chapters 25–30

Deep Learning and Reinforcement Learning深度学习与强化学习

  1. 25Why Neural Networks Can LearnPreview
  2. 26Backpropagation and Automatic DifferentiationPreview
  3. 27Making Training ReliablePreview
  4. 28Computer Vision and CNNsPreview
  5. 29Sequences and Representation LearningPreview
  6. 30Reinforcement Learning BasicsPreview

Part 6 · Chapters 31–36

Large Language Models大语言模型

  1. 31How Text Becomes TokensPreview
  2. 32Understanding the Transformer from ScratchPreview
  3. 33What Modern Models Are Made OfPreview
  4. 34Pretraining and Data MixturesPreview
  5. 35Generation, Reasoning and Test-Time ComputePreview
  6. 36How Language Models Are EvaluatedPreview

Part 7 · Chapters 37–42

Images, Sound, Video and Embodied AI图像、声音、视频与具身智能

  1. 37The Family of Generative ModelsPreview
  2. 38How Image Generation and Editing WorkPreview
  3. 39Speech, Music and Sound ModelsPreview
  4. 40Video Generation and Temporal UnderstandingPreview
  5. 41Vision-Language and Multimodal UnderstandingPreview
  6. 423D, Robotics and World ModelsPreview

Part 8 · Chapters 43–48

Creating Deliverable Work with AI用 AI 创作可交付作品

  1. 43Writing and Knowledge ExpressionPreview
  2. 44Images, Design and BrandPreview
  3. 45Film and Animation PipelinePreview
  4. 46Sound and Music ProductionPreview
  5. 47Games, Web and Interactive WorkPreview
  6. 48A Complete Creative ProjectPreview

Volume III

Applications, Systems, Products and Research应用、系统、产品与研究

Parts 9–12 · Chapters 49–72

Part 9 · Chapters 49–54

AI Applications and AgentsAI 应用与智能体

  1. 49APIs and Tool CallingPreview
  2. 50RAG: From Documents to Grounded AnswersPreview
  3. 51How Agents RunPreview
  4. 52Tool Ecosystems and ProtocolsPreview
  5. 53Evaluating Applications and AgentsPreview
  6. 54A Complete AI Application ProjectPreview

Part 10 · Chapters 55–60

Model Training and Systems Engineering模型训练与系统工程

  1. 55Data EngineeringPreview
  2. 56SFT, LoRA and DistillationPreview
  3. 57Preference Optimisation and Reasoning RLPreview
  4. 58Distributed TrainingPreview
  5. 59Efficient Inference and On-Device RunningPreview
  6. 60Performance Measurement and System OptimisationPreview

Part 11 · Chapters 61–66

Real Products, Reliability and Social Responsibility真实产品、可靠性与社会责任

  1. 61Finding a Problem Worth SolvingPreview
  2. 62AI Product ExperiencePreview
  3. 63Evaluation and Experiment MethodsPreview
  4. 64Running in ProductionPreview
  5. 65Security, Privacy and GovernancePreview
  6. 66AI and SocietyPreview

Part 12 · Chapters 67–72

Specialisation and Research专精与研究

  1. 67Reading Papers and Building Evidence MapsPreview
  2. 68Reproducing a Specific ResultPreview
  3. 69Ablations and Error AnalysisPreview
  4. 70Choosing a SpecialisationPreview
  5. 71Asking and Testing New QuestionsPreview
  6. 72Capstone Project and External ReviewPreview

Appendices

Appendices A–E附录 A–E

  1. AFast-changing facts (dated)Free
  2. BCareer supplement: where the interview book's 114 questions wentFree
  3. CGlossaryFree
  4. DEntry ID RegisterFree
  5. ESource RegisterFree

Start free, buy once先读,再决定

The download is free. If it’s useful to you, buy the whole book once. It’s not a subscription and never renews.

Free sample

$0Start reading right after you download, no account needed

  • The front matter (5 sections) and Appendices A–E in full
  • Parts 1–2 in full: “Understanding AI” and “Using AI for Real Tasks” (chapters 1–12)
  • The other 60 chapters: the opening and first section of each
  • 21 labs: all 11 from chapters 1–12, plus one from each of parts 3–12 (gradient descent and the learning rate, bias and variance, neural network playground, causal attention by hand, 2-D diffusion, revision tracker, RAG, GPU memory estimator, prompt-injection sandbox, reproducing a number from a classic paper)
  • Practice for chapters 1–12: 48 exercises, 12 chapter quizzes and 60 drills
  • 2 scenarios: “The 97% Slip Reader” and “A Thousand Tickets”

Full Book

$6.99One-time purchase, not a subscription · local prices as shown in the App Store

  • The whole book: three volumes, 72 chapters, front matter and appendices
  • All 69 interactive labs and 12 scenarios
  • All 360 drills, 72 chapter quizzes and 326 exercises
  • Works on every iPhone and iPad with the same Apple Account, with Family Sharing
  • Restore Purchases on a new device without paying again

Always free: the arcade (Term Rush, Fermi estimates, true-or-false quickfire, daily challenge), the glossary and 463 term flashcards, 508 key-point cards, full-text search, the knowledge map and 4 reading routes, bookmarks / highlights / notes, progress tracking and data export.

Questions常见问题

What do I need?

An iPhone or iPad running iOS / iPadOS 18 or later. “Explain simply” uses Apple’s on-device model and needs iOS 26 on a device that supports Apple Intelligence; everything else works without it.

Can I change the language?

Yes. In Me → Settings → Language, choose English or Chinese for the interface, and English, Chinese or side by side for the book text. You can also switch from the reader’s toolbar at any time.

Do I need to know how to code?

No. Part 1 needs no code, and Part 2 is about using AI for real tasks such as research, fact-checking and working with documents and spreadsheets; Part 3, “Math, Programming and Data Foundations”, then starts from scratch with Chapter 13, “Python from Scratch”. The book’s 4 reading routes and 5-question diagnostic help you find where to start.

Do I need to be online or sign up?

No. Everything is inside the app and works offline, with no ads. Your progress, notes and practice records stay on your device, and you can export them from Me → Settings → Data. We collect no data.

AI moves fast. Will the book go out of date?

The main text sticks to principles and how to judge. Facts that change within months, such as prices, model names and platform parameters, are collected in Appendix A, “Fast-changing facts (dated)”, each with the date it was checked.

I got a new phone. Do I keep the Full Book?

Yes. Open Me → Settings → Full Book → Restore Purchases while signed in with the Apple Account you bought it with; you won’t be charged again. Members of your Family Sharing group can use it too.

More answers on the support page, or email dongxiyunei@gmail.com

The AI Encyclopedia app icon

A whole AI textbook in your pocket把一整套 AI 教材装进口袋

Coming soon to the App Store