Chapter 10: Generation — Forming Candidate Models, Concepts, and Hypotheses¶
Level: Both
Key Terms: Abduction · Deduction · First Principles · Generation · Hypothesis · Induction · Synthesis. Definitions are in Appendix A.
The first time I asked a language model to help me debug a production issue, I was impressed.
I gave it the error trace, the relevant code, and a description of the system. It generated five plausible hypotheses for what was wrong. Each was internally consistent. Each explained most of the trace. Each came with a suggested fix.
I tried the fixes in order. None of them worked.
I asked it to generate five more. It produced five variations on the same five hypotheses. The wording was different, the framing was different, but the underlying causes were the same. It had not generated ten hypotheses. It had generated five hypotheses and five paraphrases of those five hypotheses.
The actual cause was something none of the ten had considered. It was not in the trace. It was in a system that called the failing service—a dependency the model had no reason to suspect, because the trace did not mention it.
The model was excellent at generating the plausible. It was not generating the possible. And the difference between plausible and possible is the difference between debugging for an hour and debugging for a day.
This chapter is about that difference. It is about generation—the third stage of the pipeline, and the stage where the frontier of your knowledge is defined by the breadth of your candidates.
Why Generation Is the Hardest Stage¶
Generation is the stage where you form candidate models, concepts, hypotheses, and explanations. It is the creative stage of the pipeline.
It is also the hardest, for a reason that is easy to miss: the quality of your eventual knowledge is bounded by the quality of your candidates. If you never generate the right hypothesis, no amount of testing will find it. Testing can only discriminate among the candidates you have. It cannot invent the one you missed.
TESTING CANNOT RECOVER FROM A MISSED CANDIDATE
Candidates: A, B, C, D, E
│ │ │ │ │
▼ ▼ ▼ ▼ ▼
Testing: ✗ ✓ ✗ ✗ ✗
You select B. It is the best of the five.
But the true explanation, F, was never generated.
You have selected the best available answer.
You have not found the right one.
Diagram description: A diagram shows five candidates, A through E, being tested, with only B marked as passing; B is the best available answer. The true explanation F was never generated, so testing cannot recover the missed candidate.
This is why generation is the stage that separates good knowledge workers from excellent ones. Two people with the same information, the same testing methods, and the same intelligence can reach different conclusions—because one generated the hypothesis that mattered and the other did not.
The model I was using had generated the plausible. It had not generated the possible. And the possible was where the answer lived.
What Generation Requires¶
Generation is demanding in four ways. Each must be cultivated.
┌───────────────────────────────────────────────────────┐
│ WHY GENERATION IS HARD │
├───────────────────────────────────────────────────────┤
│ Requires KNOWLEDGE → rich prior models │
│ Requires IMAGINATION → entertain possibilities │
│ Requires JUDGMENT → distinguish promising │
│ from implausible │
│ Requires TOLERANCE → hold candidates lightly │
└───────────────────────────────────────────────────────┘
Diagram description: A diagram lists four demands of generation: knowledge for rich prior models, imagination to consider possibilities, judgment to distinguish promising from implausible ideas, and tolerance to hold candidates lightly.
Knowledge. You cannot generate good hypotheses about a domain you do not understand. The model I was using had broad knowledge, but it did not have deep knowledge of our system—the specifics of which service called which, the peculiarities of our deployment, the history of similar failures. It generated from general knowledge, not specific knowledge.
Imagination. You must be able to entertain possibilities that are not yet proven. This is the creative dimension. It cannot be reduced to a formula.
Judgment. Not every possible hypothesis is worth pursuing. You must be able to distinguish promising candidates from implausible ones. This is the discriminative dimension.
Tolerance for uncertainty. Generation produces candidates, not conclusions. You must be able to hold them lightly—to pursue them without committing, to test them without being invested.
The model I was using had the first and third. It had knowledge and judgment. It lacked the second and fourth. It could not generate the unexpected, because it was optimized for the expected. It could not hold an unlikely hypothesis lightly, because it had no stake in being wrong or right.
Concept Formation: The Building Blocks¶
Before you can generate hypotheses, you need concepts. Concepts are the categories, classes, and distinctions that organize experience.
We discussed concept formation in Chapter 6 as a brain process. Here we treat it as a deliberate practice.
What Concepts Do¶
┌───────────────────────────────────────────────────────┐
│ WHAT CONCEPTS DO │
├───────────────────────────────────────────────────────┤
│ SIMPLIFY → group instances into classes │
│ PREDICT → anticipate shared features │
│ EXPLAIN → situate in a theory │
│ COMMUNICATE→ share understanding with others │
└───────────────────────────────────────────────────────┘
Diagram description: A diagram lists four functions of concepts: simplify by grouping instances, predict shared features, explain by placing instances in a theory, and communicate understanding to others.
Forming Concepts Deliberately¶
The brain forms concepts automatically. The knowledge engineer forms them deliberately. This means:
┌───────────────────────────────────────────────────────┐
│ DELIBERATE CONCEPT FORMATION │
├───────────────────────────────────────────────────────┤
│ 1. DEFINE TERMS → precise definitions │
│ 2. COMPARE INSTANCES → seek diversity │
│ 3. IDENTIFY ESSENCE → essential vs. accidental │
│ 4. TEST THE CONCEPT → does it capture what you │
│ intend? │
└───────────────────────────────────────────────────────┘
Diagram description: A diagram presents deliberate concept formation as four steps: define terms, compare diverse instances, identify essential rather than accidental features, and test whether the concept captures the intended meaning.
Define terms precisely. A concept is only as good as its definition. Vague concepts lead to vague knowledge.
Compare diverse instances. Concepts are formed by comparing instances. Seek out diverse instances—not just the typical ones—to ensure the concept captures the full range of variation.
Identify essential features. Distinguish essential features (those that make something what it is) from accidental features (those that happen to be present but could be otherwise).
Test the concept. A concept is a hypothesis. Ask: Does this concept capture what I intend? Does it exclude what should be excluded? Does it predict features that are actually present?
This is why my debugging failed. I had a concept of "failure modes in this system" that was too narrow. It included network failures, configuration errors, and code bugs. It did not include "a dependency the trace does not mention." The concept was not wrong—those were all real failure modes—but it was incomplete. And the incompleteness bounded the hypotheses.
Hypothesis Formation: Proposing Explanations¶
A hypothesis is a candidate model—an assertion about how something works, or what will happen, that has not yet been verified.
What Makes a Good Hypothesis¶
┌───────────────────────────────────────────────────────┐
│ CHARACTERISTICS OF GOOD HYPOTHESES │
├───────────────────────────────────────────────────────┤
│ TESTABLE → makes predictions that can be checked │
│ SPECIFIC → precise enough to be falsified │
│ EXPLANATORY → tells you why, not just that │
│ FRUITFUL → generates new questions and lines │
│ SIMPLE → parsimonious (Occam's razor) │
└───────────────────────────────────────────────────────┘
Diagram description: A diagram lists five characteristics of good hypotheses: they are testable, specific enough to be falsifiable, explanatory, fruitful in generating questions, and simple or parsimonious.
Testable. A good hypothesis makes predictions that can be checked against evidence. If a hypothesis cannot be tested, it is not a scientific hypothesis. It is a belief.
Specific. A good hypothesis is specific enough to be falsified. "Something causes the effect" is too vague to test. "This specific mechanism causes the effect" is specific enough.
Explanatory. A good hypothesis explains the evidence, not just describes it. It tells you why something happens, not just that it happens.
Fruitful. A good hypothesis generates new questions, new predictions, new lines of inquiry.
Simple. Other things being equal, a simpler hypothesis is preferable. This is Occam's razor.
The five hypotheses the model generated were testable, specific, explanatory, and simple. They were not fruitful. They did not open new lines of inquiry. They pointed inward, at the same explanations, rather than outward, at the ones I had not considered.
Methods of Hypothesis Generation¶
How do you generate hypotheses? There is no formula, but there are methods.
┌───────────────────────────────────────────────────────┐
│ METHODS OF HYPOTHESIS GENERATION │
├───────────────────────────────────────────────────────┤
│ ABDUCTION → infer the best explanation │
│ ANALOGY → import a model from another domain │
│ INVERSION → work backward from conclusion │
│ COMBINATION → combine existing ideas │
│ ANOMALY → notice what doesn't fit │
└───────────────────────────────────────────────────────┘
Diagram description: A diagram lists five methods for generating hypotheses: abduction infers the best explanation, analogy imports a model from another domain, inversion works backward, combination joins ideas, and anomaly notices what does not fit.
Abduction. Inferring the best explanation for a set of observations. What cause, if true, would produce these effects? This is the most common form of hypothesis generation.
Analogy. Noticing that the current situation resembles one you already understand, and importing the model. This is like that. Powerful, but dangerous if the analogy is superficial.
Inversion. Starting with the conclusion and asking what would have to be true for it to hold. What would produce this outcome?
Combination. Combining elements from different hypotheses or domains to generate a new one.
Anomaly. Noticing something that does not fit the existing model, and hypothesizing that the model is incomplete or wrong. This is the method that would have found my bug. The trace did not mention the dependency. That was the anomaly. I noticed it too late.
The model I was using had generated five hypotheses through abduction. It had not generated any through anomaly. It did not notice what was missing from the trace. It only noticed what was there.
Analogy: The Double-Edged Sword¶
Analogy is one of the most powerful tools of generation. It works by recognizing that two situations share a structure, and then importing what you know about one to the other.
┌───────────────────┐ ┌───────────────────┐
│ SOURCE DOMAIN │ │ TARGET DOMAIN │
│ (what you know) │ │ (what you want │
│ │ │ to understand) │
│ ┌───────────┐ │ │ ┌───────────┐ │
│ │ Structure │───┼───map───┼──►│ Structure │ │
│ └───────────┘ │ │ └───────────┘ │
│ │ │ │
│ Entities A, B │ │ Entities X, Y │
│ Relation A→B │ │ Relation X→Y ? │
└───────────────────┘ └───────────────────┘
Diagram description: A diagram maps structure from a known source domain to a target domain, showing entities A and B alongside X and Y. The source relation A to B suggests a possible target relation X to Y, which remains a question to investigate.
Analogy has driven some of the most important discoveries in history: the atom as a solar system, the brain as a computer, evolution as a market. It is also the source of some of the most persistent errors.
The rule for using analogy well:
┌───────────────────────────────────────────────────────┐
│ USING ANALOGY WELL │
├───────────────────────────────────────────────────────┤
│ 1. IDENTIFY the source and target domains │
│ 2. MAP the structure (entities, relations) │
│ 3. GENERATE hypotheses by inference │
│ 4. IDENTIFY disanalogies (where the mapping breaks) │
│ 5. TEST the hypotheses against evidence │
└───────────────────────────────────────────────────────┘
Diagram description: A diagram gives five steps for using analogy: identify source and target domains, map their structure, generate hypotheses, identify where the mapping breaks, and test the hypotheses against evidence.
Step 4 is the one that is most often skipped, and it is the one that matters most. The analogy holds where the structure matches. It breaks where the structure diverges. The knowledge engineer must map both.
For my debugging, the right analogy would have been: this failure is like a distributed system where the visible trace is not the whole system. That analogy would have pointed me outward, to the unseen dependencies. The model did not generate it because the analogy was not in its training data for this kind of failure. It was in the training data for distributed systems generally, but the model did not make the leap.
This is the limit of analogy for AI systems. They can map surface structures well. They cannot map deep structures that require understanding of the specific system.
Synthesis: Combining Pieces into a Whole¶
Synthesis is the construction of a model from its parts—a theory from its evidence, a strategy from its components, a picture from its fragments.
What Synthesis Requires¶
┌───────────────────────────────────────────────────────┐
│ WHAT SYNTHESIS REQUIRES │
├───────────────────────────────────────────────────────┤
│ RICH INFORMATION → selected and pre-processed │
│ ORGANIZING PRINCIPLE→ theory, narrative, framework │
│ ABILITY TO CONNECT → see how pieces fit │
│ WILLINGNESS TO REVISE → iterate │
└───────────────────────────────────────────────────────┘
Diagram description: A diagram lists four requirements for synthesis: rich selected and pre-processed information, an organizing principle such as a theory or framework, the ability to connect pieces, and willingness to revise.
Synthesis is the most demanding form of generation because it requires holding many pieces in mind simultaneously. It is also the most valuable, because it produces the models that knowledge is made of.
The model I was using could synthesize. When I asked it to combine the trace, the code, and the system description into a coherent narrative, it did. The narrative was coherent. It was also wrong, because the pieces it was combining did not include the missing dependency.
Synthesis cannot recover from missing information. It can only work with what it has been given. This is why pre-processing matters so much: it determines what synthesis has to work with.
The Creative Dimension¶
We have described methods of generation. But these methods do not fully explain where hypotheses come from. There is a creative dimension that resists reduction to procedure.
Incubation¶
Many great hypotheses have come from the subconscious—from moments of insight that seem to arrive unbidden.
The psychologist and philosopher William James described these moments as "flashes of insight." Modern cognitive science attributes them to incubation—the process by which the brain continues to work on a problem below the threshold of consciousness.
┌───────────────────────────────────────────────────────┐
│ THE INCUBATION CYCLE │
├───────────────────────────────────────────────────────┤
│ │
│ IMMERSION ──► INCUBATION ──► ILLUMINATION ──► │
│ (study hard) (let it go) (insight arrives) │
│ │
│ ──► VERIFICATION │
│ (test the insight) │
│ │
└───────────────────────────────────────────────────────┘
Diagram description: A diagram shows an incubation sequence from immersion and intensive study to incubation, illumination or insight, and verification by testing the insight.
Incubation works best when you have immersed yourself in the problem—studied it deeply, thought about it intensely—and then let it go. The subconscious continues to process, combining and recombining ideas, until a promising candidate emerges.
For my debugging, I had immersed. I had spent hours reading the trace. What I had not done was let it go. I had kept staring at the same data, generating the same hypotheses. When I finally stepped away—took a walk, worked on something else—the missing dependency occurred to me. It came from nowhere. It came from incubation.
Play and Constraint¶
Creativity is facilitated by play—activities not directly aimed at the problem but that stimulate the mind in unexpected ways. It is also facilitated by constraint—the boundaries of the problem, which focus the search.
The knowledge engineer uses both. They explore widely, and they define the problem sharply. The constraint is not a limitation; it is a guide.
Quantity vs. Quality¶
A key tension in generation is between quantity and quality. Should you generate many hypotheses, or focus on a few promising ones?
The answer is: both, at different times.
┌───────────────────────────────────────────────────────┐
│ THE CASE FOR QUANTITY │
├───────────────────────────────────────────────────────┤
│ More hypotheses → more chances of a correct one │
│ More hypotheses → more comparisons │
│ More hypotheses → more chance of a novel insight │
│ │
│ But: more hypotheses → more testing required │
└───────────────────────────────────────────────────────┘
Diagram description: A diagram gives reasons to generate more hypotheses: increasing the chances of a correct answer, enabling more comparisons, and creating more opportunity for novel insight. It notes the trade-off that more hypotheses require more testing.
Generate broadly, then filter aggressively. Generate many hypotheses, but quickly eliminate the implausible ones. Focus your testing on the most promising candidates.
The model I was using generated five hypotheses. That was not too few. It was too narrow. Five hypotheses all derived from the same general theory of failure. What I needed was five hypotheses from five different theories of failure. The quantity was adequate. The diversity was not.
DIVERSITY MATTERS MORE THAN QUANTITY
NARROW DIVERSE
┌─────────────────────┐ ┌─────────────────────┐
│ A1 A2 A3 │ │ A B C │
│ │ │ │ │ │ │ │ │ │
│ └───┴───┘ │ │ │ │ │ │
│ │ │ │ └──┴──┘ │
│ Same family of │ │ Different families │
│ hypotheses │ │ of hypotheses │
└─────────────────────┘ └─────────────────────┘
Five variations of one idea Five different ideas
are worth less than five are worth more than
different ideas. fifty variations.
Diagram description: Two columns compare narrow and diverse hypothesis generation: the narrow set shows A1, A2, and A3 from the same family, while the diverse set shows A, B, and C from different families; five different ideas are valued over many variations of one idea.
This is the central lesson I took from the debugging failure. The model was generating quantity. What I needed was diversity. And diversity is exactly what a language model is not optimized for—it is trained to produce the most probable continuation, which is the most familiar hypothesis, not the most different one.
Generation in the Age of AI¶
AI has changed the landscape of generation. Large language models can generate hypotheses, propose explanations, draw analogies, and synthesize information at a scale and speed that was previously impossible.
This is genuinely powerful. But it introduces a specific failure mode: the modal answer problem.
┌───────────────────────────────────────────────────────┐
│ THE MODAL ANSWER PROBLEM │
├───────────────────────────────────────────────────────┤
│ │
│ A language model is trained to predict │
│ the next token. This means it is optimized │
│ for PLAUSIBILITY, not for DIVERSITY or TRUTH. │
│ │
│ When asked for hypotheses, it tends to produce │
│ the most probable hypotheses. Repeatedly. │
│ With paraphrase. │
│ │
│ It is an excellent generator of the expected. │
│ It is a poor generator of the unexpected. │
│ │
└───────────────────────────────────────────────────────┘
Diagram description: A diagram of the modal answer problem: language models predict the next token, favoring plausibility over diversity or truth, so repeated requests for hypotheses tend to produce probable, paraphrased answers rather than unexpected ones.
This is why the model gave me five hypotheses that were the same hypothesis in five costumes. It was doing exactly what it was designed to do. It was generating the modal answer. The modal answer is the familiar answer. The familiar answer is the one that was already in my head.
The knowledge engineer working with AI must compensate for this. Strategies include:
Ask for diversity explicitly. "Generate five hypotheses from different theoretical perspectives." "Generate the hypothesis I am most likely to dismiss." "Generate the hypothesis a skeptic would propose."
Generate across models. Different models have different training data and different biases. Generating from multiple models increases the diversity of candidates.
Generate adversarially. Ask the model to argue against its own output. Ask it to find what is missing. Ask it what it would need to know to be sure.
Generate with humans. The best use of AI generation is not replacement of human generation. It is augmentation. The human generates the unexpected; the AI generates the complete. Together, they cover more of the space.
┌───────────────────────────────────────────────────────┐
│ AI-ASSISTED GENERATION │
├───────────────────────────────────────────────────────┤
│ WHAT AI CAN DO: │
│ • Generate many candidates quickly │
│ • Propose standard explanations │
│ • Synthesize information from multiple sources │
│ • Suggest connections across domains │
│ │
│ WHAT AI CANNOT DO: │
│ • Generate the genuinely unexpected │
│ • Notice what is missing from the data │
│ • Judge which hypotheses matter │
│ • Take responsibility for the knowledge │
└───────────────────────────────────────────────────────┘
Diagram description: A diagram of AI-assisted generation, contrasting capabilities such as quickly producing candidates and connecting domains with limits such as missing gaps in data, judging importance, and taking responsibility.
The knowledge engineer uses AI as a generator, not an oracle. They use it to produce candidates, to explore the familiar, to fill in the standard. They do not trust it to produce the frontier. That remains the human's job.
The Generation-Testing Loop¶
Generation does not happen in isolation. It is tightly coupled with testing.
┌───────────────────────────────────────────────────────┐
│ │
│ ┌────────────┐ ┌────────────┐ │
│ │ GENERATE │─────────►│ TEST │ │
│ │ candidate │ │ candidate │ │
│ └────────────┘ └────────────┘ │
│ ▲ │ │
│ │ │ │
│ │ ▼ │
│ │ ┌────────────┐ │
│ └─────────────────│ EVALUATE │ │
│ │ result │ │
│ └────────────┘ │
│ │
└───────────────────────────────────────────────────────┘
Diagram description: A flow from generating a candidate to testing it and evaluating the result, with evaluation feeding back into another round of generation.
You generate a candidate, test it, learn from the result, and generate a new candidate. The loop continues until you have a model that survives testing.
This is how Newton went from the falling apple to the law of gravitation. It is how Darwin went from the finches of the Galápagos to the theory of evolution. It is how every knowledge worker goes from a question to an answer.
The model I was using was not in this loop. It generated five hypotheses, I tried them, they failed, and then I asked for five more without giving the model the feedback from the failures. It generated the same five hypotheses. It was not learning from the test results. It was generating in a vacuum.
The fix was to include the test results in the next prompt: "These five hypotheses were tested. All failed. Here is what the failures revealed. Now generate five hypotheses that account for these results." The model generated different hypotheses. Some were still wrong. One was close. That one led to the answer.
This is the generation-testing loop. It is not optional. It is the engine of knowledge construction.
A Return to the Production Issue¶
The actual bug was a race condition in a dependency that the trace did not mention.
We found it by generating a hypothesis that was not in the trace: the visible failure is downstream of an invisible one. That hypothesis came from an analogy to a different kind of system, generated by a human—me—after a walk, with the model's five failed hypotheses in my head.
I used the model again after that. But I used it differently. I asked for diverse hypotheses. I asked for the ones I was most likely to dismiss. I gave it the test results from the failed hypotheses. I combined its generation with my own. The model was still useful. It was just not sufficient.
This is the lesson of Chapter 10. Generation is the stage that defines the frontier of your knowledge. The quality of your testing is bounded by the diversity of your candidates. And the diversity of your candidates is bounded by your willingness to generate the unexpected—which is precisely what AI is least likely to do on its own.
The knowledge engineer generates broadly, diversely, and adversarially. They use AI for what it is good at, and they compensate for what it is not. They stay in the loop. They test. They correct.
And they walk away from the problem sometimes, because the missing hypothesis is not always in the data. Sometimes it comes from somewhere else.
Chapter Summary¶
- Generation is the third stage of the knowledge pipeline. It is the work of forming candidate models, concepts, hypotheses, and explanations.
- Generation is the hardest stage because the quality of your eventual knowledge is bounded by the quality of your candidates. Testing cannot recover from a missed candidate.
- Generation requires knowledge, imagination, judgment, and tolerance for uncertainty.
- Concept formation is the most basic form of generation. It requires defining terms, comparing diverse instances, identifying essential features, and testing the concept.
- Hypothesis formation is proposing explanations or predictions that can be tested. Good hypotheses are testable, specific, explanatory, fruitful, and simple.
- Methods of hypothesis generation include abduction, analogy, inversion, combination, and anomaly.
- Analogy is powerful but dangerous. The knowledge engineer maps structure, generates hypotheses, identifies disanalogies, and tests.
- Synthesis is combining pieces into a coherent whole. It requires rich information, an organizing principle, the ability to see connections, and the willingness to revise.
- Generation has a creative dimension that resists reduction to procedure. Incubation, play, and constraint all facilitate generation.
- The tension between quantity and quality is resolved by generating broadly and diversely, then filtering aggressively.
- AI has transformed generation, but it introduces the modal answer problem: language models generate the plausible, not the unexpected. The knowledge engineer must compensate for this by asking for diversity, generating across models, generating adversarially, and combining AI generation with human generation.
- Generation is tightly coupled with testing in a generation-testing loop. Each informs the other.
- The lesson of the production issue is that the answer is not always in the data. Sometimes it comes from the hypothesis you did not generate—and the diversity of your candidates is the frontier of your knowledge.
Next Chapter: Testing — Comparing Candidate Models Against Evidence — a detailed examination of the fourth stage of the pipeline, including prediction, observation, falsification, and the discipline of error correction.