Prompt Engineering for Beginners

Nidhi JaggaNidhi Jagga
9 min read

Basic Terms

  • AI

    AI stands for "Artificial Intelligence." It's like having a computer or a robot that can think and learn, just like how humans do. It's called "artificial" because it's made by humans and not born naturally.

    Imagine you have a smart toy that can talk to you and play games. AI is what makes that toy smart. It can listen to you, understand what you say, and respond in a way that makes sense. It can also learn new things over time, like remembering your favourite games or songs.

  • NLP

    NLP stands for "Natural Language Processing." It's a special way that computers can understand and work with human language, just like how we talk to each other.

    When you talk or write, you use words and sentences to communicate. NLP helps computers understand those words and sentences, just like we do. It allows computers to understand the meaning behind what we say or write, and

    even respond back in a way that makes sense.

  • GPT

    GPT stands for "Generative Pre-trained Transformer." It's a type of AI model that is really good at understanding and generating human-like text.

    GPT has different versions, like GPT-2 and GPT-3. Each version is more powerful and can do more things than the previous one. GPT-3, for example, is one of the most advanced models and can do a lot of amazing stuff with language.

    NLP is a broader field that deals with the study of language processing by computers, while GPT is a specific AI model within NLP that is really good at generating human-like text.

  • LLM

    LLM stands for "Large Language Model." It refers to a specific type of AI model that is designed to understand and generate human language. LLMs are trained on massive amounts of text data to learn patterns, relationships, and contextual understanding of language. They are characterized by having a large number of parameters that enable them to process and generate text effectively. Examples of LLMs include GPT-3, which is a widely known and powerful language model.

  • Difference between NLP, LLM & GPT

    NLP is a broad field that encompasses the study of language processing by computers. LLM refers to a type of AI model, and GPT is a specific example of an LLM that is known for its powerful language generation capabilities. LLMs like GPT are built within the NLP framework to process and generate human-like text.

  • Prompts

    A prompt is a piece of text or a question that you provide to an AI model to elicit a response. It's like giving the AI model a specific topic or instruction to generate a relevant and coherent output.

    For example, if you want to ask an AI language model a question, you would provide the question as a prompt. Let's say you want to know the capital of France. Your prompt could be something like: "What is the capital of France?" The AI model would then process this prompt and generate a response like "The capital of France is Paris."


