Prompt Engineering -Developers

This blog offers brief and high-level insights into Prompt Engineering and some of key tips to get better AI response user inputs

3/17/20251 min read

Prompt Engineering

When discussing a topic with friends and seeking their input, providing context is crucial; otherwise, their suggestions may be too generic or unrelated to your query.

Similarly, in AI, giving clear and detailed instructions leads to more accurate and relevant responses.

This process is known as Prompting, and the skill of crafting effective prompts is called Prompt Engineering.

Hacks or Tactics
Clear and Specific instructions:
  • Use Delimiters (""" , ``` , --- , < > , <tag> </tag> )

  • Ask for Structured Output (Json,html)

  • Conditions are satisfied OR Check Assumptions requirements to do the task

  • Few Shot prompting. - give examples

Give Time to the Model to think
  • Specify the steps to complete the task

  • Instruct the model to work out its own solution before using to conclusion

Iterative Prompt Development

Idea --> Implementation (Code/Data/Prompt) --> Experimental result --> error analysis --> Repeat

Summarising:

For example to get minutes from the meetings

Inferring:

  • Sentiment Analysis, Product Review - Postive or Negative

  • Identify Types of Emotions

  • Identify Anger

  • Extract product and company name

  • Perform multiple tasks at once

Transforming

  • Translation

  • Universal Translator

  • Tone Transformation

  • Format conversion

  • Spell/Grammar Check

Expanding

Short message to Long messages:

Automated email to customer

Limitations: Hallucinations

Fabricated ideas - Not True statements - Not plausible

May look real but wrong or incorrect

Reducing Hallucinations : Find relevance documentation