Version 2 of 2

Introduction

Generated Aksbel book section. · Working · Sep 03, 2026 02:03 · saved by @mujirin

Introduction

You opened this book with a simple and powerful question:

“I want to know how you work.”

That question is the right beginning. Modern AI assistants can write explanations, summarize documents, help with code, translate language, draft plans, answer questions, and sometimes appear to reason through difficult problems. They can also misunderstand, invent false information, overstate confidence, miss context, reflect bias in data, or produce fluent answers that should not be trusted without verification.

So the goal of this book is not to make AI seem magical. It is also not to dismiss it as “just autocomplete.” Both reactions are too shallow.

Instead, we will build a working mental model: a way to understand what an AI assistant is doing, why it can be useful, why it can fail, and how a thoughtful human can use it well.

The first idea: intelligence can be studied as behavior

Artificial intelligence did not begin with chatbots. A foundational question was asked long before modern language models existed: if a machine produces behavior that appears intelligent, how should we study that behavior? Alan Turing famously explored this question in “Computing Machinery and Intelligence,” where he proposed replacing the vague question “Can machines think?” with a more testable question about whether a machine’s conversational behavior could be distinguished from a human’s in a structured setting (Turing, 1950).

A few years later, the Dartmouth proposal used the term artificial intelligence for a research project based on the idea that aspects of learning and intelligence could, in principle, be described so precisely that machines could simulate them (McCarthy et al., 1955). That early ambition matters because it frames AI as an engineering and scientific field: not merely building tools, but asking how parts of intelligent behavior can be represented, learned, tested, and improved.

In this book, artificial intelligence means computer systems designed to perform tasks that normally require abilities associated with intelligence: understanding language, recognizing patterns, planning, solving problems, adapting to examples, or making predictions.

That definition is broad. A chess engine is AI. A face recognition system is AI. A spam filter can be AI. A medical image classifier can be AI. A modern chat assistant is AI too, but it is a special kind: it works mainly through language.

The second idea: an AI assistant is not one thing

When you type a message to an AI assistant, it can feel as if you are speaking to a single entity. In everyday use, that is convenient. But technically, an AI assistant is usually a system made of several parts.

A system is a collection of components that work together. For example, a car is not only an engine. It also includes wheels, brakes, sensors, fuel or battery systems, steering, software, and a driver interface. In the same way, an AI assistant is not only “the model.” It may include:

  • a language model,
  • instructions about how it should behave,
  • safety filters or policies,
  • conversation history,
  • retrieval tools that search documents,
  • code execution tools,
  • image or audio processing modules,
  • user interface logic,
  • and sometimes external APIs.

The most important component is often a large language model, or LLM. A language model is a model that estimates patterns in sequences of language. A large language model is a language model with many learned numerical settings and trained on large collections of text, code, or other data. Research on large neural language models has shown that increasing scale can produce systems that perform many language tasks from instructions or examples in the prompt, although performance varies by task and setting (Brown et al., 2020).

But the assistant you use is not just a raw language model. It has usually been further trained or configured to follow instructions, refuse some requests, prefer helpful responses, and act more like a cooperative assistant. Methods such as supervised fine-tuning and reinforcement learning from human feedback have been used to make language models better at following human instructions and preferences (Ouyang et al., 2022).

So when this book says AI assistant, it means the user-facing system that receives your input and returns a response. When it says model, it usually means the trained computational core that converts input patterns into output probabilities.

That distinction will matter often.

The third idea: a model is a pattern-making machine

Before we study large models, we need a simple definition.

A model is a simplified representation of something that helps produce predictions, decisions, or explanations.

A weather forecast model represents parts of the atmosphere. It does not contain the real sky. It contains mathematical structures that help predict rain, wind, temperature, and pressure.

A map is also a model. It is not the city itself. It leaves out trees, conversations, smells, and most buildings. But if it preserves the right structure—roads, distances, rivers, stations—it can help you navigate.

A machine learning model is similar. It is not a copy of the world. It is a computational structure that has learned patterns from data. In a standard textbook definition, machine learning concerns computer programs that improve their performance at a task through experience, where “experience” usually means data or interaction (Mitchell, 1997).

Here is a small example.

Suppose you collect these examples:

Message Label
“Win a free phone now!” spam
“Your meeting starts at 3 PM” not spam
“Claim your prize today” spam
“Can we reschedule lunch?” not spam

A learning system may notice that words like “free,” “claim,” and “prize” often appear in spam messages. It does not need a human to write every rule by hand. Instead, it adjusts internal values so that similar future messages are more likely to be classified correctly.