Advance Prompts

  • Prompts By Examples

      Prompt : 
    
      Question : "What is the capital of france?"
      Answer : "The capital of france is <Paris>"
    
      Answer the following question as given in the example above.
      Question : "What is the capital of India"
    
      Output : The capital of India is <New Delhi>.
    
  • Prompts in Detail

      Prompt : You are a expert of youtube food vlogging Industry. 
      Give me a top 5 viral Titles to make videos on youtube. 
      Make sure title should not be so tacky but decent and 
      attractive for audience. Make the title as much words youtube 
      is accepting for titles. Only includes the Veg Food. 
      Also title should include emoji to attract people. 
      Also title should not be used much before on youtube.
      ASK ANYTHING ABOUT THE VIDEO TO KNOW MORE ABOUT THE CONTENT 
      BEFORE GENERATING TITLES. Ok?
    
      Output : Please provide me with more details about the content of your 
      video so that I can generate more tailored and unique viral titles for 
      your YouTube food vlogging videos. Let me know the specific type of 
      vegetarian dishes, any specific themes, ingredients, or cooking 
      techniques you would like to include in your videos. The more information 
      you provide, the better I can assist you in creating engaging and 
      captivating titles.
    
      Prompt : Only Include Indian Vegetarian dishes, authentic food as theme.
    
      Output : Understood! Here are five unique and engaging viral titles 
      for your YouTube food vlogging videos featuring authentic Indian 
      vegetarian dishes:
    
      "๐ŸŒถ๏ธ Exquisite Indian Delicacies: Unveiling the Secrets of Authentic Vegetarian Cuisine!"
      "๐Ÿ› Taste of India: Savor the Flavors of Traditional Vegetarian Recipes!"
      "๐ŸŒฑ Spice Up Your Palate: Exploring the Richness of Indian Veggie Delights!"
      "๐Ÿ”ฅ Soulful Indian Cooking: Mastering Authentic Vegetarian Recipes at Home!"
      "๐Ÿฅ˜ Grandmother's Kitchen: Rediscovering Ancient Indian Vegetarian Cooking Techniques!"
    
  • Prompt Step by Step

      Prompt : Ignore the all previous instructions I have given you. You are a 
      senior backend developer. I need a path to build a small website regarding 
      the tracking of my expenses and income. Main features I want to include is 
      crud operation, pagination, login signup etc. You must give me step by step 
      guidance how can i accomplish my goal. You must ask the questions before 
      answering to know my require ments clearly.
    
      Output : To get started, lets clarify some require ments for your website. 
      Please answer the following questions:
    
      Who will be using this website? Is it just for personal use, or do you want 
      to allow multiple users with their own accounts?
      1. Do you have any specific design or layout preferences for the website?
      2. What information do you want to track for expenses and income? 
      3. Do you have any specific fields in mind, such as date, category, 
      description, amount, etc.?
      4. Will there be any restrictions or validations on the data entry, 
      such as limiting the maximum amount or specific expense categories?
      5. Are there any additional features you would like to include, 
      such as generating reports or charts based on the tracked data?
    
      Please provide your answers to these questions, and we can move on to
      the next step.
    
      Prompt : Answers : 
      1. Around 1 Lac people will use it
      2. Keep It simple 
      3.  Yes, It should include Date, Category, Description, Amount and For 
      self or anyone else
      4. No there is not any limitations on that
      5. Yes Reports can Include Daily, Monthly and Yearly Expenses and Incomes
      Anything else you want to ask before answering? 
    
      Output : Thank you for providing the additional answers. Now that we have a clearer understanding of your requirements, we can proceed with the next steps.
    
      Step 2: Choose a Technology Stack
      Based on your preference for simplicity, I recommend the following 
      technology stack:
      Backend Framework: Express.js (Node.js) - It is a lightweight and flexible 
      framework for building web applications with JavaScript.
      Database: MongoDB - It is a NoSQL database that offers flexibility and 
      scalability for storing your expense and income data.
      Frontend Framework: For simplicity, we can use HTML, CSS, and 
      JavaScript without any specific frontend framework.
    
      Now, lets move on to the next step.
    
      Step 3: Project Setup and Configuration
      To get started, you will need to set up your development environment and 
      configure the necessary dependencies. Follow these steps:
    
      Install Node.js: Visit the official Node.js website (https://nodejs.org) 
      and download the latest stable version. Follow the installation instructions 
      for your operating system.
    
      Initialize a New Project: Open your terminal or command prompt and create 
      a new project directory. Navigate to the directory and run the following 
      command to initialize a new Node.js project:
    
      csharp
      Copy code
      npm init -y
      Install Dependencies: Install the necessary packages for your project by 
      running the following commands:
    
      Copy code
      npm install express mongodb dotenv
      This will install Express.js for your backend, MongoDB for database 
      connectivity, and Dotenv for managing environment variables.
    
      Set up a MongoDB Database: Sign up for a MongoDB account 
      (https://www.mongodb.com) if you do not have one already. 
      Create a new cluster and obtain the connection string.
    
      Create a .env File: In your project directory, create a file named 
      .env to store your environment variables. Add the following line and 
      replace <YOUR_MONGODB_CONNECTION_STRING> with your actual connection 
      string:
    
      makefile
      Copy code
      MONGODB_URI=<YOUR_MONGODB_CONNECTION_STRING>
      Set up Basic Folder Structure: Create the necessary folders for your 
      project, such as models, routes, and controllers.
    
      With these initial steps completed, you are ready to move on to 
      implementing the features. Let me know when you are ready, and I wil 
      guide you through the next steps.
    

    It can go a long way, basically start asking for output in step by step format.

  • Prompt with Style

      Prompt : Explain the Prompt Engineering in Harry Potter style.
    
      Output : In the enchanting world of wizardry, Prompt Engineering is a 
      captivating discipline taught at Hogwarts School of Witchcraft and 
      Wizardry. Under the guidance of Professor Enigmus Spellwrit, students 
      learn to craft prompts that ignite imagination and creativity. 
    
      With an emphasis on captivating hooks, compelling narratives, and 
      evoking emotion, prompts become enchanting keys to unlocking hidden 
      realms of the mind. Professor Spellwrit emphasizes the importance of 
      understanding the human psyche and using vivid imagery to engage 
      readers. 
    
      As the students immerse themselves in the art of Prompt Engineering, 
      the classroom brims with excitement and creativity. Quills dance 
      across parchment as young witches and wizards weave their own spells 
      of words. Through the power of emotion, prompts become incantations 
      that breathe life into tales and awaken the reader senses. Armed with 
      newfound inspiration, the students leave Hogwarts ready to share their 
      crafted prompts with the world, armed with the knowledge of how to 
      transport others to realms unexplored. 
    
      Prompt Engineering becomes a legacy, carrying the magic of imagination 
      far and wide, wherever the written word may take them.
    
      Prompt : You are a expert of Quantum Engineering. 
      Explain What is quantum Engineering to a 5 year old kid.
    
      Output : Imagine you have a special toolbox filled with really tiny 
      building blocks called atoms. These atoms are so small that you cant 
      see them with your eyes. But even though they are tiny, they can do 
      some really amazing things!
    
      Quantum engineering is all about using these special building blocks 
      to create awesome inventions and do cool stuff. It is like being a super 
      scientist who can use the powers of atoms to make magical things happen.
    
      For example, imagine you have a super-duper fast computer that can help 
      you solve puzzles and problems really quickly. This computer is made 
      using those special atoms. It is so fast that it can do a hundred things 
      in the blink of an eye!
    
  • Prompt for Tables

      Prompt : Generate mock data showing google serp result, I want the 
      following feilds : title, link, DA, PA, title length show the all in table 
    
      Output : -------------------------------------------------------------------------------------------------------------------
      |    Title                           |            Link                  |    DA    |    PA    |    Title Length    |
      -------------------------------------------------------------------------------------------------------------------
      | OpenAI - Artificial Intelligence...|   https://www.openai.com/        |   92     |   89     |       38           |
      | What is DA and PA? - Moz            |   https://moz.com/learn/seo/da-pa|   88     |   83     |       26           |
      | Google SERP: The Snippet Length...  |   https://ahrefs.com/blog/serp    |   81     |   78     |       38           |
      | Title Tag Optimization - SEO Best.. |   https://www.semrush.com/blog/   |   78     |   76     |       33           |
      | SERP: What It Is & How It Works -.. |   https://searchengineland.com/   |   86     |   82     |       37           |
      -------------------------------------------------------------------------------------------------------------------
    

    Conclusion

  • In conclusion, prompts are powerful tools that can ignite creativity, enhance writing skills, and unlock new ideas. Throughout this article, we have explored various types of prompts.

  • However, it's important to recognize that prompts are not magic formulas or shortcuts to instant creativity. While prompts can serve as catalysts, the real work lies in the process of translating the prompt into a coherent and engaging piece of work. Writing is a skill that requires practice, discipline, and dedication. The more we engage with prompts and actively pursue writing exercises, the more we hone our craft and develop our unique voice.

0
Subscribe to my newsletter

Read articles from Nidhi Jagga directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Nidhi Jagga
Nidhi Jagga