I’ve Stopped Writing Prompts—DSPy Does It Better

Source: original

This piece is more technical than we usually publish—because you’ll be learning alongside our builders via a video tutorial linked below. DSPy is a prompt optimization framework for improving prompt quality and reliability that Every columnistMichael Taylor taught toSpiral general managerDanny Aziz ,Cora general managerKieran Klaassen , and Cora engineerNityesh Agarwal . Watch the walkthrough and follow their steps to improve your own prompts.Kate Lee

Working with LLMs is weird—you don’t always know what prompt will get the result you’re looking for.

Having worked with AI since OpenAI released the GPT-3 beta in 2020, I’ve used language models for everything from automating bank fraud detection to generating and testing thousands of variations of advertisements. For the past year-plus, I’ve written a monthly column for Every on the differences between what works for AIs and humans. I even wrote a book about prompt engineering , the delicate art of tweaking strings of words to get a model to do exactly what I want.

Lately, though, I’ve stopped writing prompts myself. Instead, I use DSPy, an automated prompt-optimization tool that is still relatively obscure, but powerful enough that it could soon do away with prompt engineers like myself. (Shopify CEO Tobi Lutke recently called DSPy “severely underhyped.”)

When DSPy started to gain traction, people breathlessly exclaimed that "prompt engineering is dead." Rather than take it personally, I learned how to use it, and started sending my clients better prompts optimized by DSPy. I can still beat DSPy if I try hard enough, but for anyone with the time and my five years of prompt engineering experience, you’re better off relying on DSPy. Become a __to unlock this piece and learn:

  1. What DSPy is and how it makes your prompts better
  2. The three reasons why Michael is bullish on it
  3. A step-by-step tutorial on how to use it alongside the Every team