Codecademy Logo

Crafting Effective Prompts

Related learning

  • Learn about effective prompting techniques to craft high-quality prompts, maximizing your use of generative AI.
    • With Certificate
    • Beginner Friendly.
      3 hours
  • Learn the basics of generative AI and best prompt engineering practices when using AI chatbots like ChatGPT to create new content.
    • Includes 6 Courses
    • With Certificate
    • Beginner Friendly.
      5 hours

Root Prompt

A root prompt is the first prompt in a conversation with an AI assistant. It sets the main topic or context, creating a foundation for follow-up prompts and helping the AI assistant provide precise and relevant responses.

Crafting effective prompts

Crafting effective prompts means using clear and specific language, asking one question at a time, breaking complex queries into simple steps, and requesting explanations when needed. This helps the AI Assistant give more accurate and helpful responses.

Breaking Prompts into steps

Breaking prompts into steps means dividing a complex task into smaller, clearer parts. Each part should be a standalone prompt that can be asked independently. This technique helps avoid confusion by focusing on one aspect at a time instead of combining multiple questions in a single prompt.

Sequential Prompting

Sequential prompting breaks a complex task into a series of connected prompts. Each prompt builds on the AI assistant’s previous response to create a more coherent and complete output.

Adjusting Tone and Style in Prompt

Adjusting tone and style helps guide the AI assistant to respond with the right level of formality, attitude, or communication approach. Small changes in wording can shift responses to match different audiences or situations.

Prompt Optimization

Prompt optimization involves refining prompts by rephrasing wording, adding clear instructions, and including context or examples to help the AI assistant generate the desired output more accurately.

Prompt Complexity

Prompt complexity is the level of detail, conditional instructions, and nested tasks in a prompt. It can affect how well an AI assistant understands and responds.

ChatGPT Prompt Library

A prompt library is a collection of engineered prompts that we can re-use to produce consistent, high-quality results.

The benefits of having a prompt library include:

  • Saving time writing prompts
  • Improving organization and collaboration with team members
  • Generating consistent content
  • Quickly optimizing prompts through trial and error

A prompt library can be built with something as simple as a text document or a spreadsheet.

Context to Prompt

Prompts can be dynamically adjusted to incorporate new information, allowing AI assistants to generate updated and contextually relevant responses.

Ineffective Prompt

Ineffective prompts are vague or too broad. They can lead AI assistants to generate vague or off-topic responses.

Learn more on Codecademy

  • Learn about effective prompting techniques to craft high-quality prompts, maximizing your use of generative AI.
    • With Certificate
    • Beginner Friendly.
      3 hours
  • Learn the basics of generative AI and best prompt engineering practices when using AI chatbots like ChatGPT to create new content.
    • Includes 6 Courses
    • With Certificate
    • Beginner Friendly.
      5 hours