That is the beginning of machine learning: using examples to tune a system’s behavior.

Modern AI assistants use a much larger and more complex version of this idea. Instead of learning only “spam” or “not spam,” they learn statistical regularities in language, code, facts, styles, reasoning patterns, formats, and relationships among ideas.

But statistical regularity is not the same as truth. A model can learn that certain words often go together without knowing whether a particular claim is correct. This is one reason AI assistants can sound confident while being wrong.

The fourth idea: language must become numbers

Computers do not directly understand words as humans experience them. A computer stores and manipulates numbers. So if a neural network is going to process language, text must be converted into a numerical form.

A token is a unit of text used by a language model. A token may be a whole word, part of a word, punctuation, or another text fragment. For example, the sentence:

“Understanding AI takes practice.”

might be split into tokens similar to:

“Understanding” · “AI” · “takes” · “practice” · “.”

Different models use different tokenization methods, so the exact split can vary.

After text is split into tokens, each token is represented by numbers. These numerical representations allow the model to compute relationships among tokens. For example, a model can learn that “doctor,” “hospital,” and “patient” often occur in related contexts, while “guitar,” “melody,” and “concert” form another region of meaning. These representations are not human definitions. They are learned numerical patterns.

This is one of the central shifts in modern AI: language becomes data that can be processed by mathematical operations.

The fifth idea: generation is step-by-step prediction

When an AI assistant writes an answer, it does not usually produce the whole response in one instant. It generates text step by step.

At each step, the model considers the context—the prompt, conversation history, system instructions, and already generated words—and estimates which token is likely to come next. This is why language models are often described as next-token prediction systems.

For example, if the current text is:

“The capital of France is”

a well-trained model should assign high probability to:

“Paris”

But if the current text is:

“For dinner I cooked rice and”

the next token could plausibly be:

“beans,” “chicken,” “vegetables,” “fish,” or many other options.

The model does not merely store a single answer for every possible sentence. It calculates probabilities based on patterns learned during training and the context currently available. The final response is built by repeatedly choosing tokens according to a decoding method. Some settings make outputs more predictable; others make them more varied.

This is why the same prompt can sometimes produce different answers. It is also why small changes in wording can lead to different outputs.

The sixth idea: modern AI assistants are built on transformers

Many current large language models are based on the transformer architecture. An architecture is the design pattern of a neural network: the arrangement of its main computational parts.

The transformer introduced an especially important mechanism called attention, which allows a model to weigh relationships among different tokens in a sequence (Vaswani et al., 2017). In plain language, attention helps the model decide which parts of the input are relevant to which other parts.

Consider this sentence:

“The trophy would not fit in the suitcase because it was too large.”

A human can infer that “it” probably refers to the trophy, not the suitcase. A language model needs a computational way to represent such relationships. Attention is one of the mechanisms that helps models track connections across a piece of text.

Transformers became central because they process sequences effectively and scale well to large datasets and large models. The details will come later. For now, remember this: the transformer is the main engine design behind many modern language models.

The seventh idea: fluency is not the same as reliability

An AI assistant can produce smooth, grammatical, well-structured text. That fluency is useful. It helps with explanation, drafting, translation, and brainstorming.

But fluency can also be misleading.

A model may produce a false citation, give an outdated answer, misread a question, or combine true facts in an invalid way. In natural language generation, the term hallucination is often used for generated content that is unsupported, unfaithful to the provided source, or factually incorrect in relation to the real world or task context; surveys in the field discuss hallucination as a major reliability problem for generation systems (Ji et al., 2023).

For example, suppose you ask:

“What did this contract say about cancellation?”

If the assistant has not actually received the contract, it may still produce a plausible-sounding answer based on common contract language. That answer may be useful as a general explanation, but it is not evidence about your specific contract.

This is a crucial habit for the whole book:

Treat an AI assistant’s answer as a generated response, not as automatic truth.

Sometimes it is correct. Sometimes it is useful but incomplete. Sometimes it is wrong. Your job is to learn how to tell the difference.

What this book will teach you to trace

The title of this book is Tracing AI because we will repeatedly trace the path from human input to machine output.

A trace is a careful path of explanation. It asks:

  • What entered the system?
  • How was it represented?
  • What patterns did the model use?
  • What constraints shaped the answer?
  • Where could error enter?
  • How can a human check the result?

Here is a simple preview.

You type:

“Explain inflation to me like I’m new to economics.”

