Member-only story

Prompt Engineering 101

Skill of the future — Interacting with large language models

Nishu Jain
4 min readDec 7, 2022

Prompt engineering is the process of crafting well-written and effective prompts for large language models. This involves understanding the strengths and limitations of the model and carefully selecting the words and phrases that you use in your prompts.

Here are some tips for effective prompt engineering:

  • Be specific: Be as specific as possible in your prompts. Avoid vague or generic phrases that could be interpreted in multiple ways. For example, instead of saying “Write a poem about nature,” try something like “Write a poem about the beauty of a sunset over the ocean.”
  • Use context: Include relevant context in your prompts to help the model generate more accurate responses. For example, if you want the model to write a poem about a specific place, provide some background information about that place in your prompt.
  • Provide structure: Provide structure to your prompts by using clear and concise language. This will help the model generate responses that are well-organized and easy to understand. For example, instead of saying “Write a story,” try something like “Write a story that begins with a character waking up on a Monday morning and ends with them realizing they have a super power.”
  • Be creative: Be creative and playful in your prompts. This can help inspire the model to generate more interesting and original responses. For example, instead of saying “Write a short story,” try something like “Write a short story about a time traveler who goes back in time to visit the dinosaurs.”
  • Experiment: Experiment with different prompt styles and formats, such as open-ended questions, fill-in-the-blank statements, or multiple-choice options, to see which ones yield the most relevant and accurate responses from the language model.

By following these tips, you can effectively interact with large language models and generate high-quality responses.

Things to avoid while giving prompts

  • Avoid asking multiple questions in one prompt. This can confuse the model and make it difficult to provide a clear and concise response.

--

--

Nishu Jain
Nishu Jain

Written by Nishu Jain

Obsessed with Tech & Biz | SaaS startup guy | Engineer + Wordsmith | My Medium Portfolio: https://mymedium.info/@nishu-jain

Responses (1)

Write a response