Skip to content
4 min

Unlocking Large Language Models Through Thoughtful Prompt Engineering

by Brendan O'Neill December 6, 2023

The incredible growth and evolution of Large Language Models (LLMs) like ChatGPT can be attributed to their usefulness and our speed of adoption in both personal and professional environments.

Average users are leveraging LLMs daily for things like collecting information, summarizing long text, and creating their own content. When it comes to business, organizations are increasingly utilizing LLMs in fascinating ways that were seemingly unimaginable just one year ago.

When it comes to providing effective prompts for LLMs to respond to, there’s a burgeoning discipline that is devoted to designing inputs and input patterns for LLMs to produce optimal outputs. It’s called prompt engineering, and if you can incorporate some of its core techniques, you can become a much more powerful LLM user.

Prompt Patterns

Here’s how it works. Beyond simply using a thesaurus and writing very clear, descriptive prompts, prompt engineering codifies skills and techniques that can be combined to develop foundational prompt patterns. These patterns are used to help unlock the power of LLMs and direct them to provide very specific and often complex outputs.

Before we get to the business uses, let’s take a high-level look at a small set of the growing catalog of prompt patterns that can be fun and helpful in your everyday life.

  • Recipe Pattern: If you know partial steps or pieces of a solution to a problem but lack the full answer, the LLM can help fill in the blanks. You’re essentially using the LLM to “complete the recipe.” This may be used to develop a sequence of steps to create a route for a long road trip, complete with how many miles to drive each day and where/when to stop in order to arrive at your destination on time.
  • Template Pattern: Sometimes it can be challenging to get LLMs to provide output in your preferred format. With this pattern, you give the LLM a template (that can even include complex instructions), and the LLM will complete the template with its answer. For example, the LLM can create a workout for you utilizing your preferred format and incorporating the particular guidelines and preferences you provided.
  • Meta Language Creation Pattern: Sometimes, in the real world, we develop our own specialized languages to capture information more concisely than if we wrote it out in full sentences. Using this pattern, we can create a new language (“when I say X, I would like you to do Y”), and teach it to the LLM. Instruct the LLM with this new shorthand and engage in more efficient and concise conversations.

Each pattern can be adjusted, customized, and combined with other patterns to activate additional functionality and outputs. LLMs have essentially been trained to predict what the user wants, and in doing so, they’ve learned certain patterns. If we format our prompt in a way that taps into those patterns, we’re more likely to get the behavior and output we seek to solve that particular problem.

Now getting into the business applications, for the remainder of this post we will examine three of my favorite prompt patterns: The Persona Pattern, The Audience Persona Pattern, and The Alternative Approaches Pattern.

Persona Pattern

The Persona Pattern involves prompting the LLM to act as a specific personality, character, or even job function. When directed by you, an LLM can answer questions and provide informed recommendations as if it were someone else. For instance, if you need help in assessing how well a job applicant fits the needs of an open position, you might consult a human resources manager. The LLM can play that role for you.

Tell the LLM the intended persona and the task you want it to perform: “Act as a human resources manager. I am going to tell you about a job applicant’s career experience and you will evaluate whether they are a fit for the available position.”

After you’ve explained the job description and responsibilities, the LLM’s output will include an evaluation of how well the candidate matches the role’s requirements and will identify areas of strength and weakness.

Audience Persona Pattern

The Audience Persona Pattern allows the LLM to generate output designed for a specific group or even a large segment of the population. Rather than specifying a particular perspective with the instruction “act as this persona,” alternatively, you can identify the intended recipient or audience for the LLM’s output.

You don’t have to tell it what the output should look like or what the tone and complexity should be. The LLM can handle all of those details if you explain who the audience is.

For example, you can say, “Explain digital marketing to me. Assume that I have no background in brand strategy or content marketing.” Or, for an even simpler output, you can add statements like, “Assume that I am a third grader who is easily distracted.”

Brands and marketers can also tailor prompts to target specific demographics, psychographics, or other audiences to receive valuable segmented outputs.

Alternative Approaches Pattern

The Alternative Approaches Pattern involves prompting the LLM to generate various approaches to solve a problem or compile diverse perspectives on a given topic. This can be invaluable for brainstorming and refining strategies and tactics.

This prompting pattern directs the LLM to produce alternative ideas to the task you give it, essentially serving as a brainstorming whiteboard. Like any brainstorm, many ideas can be generated—some will be great, others not so great—but working through the numerous ideas can help you think through the problem and arrive at the right solution. Iterating and refining are among the primary strengths of LLMs.

To do this, you’ll explain to the LLM what you’re trying to accomplish, ask it to evaluate your prompt, and provide better alternatives:

“Whenever I ask you to create a social media post for Brand X, if there are alternative ways to word the post that I give you, list the best alternate wordings. Compare/contrast the pros and cons of each wording.”

Whether for personal or professional use, LLMs are great tools whose breadth of utility is still being discovered. What’s important to remember is that prompts aren’t simply one-off requests you feed into the LLM. Don’t think of them as individual questions, but rather, think of prompts as conversations where each one can build upon the other—where both the user and the LLM go through an iterative refinement process together.

As prompt engineers continue to develop more ways to maximize the computing power of LLMs, our collective experimentation will elevate future inputs and outputs. The key to unlocking that power is practicing and experimenting with LLMs like ChatGPT. Ask yourself the question, “Can it do this?” You may never know the answer until you try.

Photo Credit: Michael Dziedzic | Unsplash

Brendan O'Neill
Content Strategy Lead

Brendan O’Neill is a Content Strategy Lead at One North. He helps clients evaluate and reimagine content structure, development, tactics, and strategy incorporating both industry best practices and innovative methodology. Brendan has an extensive background in journalism, editing, and managing content for everything from local newspapers and trade publications to national consumer magazines and Fortune 500 brands.