James Bachini

Advanced ChatGPT Prompt Engineering

Advanced ChatGPT

By now you have probably experimented with ChatGPT and realised the huge potential this “calculator for words” has. In this article I share the results of my research on how to make the most of this powerful tool. Whether you’re using ChatGPT as a personal assistant or in a professional setting, you’ll find some valuable hacks to level up your AI experience.

  1. ChatGPT Tips & Tricks
  2. ChatGPT Use Cases
  3. ChatGPT Comebacks
  4. Advanced ChatGPT Prompts
  5. Building With OpenAI API
James On YouTube

ChatGPT Tips & Tricks

Maximum Response Length Work Around
If text gets cut off, try using the OpenAI Playground and adjusting the maximum length setting. This can help ensure that ChatGPT is able to provide complete and accurate responses to your queries.

Breakdown Queries
To create a more engaging and interactive conversation with ChatGPT, try breaking down your queries into sub-queries. For example, you might start by asking ChatGPT to list some recipes, then ask for a specific recipe by number, and finally ask for modifications to make the recipe more spicy. This creates a “conversational journey” that can be more engaging and enjoyable.

Set A Persona
To give your conversations with ChatGPT a more personalized touch, try setting a persona for the model to use. For example, you might say “You are a physics professor, explain in detail…” to give ChatGPT a more specific role and personality. This can make the conversations feel more realistic and engaging. There are examples of this in the Advanced ChatGPT Prompts section

In the second part of this series I’ll discuss advanced prompts and flags for Mid Journey

ChatGPT Use Cases & Prompts

Half the battle with ChatGPT is knowing what you can use it for. In a years time this will probably be obvious but new use cases are being discovered every day. Here is a big list of basic prompts that I brainstormed and found from various sources… including ChatGPT of course 🤦‍♂️

  • Brainstorm 10 ideas about how to
  • Edit and improve the grammar in this transcript
  • Explain the term
  • Write a code function in C for
  • Explain what this code is doing
  • Create a (marketing/exercise/content) plan
  • Create a template for
  • Write a list of possible chapters for a book on
  • List some recipes for these ingredients
  • Write an introductory outreach email for
  • Write an outline for a pitch
  • Write a book summary for Sapiens by Yuval Noah Harari
  • Create a list of topics about
  • Create a lesson plan for
  • Can you write 5 headlines for
  • Summarise this into a tweet
  • Write a reply to this email/dm
  • Translate this to French
  • Refactor this NodeJS script to Rust
  • Classify these cryptocurrencies 1. BTC, 2. ETH, 3. BNB, 4. UNI, 5. LINK (“layer 1”, “token”, “oracle”, “exchange coin”)
  • Write unit tests for this code
  • Can you suggest some metaphors/analogies/synonyms for
  • Can you convert this to American English
  • Write a witty rebuttal to this tweet
  • Can you convert this title into a compelling, intriguing hook
  • Respond to this email and decline politely
  • Create an opening scene for a video about

ChatGPT Comebacks

ChatGPT has a memory function, unlike a search engine where each query is isolated, future prompts take into account the entire conversation history.

This is quite powerful as you can discuss a certain topic and build ChatGPT’s knowledge throughout the conversation.

Often you wont get a perfect response first time so you can then throw comebacks at it to refine the output. Here are some examples:

  • 💡 Come up with more novel and uncommon results
  • 📊 Format this as a table
  • 🤖 Port this to Solidity
  • 💬 Make this more informal/formal
  • 💁‍♀️ Write this from the perspective of
  • 🧒 Explain this like I’m 5 years old
  • 😂 Add some sarcastic humour to this
  • 📝 Expand this out to a blog post
  • 💬 Summarise this into a tweet
  • 🗺️ Create a mind map for this
  • 📜 Put this into a list
  • 👀 Add relevant emojis as bullet points

Advanced ChatGPT Prompts

Now let’s get into formatting some more advanced prompts. You can copy and paste these in to use as they are or craft them to your particular use case by adding details such as information about who the content is for.

Headline: Advanced ChatGPT Hacks & Prompts For Pros

You are a professional copywriter, please come up with 20 headlines based on the original above using these strategies:

- Shorter than 100 characters
- Use strong actionable verbs
- Address and engage the reader
- Use numbers where possible
- Use words that elicit an emotional response
- Create a sense of urgency or intrigue

The above will output 20 headlines using general good practices for writing headlines. Choose one from the list, put it back in and ask it to make variations.

Topic: SAAS Product That Edits Video Using AI

You are a professional copywriter, create a one page sales letter about the topic above using these strategies:

- Use strong persuasive language
- Use short sentences and simple terms, make it easy to read
- Ask questions to transition between paragraphs
- Back up main points with figures, evidence and examples
- Speak directly to the reader, make it personal

The goal and call to action for this content is to: Sign up for the newsletter

In this example we are using standard copywriting practices to create a better sales letter that engages the reader. We have been clear and specific in the prompt.

ChatGPT is a machine, it’s not magical, the quality of the output is correlated to the clarity and detail of your input.


Building With OpenAI API

You can also sign up for an OpenAI API key and use their tools from within an API. Here is a simple example (coded by chatGPT) of how this could be done in NodeJS

const openai = require('openai');

openai.api_key = "YOUR_API_KEY";

async function runExample() {
  try {
    // Start a new conversation
    const response = await openai.chat.create({ engine: 'chatgpt', prompt: 'Hello, how are you today?' });

    // Get the first response
    const chatResponse = await openai.chat.list({ model: response.id });
    console.log(chatResponse[0].text);

    // Continue the conversation
    const finalResponse = await openai.chat.update({ model: chatResponse[0].model, prompt: chatResponse[0].text });
    console.log(finalResponse.text);
  } catch (error) {
    console.log(error);
  }
}
runExample();

This opens up a lot of possibilities to build on top of this incredible technology. 2023 will be a breakthrough year for AI and tools like this are changing the way we work. In my opinion it’s well worth taking some time to study them and come up with your own unique use cases & prompts.


Get The Blockchain Sector Newsletter, binge the YouTube channel and connect with me on Twitter

The Blockchain Sector newsletter goes out a few times a month when there is breaking news or interesting developments to discuss. All the content I produce is free, if you’d like to help please share this content on social media.

Thank you.

James Bachini

Disclaimer: Not a financial advisor, not financial advice. The content I create is to document my journey and for educational and entertainment purposes only. It is not under any circumstances investment advice. I am not an investment or trading professional and am learning myself while still making plenty of mistakes along the way. Any code published is experimental and not production ready to be used for financial transactions. Do your own research and do not play with funds you do not want to lose.