Lewis Kallowfirst captured our attention with his piece"The Ultramarathon Mindset,"and now he's back with insights into prompt engineering. After lending his expertise to help Every build Spirals—the AI content generation workflows in our content-repurposing application (and creating the “contrarian” tweet generator that’s now the platform’s most popular)—Lewis is sharing some of the techniques he’s found useful for fine-tuning AI prompts. If you’re curious about how to craft better Spirals or enhance your prompts in other projects, this one is for you.—Danny AzizWas this newsletter forwarded to you?Sign upto get it in your inbox.In March 1976, Libyan dictatorMuammar Gaddafiwas about to declare war.When his inspectors were sent to investigate reports of advanced military technology on the border with neighboring Tunisia, their worst fears were confirmed: They were greeted by a gigantic, futuristic, tank-like machine that appeared to be under construction. But despite the vehicle’s ominous appearance, the inspectors quickly found that open conflict was not imminent. The vehicle wasn’t a tank at all—it was a “sandcrawler,” a prop in the firstStar Warsmovie.But almost sparking a regional war was the least of theStar Warscrew’s worries. During the first few weeks of shooting the film, they had to endure freak rainstorms, sandstorms, malfunctioning robots, and widespread sickness among the cast and crew.George Lucaswas“desperately unhappy”with the shoot, and yet, he did somehow get the footage he needed out of his two weeks in Tunisia.One reason that helps to explain why Lucas’s scrappy team was able to snatch victory from the jaws of defeat is because they were in total alignment. Prior to the shoot, Lucas sat them down and had them watch four films that embodied his desired vibe forStar Wars:2001,Silent Running,Once Upon a Time In the West, andSatyricon.Armed with these examples, Lucas's crew had a clear vision of what was required and were able to deliver blockbuster results even as chaos broke out on set. Lucas understood that showing people examples of what you want is one of the most efficient ways to drive alignment and produce awesome results.Lucas isn’t alone, and I’vewritten elsewhereabout how the world’s greatest creatives are obsessed with using examples to communicate. And while I wouldn’t go quite as far as describing myself as the modern-day George Lucas, I did manage to use his technique to write this tweet for Every CEODan Shipperthat got 200,000 impressions:Source:X/Dan Shipper.Well, technicallyIdidn’t write it.I just shared examples of viral tweets with an AI that then wrote the tweet for me.This technique is called a “few-shot prompt” (about which Everypublisheda piece by prompt engineerMichael Taylorlast year). In a nutshell, few-shot prompting is when you work with your AI of choice like Lucas worked with his crew: You share examples of the output you want to achieve rather than trying to describe it.As someone who writes for a living, having a library of few-shot prompts has saved me hours of time every week. Take the above tweet as an example. It would have taken me at least 10 times longer if I had tried explaining to ChatGPT what I wanted and even longer if I tried writing it myself from scratch.Each piece of content you or your team regularly produces now represents hours of time you could reclaim by using a production-grade few-shot prompt.Working with high-quality, few-shot prompts allows me to create and repurpose content six times faster, saving around eight hours every week. Here’s how I do it.Overcoming few-shot frictionThere is one problem I’ve noticed with example-based prompting:Most creators and businesses aren’t using it.I think this is because you have to overcome three major inconveniences before you start to take advantage of few-shot prompting on a consistent basis:Upfront effort: A few-shot prompt is only as good as the examples you provide. Cultivating a set of high-quality examples can take a lot of initial time and effort.Organizational disarray: Once you have your few-shot prompts, you have to save them somewhere, remember where you saved them, remember to use them, and then copy and paste them into an LLM each time you want to use one.Skill issue: Examples are effective but insufficient. If you want “production-ready” content like the tweet I shared above, you need to combine your examples with a little bit of prompt engineering (more on that in a second).I’ve struggled with all three of these obstacles myself, and I’ve picked up a few tricks for overcoming them.The first is a shortcut. The prompt I used to write Dan’s tweet above was created with the help of (plug alert!) Every’s prompt-building applicationSpiral, which goes a long way in solving the first two few-shot prompting hurdles of effort and inconvenience.Here’s a quick breakdown of how it works, using the tweet I made for Dan as an example.After I’d found a number of examples of viral tweets that I wanted AI to replicate (my equivalent of Lucas’s four reference movies), I saved them inside of a “Spiral,” a kind of customized template for the content you want to create:Spiral screenshots courtesy of the author.The Spiral analyzed the style of my tweets and wrote a style guide for me.After just a little bit of copying and pasting, I have a prompt that includes my examples along with a style guide that’s saved in the cloud. All I have to do when I want to compose a pithy tweet is drop an article into my Spiral and hit “Run.”This takes care of the problem of organizational inconvenience. I no longer need to figure out where to save all of my prompts or copy and paste them into ChatGPT every time I want to use them. Whenever you create a Spiral, it will ask you to label the input you’ll be adding along with the output you want it to create. sp your library will automatically stay organized.The final result is a prompt with roughly the following anatomy:Become apaid subscriber to Everyto unlock this piece and learn about:The anatomy of a successful Spiral promptFour ways to great outputs from LLMsThe value of persistent experimentation to yield production-ready resultsUpgrade to paidClick hereto read the full postWant the full text of all articles in RSS?Become a subscriber, orlearn more.