Prompt Engineering Patterns: Question Refinement Pattern

Introduction

This post will be first in a series of posts where I will be discussing various patterns that can be used to refine your prompts for better results from LLM models.

Let's start with the first pattern - Question Refinement Pattern.

This has be one of the simplest pattern in a conversational AI system which can be used to refine your prompts for better results.

In this pattern we base our prompts in a manner which helps the model to refine our prompt if they think they have a better alternative. This pattern is useful when you are not sure about the exact question you want to ask or you want to give the model a chance to refine your question.

In actual practice, this pattern can be used in the following manner:

Normal Prompt : "How to excercise properly?"

Refined Prompt : "Whenever I ask a question about excercising, 
ask whether i would like to use a better version of the question 
that includes eating habits, sleep patterns and excercise routines 
before making a suggestion."

Now whenever you ask a question about excercising, the model will follow these instructions and suggest a better version of the question if it thinks it has a better alternative.

Also With this simple change in the prompt you have more control over what is being suggested. And as always, prompt iteration is the key to get better results.

Back To All Blogs