The assistant receives your words as input. The text is broken into tokens. Those tokens are converted into numerical representations. The model processes them through many layers. It estimates likely next tokens for a helpful explanation. Assistant training pushes the response toward an instructional style. Decoding turns probabilities into actual words. The final answer appears on your screen.

That response may be clear and helpful. But it may omit important exceptions, use an imperfect analogy, or fail to mention that inflation can be measured in different ways. If you ask for sources, examples, or limitations, the next response may improve. If you provide a textbook excerpt or data table, the answer can become more grounded in that material.

This is the practical skill we are building: knowing what kind of system you are interacting with, so you can guide it, question it, and verify it.

What this book will not assume

You do not need to be a professional programmer to read this book. You do not need advanced mathematics at the start. When a technical term appears, we will define it before relying on it. When an equation is useful, we will connect it to an example.

But the book will not pretend that AI is simple. Some parts are mathematically deep. Neural networks, optimization, probability distributions, attention mechanisms, reinforcement learning, evaluation, and safety all require careful thinking.

The promise is not that every detail will become easy. The promise is that each detail will be placed on a clear path.

The road ahead

The book begins by defining what an AI assistant is and how it differs from a search engine or ordinary software. Then we move backward historically, from rule-based systems to learning systems. After that, we build the core ideas: data, patterns, generalization, models, parameters, training objectives, loss functions, and optimization.

Once the foundation is ready, we study neural networks and language processing. We will see how text becomes tokens, how tokens become vectors, and how transformers use attention to process context. Then we turn to large language models: what they learn, how they generate answers, why they can appear knowledgeable, and why they can fail.

Later chapters focus on assistant behavior: instruction following, alignment, prompting, conversation, reasoning, planning, tool use, hallucination, retrieval, grounding, evaluation, safety, bias, and responsible use. The final chapters bring these threads together into practical methods for working effectively with AI.

By the end, you should be able to look at an AI assistant’s answer and ask better questions:

  • Is this answer based on the prompt, general model knowledge, retrieved documents, or a tool?
  • Is the model explaining, guessing, transforming, summarizing, or inventing?
  • What would make this answer more reliable?
  • What should I verify independently?
  • How can I rewrite my prompt to reduce ambiguity?
  • When should I use the assistant, and when should I not?

These questions are more valuable than memorizing slogans about AI.

A calm starting point

Modern AI assistants are powerful, limited, useful, unreliable in specific ways, and rapidly changing. All of those things can be true at once.

The right attitude is neither worship nor panic. It is careful understanding.

An AI assistant is not a human mind inside a machine. It is not a simple database. It is not a search engine, though it may use search tools. It is not ordinary hand-written software, though it runs on software. It is a trained system that generates responses from learned patterns, current context, and design constraints.

That sentence will become clearer with every chapter.

For now, keep one guiding image in mind: when you interact with an AI assistant, you are not opening a box of fixed answers. You are steering a trained generative system. The better you understand the system, the better you can use it—and the less likely you are to be misled by it.

References

Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., Agarwal, S., Herbert-Voss, A., Krueger, G., Henighan, T., Child, R., Ramesh, A., Ziegler, D. M., Wu, J., Winter, C., ... Amodei, D. (2020). Language models are few-shot learners. Advances in Neural Information Processing Systems, 33, 1877–1901.

Ji, Z., Lee, N., Frieske, R., Yu, T., Su, D., Xu, Y., Ishii, E., Bang, Y. J., Madotto, A., & Fung, P. (2023). Survey of hallucination in natural language generation. ACM Computing Surveys, 55(12), Article 248.

McCarthy, J., Minsky, M. L., Rochester, N., & Shannon, C. E. (1955). A proposal for the Dartmouth Summer Research Project on Artificial Intelligence.

Mitchell, T. M. (1997). Machine Learning. McGraw-Hill.

Ouyang, L., Wu, J., Jiang, X., Almeida, D., Wainwright, C. L., Mishkin, P., Zhang, C., Agarwal, S., Slama, K., Ray, A., Schulman, J., Hilton, J., Kelton, F., Miller, L., Simens, M., Askell, A., Welinder, P., Christiano, P. F., Leike, J., & Lowe, R. (2022). Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems, 35, 27730–27744.

Turing, A. M. (1950). Computing machinery and intelligence. Mind, 59(236), 433–460.

Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., & Polosukhin, I. (2017). Attention is all you need. Advances in Neural Information Processing Systems, 30.

τ TheoryTrace