The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...

“The river carried stories farther than any ___.” What completes the thought is a token. What makes it relevant is context. What tests it is reasoning. What acts on it is an agent. What coordinates it is a system. What lies beyond is the frontier. Discover AI, bottom up.
Bought separately
$78.00
Minimum price
$49.00
$79.00
About the Bundle
What happens between the first token and intelligent action?
AI, Bottom Up opens the black box one layer at a time. Through memorable stories, intuitive examples, visual explanations, system designs, and the actual mathematics beneath them, the series reveals how modern AI works—from language representation to context, reasoning, agency, coordinated systems, and future frontiers.
The journey is carefully layered. A reader with no technical background can begin with the story and intuition. Practitioners can follow the mechanisms and architectures. Advanced readers can examine the equations, algorithms, limitations, and verification methods. You choose how deeply to explore without losing the larger picture.
Each volume answers one foundational question: How does AI represent language? Determine what matters? Form and verify conclusions? Turn decisions into governed action? Coordinate as a system? Approach what is still unknown?
Even if you already work with AI, this series offers a reason to look again. Familiar ideas appear from a different perspective—not as isolated models, tools, and techniques, but as connected layers in the construction of intelligence. It helps refresh fragmented knowledge, expose hidden assumptions, and reveal where fluent output ends and trustworthy intelligence must begin.
Token → Context → Reasoning → Agent → Systems → Frontiers
From your first encounter with AI to advanced system design, discover how intelligence is assembled—bottom up.
About the Books
Through story, mechanism, and derivation, the book reveals how language becomes something a machine can transform, how coherent responses emerge one token at a time, and where fluency ends and truth, memory, and context must begin.
Once, a thought lived only as long as someone could remember it.
Then memory left the mind.
It entered marks, clay tablets, manuscripts, printing presses, and digital text. A story could outlive its speaker. An instruction could cross a river. Knowledge could travel farther than any traveler.
Centuries later, a machine meets language.
But the machine does not see a river, hear a story, or recognize a traveler. It receives encoded marks—Unicode, bytes, fragments, and arbitrary integer IDs. Somewhere between the sentence we understand and the numbers a machine can process, language crosses a hidden boundary.
Token opens that boundary.
Consider one unfinished sentence:
The river carried stories farther than any _____.
You may already be thinking traveler. How does a language model arrive at a word that fits?
During training, it acquires broad patterns from vast amounts of text and distributes them across its learned weights. During generation, it combines those global patterns with the local context of the sentence. It scores possible next tokens, selects one, adds it to the sequence, and asks again:
What comes next?
Each answer changes the next question. One context-sensitive choice follows another until tokens become a sentence that appears coherent, meaningful, and intelligent.
The book follows this transformation one hidden door at a time. The alphabet becomes encoded text. Text breaks into tokens. Token IDs find locations in learned geometry. Order enters the sequence. Attention connects each position to what came before. Transformer layers reshape the representation. Training leaves patterns in the weights. Logits open a horizon of possible continuations. A decoding policy chooses one—and the journey begins again.
Most books introduce AI after the machinery is already running. Token begins earlier, when human expression first becomes something a machine can transform. Stories invite the general reader forward; Mechanism boxes reveal the construction; Derivations and experiments let technical readers verify each step; and “Where the Analogy Breaks” sections prevent a beautiful explanation from becoming a misleading one.
By the end, the black box has become a sequence of inspectable transformations. You will understand not only how a token participates in producing language, but also what tokens and learned weights cannot provide by themselves: enduring memory, evidence, provenance, purpose, and the wider world surrounding a sentence.
That boundary leads to the next question—and the next volume:
A token has entered the machine. But what context should travel with it?
“Leave it by the bank before noon.”
Every word is familiar. Yet the instruction is incomplete. Which bank? Leave what? Whose noon? Who made the request—and do they have the authority to do so?
This gap between readable language and usable meaning is context.
Volume I, Token, followed language into the machine and showed how words become numerical representations that a model can process. But a token cannot determine its own meaning. It arrives surrounded by possibilities. Context: Drive the Known to Derive the Unknown begins at that boundary and asks: what selects the information that makes one interpretation appropriate now?
Following one deceptively simple instruction, the book travels through context windows, retrieval, embeddings, reranking, RAG, conversation state, persistent memory, knowledge graphs, MCP, provenance, security, and evaluation. It reveals that context is not merely a larger prompt or a pile of retrieved documents. It is an engineered chain of decisions: what enters, what is excluded, which source is trusted, what is transformed, and what may be lost.
Stories make each problem intuitive. Mechanisms reveal the system underneath. Derivations and laboratories make the ideas inspectable and reproducible. A recurring Canonical Context Trace connects the journey, showing how an ambiguous request becomes a bounded, authorized, and traceable context packet.
But context has a limit. It can find relevant evidence, preserve conflicting sources, and expose uncertainty. It cannot, by itself, determine what validly follows from that evidence. Relevance is not reasoning, and a citation is not a conclusion.
That unresolved boundary opens Volume III, Reasoning. If Token asks how language enters the machine, and Context asks what information should surround it, Reasoning asks the next unavoidable question:
Given what is known, what can the system justifiably conclude?
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.
Learn more about writing on Leanpub
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.