• GPT Hacks
  • Posts
  • Non-Technical Guide to Prompt Engineering

Non-Technical Guide to Prompt Engineering

10 tips to get you started with prompt engineering

Hey — It’s Hussein 👋

First, you may have noticed that this week’s newsletter is going out on Thursday instead of Wednesday. This is going to be the schedule in the future.

I am leading several workstreams at Arta Finance, many of which are approaching big releases soon. I need the extra weeknights to prepare and find time to write an article. 😅 

On to today’s topic: Non-technical ChatGPT prompt engineering

I’m calling it non-technical because my focus is on using the ChatGPT App or Website not the playground or API. However, the same principles apply!

Before we begin… a big thank you to:

  • Great tool for B2B sales, packed with AI-powered features

  • Try Reply - an all-in-one AI sales tool

  • Build prospect lists, lookup emails, automate engagement

What is prompt engineering?

The most basic definition of prompt engineering (or prompt design) is the ability to tell an AI like ChatGPT what you want and get the results you expect. You do this by crafting prompts that give the AI the best chance of success.

You can take this further by not only getting expected results but also deciding on how you are getting responses, how long it takes to get a response, what is the cost of the interaction with the AI, how to fine-tune the model, expand on its knowledge, feed it more information and more.

All of that is considered prompt engineering.

Getting started with prompt engineering

To get you started with prompt engineering. Here’s a list of 10 tips to get started with prompt engineering.

We’ll start with simple techniques and get more advanced as we go.

1. Give specific requests

We’ve talked about this one before. Give the AI details and background on your requests and ask for specifics for the best results. For example:

  1. Give the AI context about your request. The more relevant details, the better.

  2. Ask for a specific style or tone (see my list of ChatGPT Styles and Tones for ideas).

  3. Ask for a specific length in response.

  4. Ask for a specific format or provide a template to follow. Do you prefer paragraphs? Bullet points? Lists?

Pro Tip: If you find yourself asking for the same style, tone, length, and format again and again, put those in your custom instructions.

2. Give the AI a role or persona

Start by asking ChatGPT to take on a role or persona and to confirm that the request is clear, then proceed with your request.

You are the Marketing Strategist of a VC-backed startup. I need your help with campaign ideas. Is that clear?

3. Clearly define sections of your prompt

Help the AI separate your questions from examples and materials you are giving to it by defining and using quotes or tags.

Write me an executive summary of the text in triple quotes.

“““insert text here”””

or

You will receive an article (delimited with XML tags) about a topic. Write me an executive summary based on that article.

<article> insert text here </article>

or

Write me a summary based on the article I provide.

Article: insert text here

4. When possible, break up the prompt into multiple prompts or define steps in the prompt

When you ask the AI to do too much in the same prompt, it will sometimes get confused and cause hallucinations. Instead, either break up the prompt into multiple prompts and work on them one at a time or give the AI steps to follow inside of your prompt.

I am going to provide you with an article.

Step 1 - summarize the article

Step 2 - translate the summary to Spanish

Article: insert text here

5. Give an example of what you are looking for

When you use the OpenAI Playground or API, you have the ability to give GPT example requests and responses. This is called “few-shot” prompting. The same can be achieved in ChatGPT directly. This allows you to demonstrate to the AI how to respond to a request.

Example Prompt: Teach me about the resilience of a founder

Example Response: The pioneering founder, undeterred by the winds of uncertainty, navigating the stormy seas of entrepreneurship with unwavering resolve; the diligent dreamer, transforming each failure into a stepping stone and each setback into a lesson; a testament to human resilience, reminding us that the tree that withstands the harshest storm grows the deepest roots.

Post: Teach me about website design

6. Control the scope of where an answer comes from

If you have a specific block of text (or document that you upload with Advanced Data Analysis) that you want to ask ChatGPT questions about. You can control the scope of where ChatGPT can find the answer by specifying it and asking it not to give a response from somewhere else.

Use the provided article delimited by triple quotes to answer questions. If the answer cannot be found in the article, write “I could not find an answer.”

“””insert article”””

Pro Tip: if you are using Advanced Data Analysis, then instead of referring to an article in triple quotes, ask ChatGPT to refer to the document you uploaded.

PS: this is the entry into a concept called Embeddings, which is a way to provide GPT with large sets of data to focus on. If you have questions on this, reply. Happy to chat.

7. Ask for citations when accuracy is critical

Take step 6 further by also asking ChatGPT to cite where in the article or document it found the relevant information. This comes in handy when dealing with legal documents and contracts.

You will receive a document delimited by triple quotes and a question. Your task is to answer the question using only the provided document and to cite the passage(s) of the document used to answer the question.

If the document does not contain the information needed to answer this question then simply write: "Insufficient information." If an answer to the question is provided, it must be annotated with a citation.

Use the following format to cite relevant passages ({"citation": …}).

""""""

Question:

8. Chain your prompts

If you are having a long conversation with GPT that’s been going on for a while, you are going to hit “memory” limits, and you’ll notice that GPT will start forgetting parts of your conversation.

Every few prompts, add a summary of what is relevant to you from the conversation to make sure it keeps going.

See my article on prompt chaining for more on this.

9. Give ChatGPT time to think

Sometimes, you can get much better results for a problem if you ask ChatGPT to work through the problem step by step instead of giving you an answer right away.

Before giving me an answer, first work through your own solution to the problem step by step and then make a conclusion.

Problem: insert text here

10. Ask ChatGPT if it missed aything

Sometimes GPT will give an answer, and if you give it a moment to review its answer, it can provide even more details.

After you receive a response, use this prompt:

Was there anything else to include? Take care not to repeat yourself.

Take prompt engineering further

These tips are an introduction to prompt engineering and are meant to be used in the ChatGPT mobile app or website. You can take prompt engineering much further by using the OpenAI Playground or the GPT API.

With the API you can also take advantage of workflow chaining, fine-tuning, embeddings, vector database, integrations and much more.

I’m curious if anyone has tried the “talk and listen” features of ChatGPT yet. I’ve tried it a couple of times but don’t have an actual use case for it just yet. If you have one, let me know.

There is a rumor that OpenAI is working with Jony Ive (former Apple Chief Design Officer) on a new phone powered by GPT. Who knows, maybe with that around, the voice capabilities will come in handy. I am sure it will be better than Siri.

See you next week — Hussein ✌️

P.S. If you’d like to sponsor, reply. 5.5k founders and entrepreneurs are waiting for you. 

P.P.S If you live in or visit San Diego, sign up here to be notified of tech and founder mixers I organize in the area. Would love to meet you there.

Enjoy the newsletter? Please forward this to a friend. It only takes 10 seconds. Writing this one took over 10,000 seconds. (Want rewards? 🎁 Use your custom link).

How did you like today's newsletter?

Login or Subscribe to participate in polls.

Join the conversation

or to participate.