Schulhoff defines a prompt as a message to generative AI and prompt engineering as improving that message. He distinguishes conversational prompting, such as iterating with ChatGPT, from prompts optimized for repeated API calls. He says prompting remains relevant, though a prompt can also reduce accuracy.
Prompt Engineering and AI Red Teaming
Speaker
Sander Schulhoff, CEO of LearnPrompting and HackAPrompt, discusses prompt engineering and AI red teaming at an AI Engineer talk.
Drawing on the Prompt Report, a review by about 30 researchers covering roughly 200 techniques, Schulhoff describes role prompting, chain of thought, decomposition, ensembling, and few-shot examples. He says role prompts are unreliable for accuracy measures such as F1, while examples can help but their order, labels, format, and similarity to the task may affect results. In his entrapment classification work, automated prompt optimization with DSPy outperformed his manual effort.
Schulhoff describes AI red teaming as testing whether models can be induced to produce harmful outputs, and distinguishes jailbreaks from prompt injection involving developer instructions. He argues that prompt injection differs from conventional vulnerabilities such as SQL injection because combining user input with instructions makes reliable prevention difficult. He cites MathGPT, where generated Python code ran without containerization and exposed keys, as an incident that conventional security controls could have prevented.
Schulhoff argues that agents acting on the web or in the physical world could follow malicious instructions embedded in content, such as an ad redirecting a flight purchase. He says HackAPrompt gathered 600,000 prompts and that its competition data is used by AI companies to evaluate models. He presents the conference challenge as a way to test prompt hacking, with submissions judged during the event.
Takeaways
- For repeatable AI tasks, evaluate prompts on representative data with a clear metric such as accuracy or F1.
- Treat roles and prompt tricks as task-dependent; test them rather than assuming they improve results.
- Check few-shot examples for ordering, label quality, format, and fit to the task.
- Run generated code in a sandbox, and apply established security controls to tools and data.
- Red-team agents against malicious content in the environments where they will act.
Mentioned in this talk
Search inside this talk
What was claimed 12
- foundedSander Schulhoff founded
Learn Prompting
“I started out by writing a textbook ... I turned to something a little bit easier: prompting.”
YouTube Verified3 sources· Talk, Web· archived
- ceo ofSander Schulhoff CEO of
HackAPromptCEO“I'm currently the CEO of two companies, Learn Prompting and HackAPrompt.”
YouTube Unverified1 source· Talk
- ceo ofSander Schulhoff CEO of
Learn Prompting
CEO“I'm currently the CEO of two companies, Learn Prompting and HackAPrompt.”
YouTube Unverified1 source· Talk
- launched
HackAPrompt: First prompt injection competition“I ran the first competition on prompt injection.”
YouTube Unverified1 source· Talk
- feature
Learn Prompting: Open-source prompt engineering guide
“It was the first open-source guide on prompt engineering.”
YouTube Unverified1 source· Talk
- feature
HackAPrompt: Competition data used by AI companies to benchmark and improve models“To date, this dataset is used by every single AI company to benchmark and improve its AI models.”
YouTube Unverified1 source· Talk
- feature
HackAPrompt: Open-source dataset of 600,000 prompts“We open-sourced a dataset of 600,000 prompts.”
YouTube Unverified1 source· Talk
- built
“The Prompt Report, the most comprehensive systematic literature review of prompting and prompt engineering, which I wrote along with a pretty sizable research team.”
YouTube Unverified1 source· Talk














