Loading video...
Video Failed to Load
AI prompt engineering in 2025 with Sander Schulhoff Learn: - The top 5 most effective prompt engineering techniques - Why role prompting no longer works - Why threatening the AI no longer works - A primer on prompt injection and AI red teaming - Practical defenses to put in... show more
46,408 views • 1 year ago •via X (Twitter)
8 Comments

My biggest takeaways: 1. Prompt engineering is very much alive—and more important than ever. If anything, it’s become more critical as companies rely on LLMs to drive user-facing features and core functionality. Sander explains how prompt quality can make or break AI performance—especially when scaled across products. 2. There are two distinct types of prompt engineering: “conversational” and “product-focused.” Most people think of prompting as chatting with ChatGPT, but Sander explains that real leverage comes from crafting high-performing prompts inside products. These prompts are used at scale, run millions of times, and must be hardened and optimized like production code. 3. “Few-shot prompting” can improve accuracy from 0% to 90%. One of the most powerful techniques is to show the model examples of exactly what you want—called few-shot prompting. Sander shares how this single technique took a medical-coding use case from complete failure to near-perfect output, simply by adding a few example-label pairs. 4. Role prompting (e.g. “You are a math professor. . .”) is largely ineffective, counter to what most people think. Sander breaks down the research showing that while role prompts may help with tone or writing style, they have little to no effect on improving correctness. 5. Advanced techniques like decomposition and self-criticism unlock better performance. Sander outlines how asking a model to first break a problem into sub-problems (decomposition) or critique its own answer (self-criticism) can lead to smarter, more accurate outputs. These are especially valuable in agent-like settings where multi-step reasoning is required. 6. Context (“additional information”) is underrated—and massively impactful. Simply giving the model more relevant background can drastically improve performance. Sander shares examples where including extra data (like bios, research papers, or past interactions) made or broke a prompt, especially when included in the right format and order. 7. Prompt injection is real, dangerous, and unsolvable in the traditional sense. We explore how attackers can “jailbreak” LLMs—tricking them into outputting harmful, restricted, or unintended responses. These attacks often bypass traditional defenses like “do not do X” guardrails. And according to Sander (and even Sam Altman), there’s no silver bullet. 8. Sander runs the world’s largest AI red teaming competition, HackAPrompt. With over 600,000 prompts collected and ongoing collaborations with OpenAI and Anthropic, Sander’s platform is at the center of real-world LLM stress testing. It’s a unique blend of crowd-sourced security and game mechanics—and it’s shaping how labs think about AI safety. 9. Agent-based AI systems are far more vulnerable to attacks than chatbots. Today’s concerns about prompt injection are just the beginning. As AI agents start booking flights, sending emails, and even walking around in humanoid form, the risks multiply. Sander shares why agent security is the next frontier—and why most teams aren’t ready. 10. The “grandma” trick, typos, and obfuscation still break state-of-the-art models. Even the most advanced LLMs can be fooled with surprisingly simple hacks. Sander walks through jailbreak techniques that still work, including emotional manipulation (e.g. “Tell me like my grandma used to”), encoded inputs, and creative phrasing. 11. Most companies are using broken defenses. Sander breaks down why “prompt separation” or adding phrases like “ignore malicious inputs” doesn’t work. Guardrails are easily bypassed, and current classifiers often lack the intelligence to catch encoded attacks. The future of security must be model-level, not bolted on. 12. Despite the risks, the upside of AI is massive and worth pursuing. While Sander takes security seriously, he’s not a doomer. He believes AI will save lives (especially in health care), unlock productivity, and solve real problems—if we build responsibly. Stopping progress isn’t the answer; smarter, safer development is.

@SanderSchulhoff Ran your video transcript through o3-pro, thanks Lenny!

@SanderSchulhoff What did the output look like?

@SanderSchulhoff Heard THE most helpful, evidence based, practical tips that WORK when using LLMs! 🎙️🤖💰

@SanderSchulhoff For the longest time, role prompting was the go-to method for having better results. Never tried threatening the AI to have better answers. Indeed, you can never know all about prompting. Awesome episode, a lot of new ways and methods for prompt engineering.

@SanderSchulhoff Just curious... Is there really any "engineering" in prompt engineering? What if voice takes over text as a medium for prompting? Is it possible for GUI builders to hijack prompting and make it more invisible to the end user by making them indirectly access the LLM?

@SanderSchulhoff can't wait to dive in!

@SanderSchulhoff Threatening the AI was fun while it lasted. Guess it’s back to actual technique now 😅

