top of page

What is Prompt Engineering?

  • Ravi
  • Oct 3, 2024
  • 2 min read

What is a prompt?


A prompt is any input you provide to a generative model to produce a desired output. Prompts can also be a series of instructions that refine the output step by step to achieve the desired result. Prompts contain questions, contextual text, guiding patterns or examples, and partial input for the model. Prompt must have context to proper structure and can be comprehensible


Building Blocks of a well-constructed prompt

  • Instructions, give the model distinct guidelines regarding the task you wish to execute

  • Context helps establish the circumstances that form the setting of the instruction and provides a framework for generating relevant content.

  • Input data is any piece of information provided by you as part of the prompt. This can be used as a reference for the generative model to attain responses with a specific set of details or ideas.

  • Output indicator, offers benchmarks for assessing the attributes of the output generated by the model. It can outline the tone, style, length, and other qualities you desire from the output.


What is prompt Engineering?


Prompt Engineering is the Process of designing effective prompts. 

  • Importance of Prompt Engineering

    • Optimising model efficiency

    • Boosting performance for specific tasks

    • Understanding model constraints

    • Enhancing model security


Step-by-step process for creating effective prompts

  1. Define the goal

  2. Craft Initial prompt

  3. Test the prompt

  4. Analyze the response

  5. Refine the prompt

  6. Iterate 3, 4 & 6.


Best Practices for Prompt Creation

  1. Importance of Clarity in Prompts:

    • Simple and straightforward language is crucial for conveying instructions easily.

    • Prompts should be unambiguous and easy to comprehend.

    • Avoid using specialized terminologies that may confuse the model or users.

    • Vague prompts can lead to responses that do not align with your intentions.

    • Provide a clear description of the task that the model must perform.

  2. Importance of Context in Prompts:

    • Context helps the model understand the situation or subject.

    • Incorporate relevant information or specific details like people, places, events, or concepts in prompts.

    • Contextual details guide the understanding of the model.

  3. Importance of Precision in Prompts:

    • Precision helps outline the request in the prompt.

    • Express the desired kind of response with clarity.

    • Examples incorporated within prompts help the model understand the expected response.

  4. Importance of Role Play or Persona Pattern in Prompts:

    • Prompts written from the perspective of a specific character or persona help the model generate aligned responses.

    • Essential contextual details enable the model to assume a particular role


Note: This is summarized notes from the course Generative AI: Prompt Engineering Basics

 
 
 

Recent Posts

See All
Indian Shrimp Industry - Analysis

Shrimp Industry - Outlook The global shrimp market is experiencing robust growth, driven by increasing demand for seafood and shifting...

 
 
 

Comments


bottom of page