1 min read

IBM Generative AI: Prompt Engineering Basics

IBM Generative AI: Prompt Engineering Basics
Photo by Gabriel Heinzer / Unsplash

The next course in the IBM program is Prompt Engineering Basics. This course is about creating the most effective prompts for AI tools to elicit the best responses. Here's a summary of the course:

Prompt Introduction

A well-constructed prompt requires as much relevant detail as possible, as best practice, give:

  • Distinct guidelines
  • Context
  • Input information
  • Output guidelines/constraints

The rest of the course is mainly practicing 'prompt engineering' which is simply the process of building a prompt, testing it, and tweaking the prompt based on the result to get further improved outputs. This can be repeated over multiple iterations.

Best Practices

  • Clarity [Simple, explicit]
  • Context [Give it]
  • Precision [Specific, examples]
  • Persona [AI role play]

Interview Prompt

Prompt engineering approach to have the LLM gather information via several prompts. An example would be it could ask you 10 basic ingredients of your ideal retirement location. From the multiple responses, it could build a more detailed and comprehensive answer.

Chain of Thought

Series of prompts with solutions and guidance and logic, to guide the model to generate desired responses using the same logic. Each step can be a breakdown of the main problem statement.

Tree of Thought

Expands on the chain of thought approach by prompting the model with multiple lines of thinking & reasoning. The model can then pursue each to give answers of which might be best. This can be done by giving prompt instructions with the different lines of thinking, and then the actual prompt.