Knowledge Base · Learning paths
Interview: Jason Wei – Chain-of-Thought Inspiration Came from Meditation
Jason Wei, the researcher who introduced Chain-of-Thought (CoT) prompting, reveals in this interview that the core idea was inspired by Sam Harris’s meditation book "Waking Up". He discusses his transition from chemistry to AI, his experiences at Google and OpenAI, and shares thoughtful perspectives on research, public communication, and maintaining work-life balance.
Translated from Chinese by AI. Spotted an issue? Use the feedback button.
Original link: https://mp.weixin.qq.com/s/sIrnDtpm8zsvpaMKN4U0ZQ
Author: Zhiyuan Community, Interview & Writing: Li Mengjia
Introduction
On the path to developing large language models, key ideas such as Chain of Thought, instruction tuning, and emergent abilities have received significant attention. It is the Chain of Thought (CoT) technique that enables large models to exhibit a range of remarkable capabilities, becoming the foundational technology behind the “emergence” observed in modern large language models. Chain of Thought works by showing a large language model a small number of examples that demonstrate the reasoning process. This teaches the model to display its reasoning steps when generating answers, guiding it toward more accurate responses. It essentially breaks down the multi-step reasoning process of black-box deep learning into intermediate steps, decoupling the tasks at each stage, reducing the pressure on the model at every individual step, and improving both interpretability and overall performance.
Research inspiration often comes from a fleeting, serendipitous moment that cannot be forced. When asked about the spark behind Chain of Thought, its proposer Jason Wei shared that his inspiration came from a meditation book titled Waking Up. The author is the American atheist and public intellectual Sam Harris, who explores the relationship between mind, consciousness, and the self from the perspective of spirituality.
The Zhiyuan Community was honored to conduct an exclusive interview with current OpenAI scientist Jason Wei. He spoke candidly about the details of conducting research and his work experiences at Google and OpenAI. Jason Wei graduated from Dartmouth College and has accumulated rich experience and outstanding achievements in the field of large model development. During his time at Google, he played a leading role in promoting a series of pivotal ideas in large language models, including Chain of Thought prompting, instruction tuning, and model emergence.
Key Takeaways
-
For many Chinese families at the time, the American Dream meant sending their children to Ivy League schools, securing a respectable job on Wall Street, and earning a lot of money. I became the only person in my social circle who pursued a career in artificial intelligence research.
-
Early chemistry research taught me the true essence of research and how to formulate rigorous hypotheses and test them.
-
In 2019, I built the first neural network for classifying lung cancer. It was also the first paper I published; it was rejected six times before being accepted.
-
I am very interested in meditation. The purpose of meditation is to observe all the thoughts that arise in your mind—what I call the stream of thought, a continuous flow of ideas. Drawing from the human internal thinking process, I believe models can also have a stream of thought.
-
The reason this technique is called Chain of Thought is that a “stream of thought” feels more like a chaotic, random emergence of whatever appears in the mind. A Chain of Thought, by contrast, is a more logical and structured thinking process.
-
The biggest change from Google to OpenAI is that everyone shifted from doing their own independent research and choosing personal projects to working within larger teams that have core organizational goals.
-
OpenAI employees work extremely hard, and everyone is deeply passionate about artificial general intelligence (AGI). Most people who join OpenAI want to contribute to something much larger and become part of projects like GPT.
-
I am not particularly good at work-life balance, nor do I believe everyone should strive for it. The truth is, no extraordinarily successful person avoids hard work. My strategy is to take one day off per week and work on all other days, usually until around 10 or 11 p.m. I make sure to get enough sleep and exercise at least three times a week.
-
Regarding promotion and publicity, many researchers still fall far short. The famous mathematician Richard Hamming from Bell Labs advised that one should spend as much time on promotion as on the actual work (running experiments and writing papers).
From Wall Street Dreams to Neural Networks
Q: Could you describe your early life and upbringing? When did you first get involved in scientific research?
A: I grew up in a small town in Virginia. I attended public elementary school, but I managed to get into a highly competitive high school—Thomas Jefferson High School for Science and Technology. It’s a school you have to take an exam to get into, and the average SAT scores of the students there are extremely high.
Located in Virginia, Thomas Jefferson High School for Science and Technology enjoys the reputation of being “America’s #1 public high school.” The students there are all exceptionally talented, ranking among the top 2% nationwide. High school was probably the most intense period of my life. The main thing I learned there was how to work hard. Most people either love competing or love doing research—I belonged to the latter group. I started doing research as early as high school. At first, I did some chemistry-related research at the U.S. Naval Research Laboratory (NRL). Opportunities to get involved in research were still quite rare back then, but I seized every one I could. Of course, I no longer work on chemistry today.
Q: Did your early chemistry research influence your later work in terms of methodology or way of thinking?
A: It taught me what the essence of research really is—how to formulate rigorous hypotheses and test them.
Q: I understand that your original dream was to become a Wall Street banker. How did that dream change over time?
A: Yes. Back then, we often talked about the “American Dream.” For many Chinese families at the time, the American Dream meant sending your child to an Ivy League school, landing a respectable job on Wall Street, and making a lot of money. I went to Dartmouth, which is a relatively low-key Ivy League school. Dartmouth itself has very close ties to Wall Street—everyone around me was grinding to get into finance and investment banking. However, during my freshman year, I didn’t land any finance internships, which felt like I had gone off track. It just so happened that a friend of my mother was running an AI startup. I reached out to him and decided to give AI a try. As a result, I became the only person in my social circle doing artificial intelligence research, which felt a bit lonely. (Editor’s note: The American Dream is commonly understood as economic success or entrepreneurial spirit. In 1931, historian James Truslow Adams defined the “American Dream” as “that dream of a land in which life should be better and richer and fuller for everyone, with opportunity for each according to ability or achievement, regardless of social class or circumstances of birth.”)
Q: Could you share more about your life at Dartmouth and any memorable stories?
A: Although Dartmouth ranks among the top 100 universities, there weren’t many professors working on AI at the time. There happened to be an opportunity to work on medical image data processing, so in 2019 I built my first neural network capable of classifying lung cancer. It was also the first paper I tried to publish—I got rejected six times before it was finally accepted. My motivation at the time was simply to get a paper published so I could apply for PhD programs. During my time at Dartmouth, I also went on an exchange program in Denmark.
Q: Who was your favorite mentor, and who has had the greatest influence on you?
A: My fellow alumnus Sam Greydanus, who is three years older than me. We probably only talked about five times in total. He was one of the few people at Dartmouth doing AI research. Like me, he later joined Google’s AI Residency program and has done a lot of excellent work. Given how weak the AI environment was at Dartmouth at the time, his presence was truly inspiring. As a “new apprentice” in machine learning, I received a long email from him full of very useful advice—such as reading Arxiv regularly, frequently releasing code, and writing blog posts about research. His specific suggestions were as follows:
Hey Jason, I remember you—great to hear from you! I have some (pretty opinionated) advice on how to do deep learning research. Here’s a list (ordered roughly by importance / chronological half-life).
-
Read every blog post by Andrej Karpathy
-
Read every blog post by Chris Olah
- Read any Distill post that interests you. Or check out the ones I listed (https://greydanus.github.io/)
-
Maybe — take an online course like Andrew Ng’s Coursera class
-
Absolutely — write simple personal projects using Jupyter Notebook, NumPy, and PyTorch. When you finish them:
- Release good, well-documented code (see my GitHub)
- Write a short blog post about what you did (see my blog)
5. Download the Arx app and browse papers on Arxiv (the online repository for machine learning preprints). Check it roughly every day during your commute. Follow the cs.LG, cs.NE, and stat.ML categories. Also star the following authors: Yoshua Bengio, Yann LeCun, Geoffrey Hinton, Jason Yosinski, David Duvenaud, Andrej Karpathy, Pieter Abbeel, Quoc Le, Alex Graves, Koray Kavukcuoglu, Gabor Melis, Oriol Vinyals, Jascha Sohl-Dickstein, Ian Goodfellow, and Adam Santoro. By staying up to date with the papers they upload and regularly skimming the titles and abstracts of papers in those three categories, you can quickly gain a solid understanding of SOTA research.
Alternative: Start checking the “Hot Hype” and “Recent Hot” tabs on Arxiv Sanity Preserver every day.
6. When/if you begin doing research at Dartmouth, make sure some element of deep learning is involved.
7. If you have a choice between PyTorch and TensorFlow, choose PyTorch. You will thank yourself for the rest of your life.
8. Must-read influential papers: the AlexNet paper, Alex Graves’ “Generating Sequences” paper, any paper by Jason Yosinski (he is an excellent author), the Neural Turing Machines paper, the DeepMind Atari paper, and perhaps Goodfellow’s GAN paper (though I haven’t read it yet). If possible, stay away from GANs.
9. In the ML stage, simple problems + super-simple experiments » large, multi-GPU jobs. A lot of good research (including almost all of my own work so far) can be done on a decent MacBook.
10. Don’t let this list overwhelm you. You may find a path that suits you better. The best advice I can give is to repeat Richard Feynman’s words: “Study what you are most interested in, in as undisciplined, irreverent, and original a manner as possible.”
Q: What were the other key turning points and lucky moments on your research journey?
A: The luckiest moment was being accepted into the Google AI Residency program. The acceptance rate is around 1%, and it propelled me straight into industry. It’s a 12-month research program that doesn’t require a PhD; you get to work as a full-fledged researcher. If you perform well during the residency, you can transition into a long-term research position at Google.
Chain of Thought (CoT) Originates from Deep Meditation — Letting Models Mimic the Flow of Human Thinking
Q: What was it like working at Google Brain? For example, what inspired the Chain of Thought project?
A: Before 2022, working at Google Brain was considered one of the best jobs in the world — and it still is. At Google, you have a tremendous amount of freedom and resources to pursue whatever you want. It’s quite ideal. You can also publish a lot of papers, all with proper authorship and the accompanying prestige. The period I was there felt like a golden age of AI research. I really loved Google.
Q: Regarding Chain of Thought, you highlighted the keyword “meditation.” Could you elaborate on that?
A: Yes, I’m very interested in meditation. The purpose of meditation is to observe all the thoughts arising in your mind. I call this the stream of thought — essentially a continuous flow of thoughts. I even wrote a commentary paper on it titled Artificial stream of thought has non-trivial connections to consciousness (https://jasonwei20.github.io/files/artificial_stream_of_thought.pdf). At the time, it didn’t receive much attention because there was no experimental validation. Many opinion pieces argued that language models could possess a stream of thought, which also implied the possibility of consciousness.
I thought about how humans solve math problems: before arriving at the final answer, there is an internal thinking process. So I started with math problems, experimented with changing the prompt, and discovered that language models could also exhibit internal reasoning capabilities. By asking the model to go through a series of thinking steps before giving the answer, Chain of Thought was born. At first, the results weren’t great — it was highly dependent on model size. Later, when the much more powerful PaLM model appeared, the larger the model, the better CoT performed. I then applied this Chain of Thought technique to other types of problems, and it worked very well.
Technically, it’s called “Chain of Thought” because a stream of thought is more like a messy, random emergence of whatever comes to mind. In contrast, a chain of thought is a more logical and structured thinking process.
Q: Does the inspiration from meditation have any connection to religion?
A: No, I’m not religious. However, I was deeply inspired by the book Waking Up: A Guide to Spirituality Without Religion by Sam Harris. That’s where my inspiration came from.
(Editor’s note: The author of Waking Up is the American atheist, public intellectual, and neuroscientist Sam Harris. The book is written for the roughly 20% of the American population who identify as “spiritual but not religious” — people who believe in spirituality but do not follow any religion. The book emphasizes how meditation can dissolve the illusion of the self. Using neuroscience and thought experiments, it attempts to demonstrate two main ideas: 1) Human consciousness has higher-dimensional aspects; what we consider “self,” emotions, and experiences are largely illusory — a perspective essentially aligned with Buddhist worldview. 2) Through meditation practice, one can attain the experience of emptiness.)
Waking Up: A Guide to Spirituality Without Religion, by Sam Harris
Amazon link
Q: At Google, you also led the fine-tuning project. What challenges did that work face?
A: We were involved in the FLAN project at the time. Back then, we still didn’t know how to properly fine-tune language models, so preventing overfitting was extremely difficult. One thing my team and I had to do was manually write hundreds of different instructions for these models just to avoid overfitting.
Second, we had to figure out the right experimental design and execute it correctly. Fine-tuning at that time was computationally very expensive, so we needed careful planning, ablation studies, and so on. We also designed experiments to evaluate zero-shot task performance. We were among the first at Google to experiment with fine-tuning large language models to follow instructions.
Q: So your team were the pioneers of instruction tuning?
A: OpenAI had done some instruction tuning work before us, but they didn’t publish papers on it. So we were the first team to formally introduce the term “instruction tuning” in a published paper (original link: https://openreview.net/forum?id=gEZrGCozdqR).
Q: How do you usually organize a team and work on projects with the smartest people?
A: When you work with truly outstanding collaborators, they usually have extremely high standards. You constantly feel compelled to focus on what really matters and to hold ambitious visions. Every time you present a result, they will keep asking: “Is there a way to make this even better?” They continuously push you to improve. For example, my colleague Quoc V. Le would often say to me, “It would be great if you could achieve this with a model 10 times smaller.” That is genuinely a very hard thing to do.
Q: You’ve also written many articles about emergence. What emerging capability in models excites you the most?
A: There are three emerging abilities from my papers that excite me the most:
-
- In-context learning (https://arxiv.org/abs/2303.03846). Larger language models can perform “real” in-context learning — they can actually reason about input-label mappings rather than just following the format.
-
- Chain-of-thought reasoning, especially the ability to decompose problems. This suggests that one day AI might be able to tackle extremely challenging problems, such as climate change.
-
- U-shaped scaling (https://arxiv.org/abs/2211.02011).
Sometimes, as language models scale up, their performance gets worse. You might think it will keep deteriorating. But if you continue scaling, the trend reverses and performance starts improving again. The overall curve looks like a U-shape.
Q: If we continue down this path, what kinds of model capabilities might emerge in the future?
A: I think it would be very interesting if models could develop strong planning abilities. Right now, if you ask a model “What are the five steps needed to solve this math problem?”, it often can’t answer well. It might handle individual steps decently, but the overall planning is poor. Another important direction is better generalization. The biggest current issue is that language models are not always reliable — in some use cases you can’t fully trust them, achieving only around 90% accuracy. If we can cross that threshold, they could become significantly more useful.
OpenAI’s Pointer: There Is No Secret—Only Hard Work
Q: How did you transition from Google Brain to OpenAI? Compared to working at Google, how does working at OpenAI feel? Do you enjoy the working atmosphere there?
A: I wanted to experience working with different people, and indeed many had already left Google. Working at OpenAI is incredibly exciting—everyone is deeply passionate about building AGI. The people at OpenAI work extremely hard, and the teams are highly focused. You have the freedom to pursue what you want to do. Of course, most people who join OpenAI want to work on much larger-scale projects and become part of efforts like GPT.
Q: What is the biggest difference between working at OpenAI and working at Google?
A: Google has also changed significantly recently, so it’s hard to make a direct comparison. The biggest shift is moving from everyone doing their own independent research and choosing their own projects to working in much larger teams with a clearer, more unified core objective. OpenAI is extremely focused on building AGI—especially safe AGI.
Q: How does your previous work connect to the current GPT-4 class of projects?
A: I used to study large language models, and I still do. A lot of that knowledge remains relevant, including the two papers I led earlier (Chain-of-Thought Prompting Elicits Reasoning in Large Language Models, https://arxiv.org/abs/2201.11903; and Emergent Abilities of Large Language Models, https://openreview.net/pdf?id=yzkSU5zdwD). The two most important skills I learned in the past are prioritization and communication. I believe both skills are still highly relevant, even though I no longer write papers. I still do research, but not all of it gets published. Also, most of the GPT-4 work was completed before I joined; I only made a small contribution on the evaluation side.
Q: What are your own short-term or long-term research goals?
A: The long-term goal is simply to build AGI. I think being part of the team that builds AGI is an incredibly profound and exciting thing.
Q: So there’s still a long way to go before we reach AGI, right?
A: It depends on how you define “long.”
Q: There are many paths to building AGI. What is the positioning of your work within the overall AGI project?
A: This is a difficult question to answer. I don’t know the exact path to AGI. I think some of my earlier work focused more on the fact that language models can perform reasoning. And when you scale language models, you unlock these emergent abilities that you might not have anticipated. I believe those were the two things I tried to promote during my time at Google.
Q: How do you view the future of artificial intelligence and your own future research direction in the field?
A: One thing I’ve been thinking about a lot is evaluation. One reason it’s hard to evaluate models is that language models can perform an extremely wide range of tasks. They generate very long completions that even humans need a long time to read. For these kinds of tasks, there is often no clear definition of what a “perfect” output looks like. In a sense, evaluation metrics become the objective function that researchers optimize for. If we can gain a deeper understanding of models’ behaviors and limitations, we can better guide researchers toward doing the right things.
Q: Regarding emergent abilities, what are some wild future possibilities you can imagine?
A: I think important future directions include more factual language models that don’t hallucinate, multimodal models that can use tools to interact with the world, and, more generally, safer models.
Q: For people who want to build a career in this field, what do you think is the most important advice?
A: You really have to work extremely hard. This doesn’t just apply to the research itself, but to every part of the research cycle—choosing research topics, promoting the work, and I also consciously make an effort to collaborate with people I truly admire and who are exceptionally capable. At Google, the people who influenced me a lot were my colleagues Barret Zoph and Liam Fedus. Their research taste deeply influenced me and taught me a great deal about how to think about things.
Q: How do you define “working extremely hard”? Does it mean working very long hours?
A: The length of time you work is just as important as the level of focus. So you can either increase your working hours or increase your focus. I think most people tend to try increasing time, but sometimes increasing focus can be more effective. I do both.
Q: What does a typical day in your schedule look like?
A: I usually start working around 10 a.m. and work until about 10 or 11 p.m. There are probably a few hours of meetings each day, plus lunch, dinner, replying to emails, and other things. If I have plans in the evening, I might not work. On weekends, I generally work one day and rest one day. Sleep and exercise are very important to me. I make sure I get enough sleep every day and exercise at least three times a week.
Q: Do you give yourself time to think deeply? Like the meditation you mentioned before—stopping during work to reflect on what to do next?
A: I probably should, but I haven’t made time for it. I’ve been a bit too busy, and I stopped meditating.
Q: How do you balance your professional life with personal hobbies and interests? Besides research, what do you do in your free time?
A: I don’t have much free time for other things. I’m not very good at balancing work and life, and I don’t think everyone needs to strive for perfect balance. The truth is, people who can sustain intense effort tend to be more successful. There are no super-successful people who don’t work hard. One good strategy I’ve heard from others is to take one day off per week and work the rest of the days. Of course, I also browse Twitter and meet friends occasionally—maybe a few times a week. I really enjoy traveling. When I was at Google, I tried to attend almost every out-of-town conference. It was a lot of fun and a great way to meet new people and visit new cities—very cool.
Four Pieces of Advice for Researchers: Promotion and Publicity Cannot Be Overlooked
Q: What advice do you have for young researchers on how to publish papers more effectively?
A: This blog post (original link: https://www.jasonwei.net/blog/practicing-ai-research) contains most of my advice for those who want to become better researchers. It is divided into four main parts: first, coming up with or selecting a research idea; second, running experiments; third, writing the paper; and fourth, doing promotion. Researchers can actively improve each of these four skills.
- First, idea selection.
Coming up with or choosing a topic to study is what’s often called “research taste.” Everyone should pick a type of research that feels personally fulfilling, but different research tastes have very different levels of impact. I personally favor simple, general, and time-tested research topics, and try to avoid complex, task-specific, or short-lived projects.
A good rule of thumb is to either (1) do something significantly better than others in a hot area, or (2) work in an area that is likely to become the next hot topic. The first strategy carries lower risk but requires tremendous effort. The second is higher risk but offers potentially enormous returns.
When starting out, it is reasonable to ask experienced researchers about their interests and choose topics they find exciting. Most people (including myself) can benefit enormously from improving their idea selection, because excellent taste in problems can dramatically increase the impact of your research. Conversely, no matter how well a project is executed, if the research topic is narrow and has limited room to grow, its impact will be constrained.
I have also learned the importance of recognizing the sunk cost fallacy. When I realized I wasn’t making meaningful progress in medical imaging AI, I completely abandoned that direction and switched to natural language processing.
- Skill Two: Experiment Design and Execution.
Once a research topic is chosen, the next step is to design and run experiments that either demonstrate an idea works or answer a scientific question. Experiment design is usually straightforward. As a check for rigor, I like to show my results to colleagues and ask if anything is missing.
Executing experiments quickly is beneficial because time is expensive, and it signals commitment to collaborators. However, sacrificing quality for speed is a mistake. It is important to build a reputation for conducting rigorous and thorough experiments. Even a brilliant idea can be ruined by sloppy execution.
- Skill Three: Paper Writing.
The way a paper is written can dramatically affect its reception. At a high level, I carefully consider how to connect the experimental results to the broader context of the field so that readers understand why the findings matter. I strive to ensure the paper has a clear structure, smooth logical flow, and follows academic writing conventions. I also focus on using clear and precise language, avoiding vague or ambiguous terms.
I always ask colleagues or mentors to review the paper for feedback and suggestions. Finally, I believe patience and perseverance are essential when writing papers, as it is a process that demands both time and effort.
- Skill Four: Maximizing Impact.
The final skill primarily comes into play after the paper is published: maximizing the impact of your work. In particular, many researchers fall far short when it comes to promoting their work. I consider this the most underrated skill—and also the easiest one to improve.
There are many ways to maximize impact: promoting your work on Twitter, giving talks, presenting at conferences, writing follow-up papers, recording YouTube videos, writing blog posts, and more. Advertising your work on Twitter often offers the highest return on effort. It is also important to open-source your code, data, or models so that others can build on them and run their own experiments.
Q: Many researchers feel that promotion and publicity distract from their core work. But in reality, although it takes effort, promotion is extremely important, right?
A: I completely agree. Although it can feel tedious and is not the most exciting part of research, the advice from the famous mathematician Richard Hamming at Bell Labs is that you should spend as much time on promotion as you do on the actual work (running experiments and writing papers).
(Editor’s note: Richard Hamming once said that many excellent pieces of work sank without a trace because of poor promotion, only to be rediscovered by others later. Often, the discoverers of important work couldn’t be bothered to communicate their results clearly, greatly diminishing the societal value of their contributions.)