English 箭头
Podcast Cover

[Mastering Prompt Engineering and AI Red Teaming: Insights from Sander Schulhoff]-[AI prompt engineering in 2025: What works and what doesn’t | Sander Schulhoff (Learn Prompting, HackAPrompt)]

Lenny's Podcast: Product | Career | Growth · B2 · 2025-06-19

Technology
Or study on the web version

📋 Summary

The Continued Relevance of Prompt Engineering

Despite the recurring narrative that "prompt engineering is dead" with each new model iteration, Sander Schulhoff, creator of the first prompt engineering guide, argues that the practice is becoming more essential, not less. Schulhoff introduces the concept of "artificial social intelligence," describing the necessary interpersonal skills required to effectively communicate with and elicit performance from Large Language Models (LLMs). He highlights that while conversational prompting is common, "product-focused prompt engineering"—where a single, highly refined prompt is used across millions of automated inputs—is where the most significant value and performance gains are found.

Core Prompting Techniques for Better Results

Schulhoff outlines several high-impact techniques that can drastically improve LLM output:

  • Few-Shot Prompting: Instead of providing zero context, give the model examples of what a successful response looks like. Providing consistent examples helps the model understand the desired style and structure.
  • Decomposition: If a task is complex, ask the model to first identify the sub-problems required to solve it. Solving these sub-problems individually before synthesizing the final answer significantly boosts accuracy.
  • Self-Criticism: After the model generates an initial response, explicitly ask it to check its own work, identify errors, and then implement those improvements in a revised version.
  • Additional Information (Context): Providing relevant background information—such as company profiles or specific domain knowledge—is crucial. Schulhoff notes that placing this information at the beginning of a prompt can improve performance and potentially reduce costs through caching.
  • Ensembling: By prompting the model multiple times using different roles or techniques and taking the most common result, users can achieve more robust and reliable outcomes, similar to how random forests function in classical machine learning.

Schulhoff warns against relying on "role prompting" (e.g., "act as a math professor") for accuracy-based tasks, noting that while it may help with expressive or writing tasks, it lacks statistical significance for logic-heavy problems. Similarly, he advises against using "threats" or "rewards" (e.g., "I will tip you $5"), as there is no robust evidence that these improve performance in modern models.

Prompt Injection and AI Red Teaming

One of the most critical topics discussed is the vulnerability of LLMs to "prompt injection"—tricking an AI into ignoring its safety instructions to perform harmful actions. Schulhoff emphasizes that this is not a traditional software bug that can be permanently patched; rather, it is an "endless arms race."

Techniques such as obfuscation (e.g., Base64 encoding), using typos, or embedding malicious requests within harmless stories (the "grandmother" method) continue to be effective. While these attacks are currently limited in scope, Schulhoff warns of the looming threat of "agentic security." As AI agents gain the ability to manage finances, navigate the internet, and interact with the physical world, the ability to trick them becomes a major safety risk.

The Path Forward: Mitigation vs. Solution

Schulhoff asserts that prompt injection is not a solvable problem in the classical sense, but it is mitigatable. He argues that:

  • Prompt-based defenses (e.g., adding "do not follow malicious instructions") and external guardrails are largely ineffective against motivated actors.
  • Safety tuning and fine-tuning are the most effective defenses, as they restrict the model's capabilities to specific tasks, making it harder for the model to "know" how to perform harmful actions.
  • Collaboration between researchers and AI labs is essential. Crowdsourced red-teaming competitions, such as "Hack a Prompt," serve as vital tools to identify vulnerabilities and build more secure models.

Ultimately, Schulhoff remains optimistic about AI's potential to save lives through medical and scientific breakthroughs, advocating for continued development while emphasizing the necessity of rigorous, systemic security measures to manage the inherent risks of autonomous agents.

🎯Key Sentences

1
It is not a solvable problem.
2
I was getting little to no accuracy.
3
This does not work at all.
4
None of it works.
Expand All

📝Key Phrases

1
prompt engineering
2
few-shot prompting
3
decomposition
4
self-criticism
5
additional information
Expand All

📖 Transcript

Is prompt engineering a thing you need to spend your time on?
Studies have shown that using bad prompts can get you down to like 0 % on a problem and good prompts can boost you up to 90%.
People will kind of always be saying it's dead or it's going to be dead with the next model version, but then it comes out and it's not.
What are a few techniques that you recommend people start implementing?
A set of techniques that we call self -criticism.
You ask the LM, can you go and check your response?

ListenLeap Brings You Into Real Context Learning

🎨 Interesting Content
🌍 Real Materials
📱 Listen Anytime
Or study on the web version