How I use LLMs
Overview
Andrej Karpathy explains how to use LLM products by treating each model as a knowledge-compressing “zip file” whose context window can be extended with tools, documents, and multimodal inputs. He demonstrates practical workflows across ChatGPT, Claude, Perplexity, Gemini, Grok, NotebookLM, and Cursor, while emphasizing that model choice, verification, and matching tools to the task matter because outputs can be wrong.
Key takeaways
- Treat an LLM’s pretrained knowledge as a probabilistic, potentially outdated compression of internet content; verify important claims and use search when the answer depends on recent events.
- Keep the context window focused by starting a new chat when changing topics, and provide source documents when precise details matter more than the model’s general recollection.
- Use fast models for routine questions and reasoning-tuned models for hard math, coding, or logic tasks; Karpathy’s gradient-check example shows that reasoning models can find bugs missed by a standard response.
- Tool access determines reliability: Python can calculate exact results and Advanced Data Analysis can create plots, but generated code and assumptions still require inspection.
- For research, use Deep Research to assemble a cited first draft, then inspect the papers themselves; Karpathy found reports could omit relevant companies and include faulty figures.
- Few-shot examples make reusable custom GPTs more dependable: Karpathy’s Korean tools combine explicit instructions and examples to produce vocabulary lists, detailed translations, and OCR-based subtitle explanations.
Chapters
- ChatGPT became a widely used chat interface after OpenAI released it in 2022, but by 2025 users could choose among many competing assistants.
- Karpathy names Google Gemini, Meta AI, Microsoft Copilot, Anthropic Claude, xAI Grok, DeepSeek, and Mistral Le Chat as examples.
- Chatbot Arena and Scale’s SEAL leaderboard provide rankings and evaluations for comparing models.
- A simple text prompt and its response are converted into tokens, the chunks of text processed by the model.
- Karpathy uses OpenAI’s tokenizer to show a 15-token prompt and a 19-token response, with tokenization changing based on the text.
- Chat formats add special tokens to mark user and assistant messages, but both sides ultimately contribute to one sequence.
- A new ChatGPT conversation resets the token stream; each user message and model response extends the context window.
- Pretraining compresses patterns and knowledge from internet-scale text into model parameters, while post-training teaches an assistant-like style.
- Karpathy describes the model as a lossy, probabilistic “zip file,” not a live database with a calculator, browser, or Python interpreter built in.
- Karpathy uses ChatGPT’s estimate of about 63 mg of caffeine in an Americano as a low-stakes answer that can be checked against primary sources.
- For a runny nose, he checks ChatGPT’s claims about DayQuil and NyQuil ingredients against the medication boxes at home.
- Common, stable facts are more likely to be represented well in model parameters, but the model’s recollection is not a guarantee of accuracy.
- Starting a new chat when switching topics removes irrelevant context, which Karpathy treats as working memory that can distract the model and add processing cost.
- ChatGPT’s free, Plus, and Pro plans provide different model access and usage limits; he recommends checking which model is actually selected.
- Karpathy compares subscriptions across ChatGPT, Claude, Gemini, and Grok, and sometimes asks several models the same question as an “LLM Council.”
- Reinforcement learning can teach models to try approaches, revisit assumptions, and backtrack on math and coding tasks.
- Thinking models spend more time and generate more tokens, often improving performance on difficult reasoning problems but adding latency.
- Karpathy recommends using fast, non-thinking models for easy queries and switching to reasoning modes when a problem needs more careful work.
- GPT-4o suggested debugging checks for Karpathy’s failed gradient check but did not identify the underlying bug.
- OpenAI o1 Pro reasoned for about a minute and found a mismatch in how parameters were packed and unpacked; Claude 3.5 Sonnet, Gemini, and Grok 3 also found the issue.
- Perplexity’s DeepSeek R1 exposed a longer reasoning trace and reached the same fix, illustrating why comparing models can help with difficult code.
- A search-enabled assistant can issue queries, gather web pages, add their contents to the context, and then answer using current information.
- Karpathy uses the release schedule for The White Lotus season 3 to show why a model trained before the announcement needs web search.
- ChatGPT, Perplexity, Grok, Claude, and Gemini differ in search integration; citations let users inspect the sources behind an answer.
- Karpathy uses Perplexity for questions whose answers are likely to appear in a few current web sources, such as market closures and product availability.
- Examples include where The White Lotus was filmed, rumors about Apple launches, Civilization VII’s release date, and whether travel to Vietnam is safe.
- Search is also useful for getting context on a trending topic or social-media post that lacks enough background on its own.
- ChatGPT Deep Research combines extended reasoning with multiple searches and source review, sometimes taking several minutes to produce a report.
- Karpathy asks it to investigate calcium alpha-ketoglutarate in Brian Johnson’s longevity mix, including human and animal evidence, mechanisms, and safety concerns.
- He compares ChatGPT’s report with Perplexity Deep Research and Grok Deep Search, and treats all generated reports as drafts to verify against cited papers.
- Uploading a document places its contents in the model’s working context, letting users ask questions about specific material rather than relying on vague recall.
- Karpathy uploads an Arc Institute paper about Evo 2, a biological foundation model trained on genomic sequences, and asks ChatGPT to summarize it after Claude hits a length limit.
- He cautions that PDF handling may not preserve images or layout perfectly, so users should check whether important details were captured.
- Karpathy copies a chapter of Adam Smith’s The Wealth of Nations from Project Gutenberg into Claude and first asks for a summary.
- He then reads the chapter on division of labor and the extent of the market, asking follow-up questions as unfamiliar ideas arise.
- Providing the actual passage improves comprehension, especially for older texts or subjects outside the reader’s expertise.
- ChatGPT can recognize when a calculation is too difficult to perform reliably in text and hand it to a Python interpreter.
- The model writes code, the application runs it, and the result returns to the model for a readable answer.
- Karpathy’s comparison shows why tools matter: ChatGPT and Claude can calculate large products with code, while models without a suitable interpreter can return plausible but incorrect answers.
- ChatGPT Advanced Data Analysis can collect or accept data, write Python, and generate plots, such as a chart of OpenAI’s valuation over time.
- Karpathy spots two errors: code silently converts an unknown 2015 valuation into 0.1, and a trend extrapolation reports an inconsistent 2030 figure.
- He recommends inspecting generated code and checking assumptions, treating the feature as a useful but fallible junior data analyst.
- Claude generates 20 flash cards from Adam Smith’s biography and then builds a React flash-card app that runs in the browser.
- Artifacts are custom local browser apps, not full web services with a database or backend.
- Karpathy finds diagram generation especially useful: Claude turns a Wealth of Nations chapter into a Mermaid graph showing how market size, transport, and specialization connect.
- Karpathy uses Cursor as a desktop coding environment that can access project files and call Claude 3.7 Sonnet, avoiding manual copy-and-paste between a browser and an editor.
- A few natural-language instructions produce a React tic-tac-toe app, then Composer adds confetti, winning-cell styling, and a sound effect across files.
- He calls this “vibe coding,” while noting that developers can inspect the code, approve commands, and fall back to conventional programming when needed.
- Karpathy estimates that roughly half his desktop queries and about 80% of his phone queries are spoken rather than typed.
- ChatGPT’s mobile microphone transcribes speech into text; on Mac, Karpathy uses Superwhisper with the F5 key to dictate into any app.
- He types technical names such as library or product names when speech recognition may transcribe them incorrectly.
- Unlike speech-to-text followed by text generation, advanced voice mode processes audio tokens directly and can respond in audio without a text-only exchange.
- Karpathy tests ChatGPT’s voice with explanations of Rayleigh scattering, Yoda and pirate styles, storytelling, counting, and animal sounds.
- He finds the feature engaging but sometimes restrictive, and demonstrates Grok’s more permissive voice modes, including romantic, unhinged, conspiracy, and role-play styles.
- Google NotebookLM accepts source text, web pages, and PDFs, then supports both question-answering and generated audio.
- Karpathy uploads the Evo 2 paper and creates a roughly 30-minute Deep Dive podcast explaining its content.
- Listeners can add instructions or use interactive mode to ask a question while the generated podcast is playing.
- An image can be divided into patches, mapped to a vocabulary, and represented as a token sequence, much like text or audio.
- A Transformer can model mixed token streams without inherently knowing which tokens represent text, images, or audio.
- Encoders and decoders handle the conversion between raw media and the token representations used by the model.
- Karpathy uploads a supplement label and asks the model to transcribe its ingredients into a table before asking for analysis, making transcription errors easier to catch.
- He uses screenshots of blood-test results for an initial interpretation, while recommending that medical conclusions be discussed with a doctor.
- Other examples include extracting a mathematical expression, explaining toothpaste ingredients, and interpreting a crow “attempted murder” meme.
- ChatGPT’s DALL-E 3 can generate images from prompts, while Karpathy also uses Ideogram for YouTube thumbnails and icons.
- In the described ChatGPT setup, a language model creates an image caption that is passed to a separate image-generation model.
- Karpathy briefly compares rapidly evolving video generators, noting differences in style and quality and that he uses them less in his own work.
- ChatGPT can save information between conversations in a memory store that is added to future chats; Karpathy explicitly asks it to remember his view of Hollywood’s peak.
- Users can review, edit, add, or delete memories, which may make recommendations more relevant over time.
- Custom instructions set persistent preferences, such as a more natural tone, educational explanations, or a preferred level of formality for Korean.
- Karpathy’s Korean vocabulary extractor turns a sentence into dictionary-form vocabulary formatted for Anki flash cards.
- His detailed translator gives a complete translation and breaks down Korean sentence parts; few-shot examples in the GPT instructions help specify the desired output.
- A Korean subtitle GPT combines image OCR, translation, and grammar explanation when subtitles are baked into video pixels.
- Karpathy calls ChatGPT a strong default but recommends using specialized alternatives, including Perplexity for search, Claude Artifacts for small apps and diagrams, and Grok for more permissive voice interaction.
- Choose a larger or reasoning-tuned model when the task needs stronger knowledge or difficult math, code, and logic; use search for fresh information outside the model’s training knowledge.
- Compare app capabilities across Python execution, file uploads, audio, images, video, memory, custom instructions, and custom GPTs, since features can differ between web and mobile apps.
Transcript excerpt
0:00 hi everyone so in this video I would like to continue our general audience series on large language models like chpd now in the previous video deep dive into llms that you can find on my YouTube we went into a lot of the underhood fundamentals of how these models are trained and how you should think about their cognition or psychology now in this video I want to go into more practical applications of these tools I want to show you lots of examples I want to take you through all the different settings that are available and I want to show you how I use these tools and how you can also use them uh in your own life and work so let's dive in okay so first of all the web page that I have pulled up here is chp.com now as you might know chpt it was developed by openai and deployed in 2022 so this was the first time that people could actually just kind of like
0:48 talk to a large language model through a text interface and this went viral and over all over the place on the internet and uh this was huge now since then though the ecosystem has grown a lot so I'm going to be showing you a lot of examples of Chachi PT specifically but now in 2025 uh there's many other apps that are kind of like Chachi PT like and this is now a much bigger and richer ecosystem so in particular I think Chachi PT by openai is this Original Gangster incumbent it's most popular and most featur rich also because it's been around the longest but there are many other kind of clones available I would say I don't think it's too unfair to say
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Andrej Karpathy.