← Back to Blog

Context, Clarity, and Constraints

Are you having trouble getting your Large Language Model, LLM, to generate output with satisfactory quality? Whether it's refining an effective punch in the dojo or generating a TPS Report in the office, there are some strategies that are universal.

When I teach karate, my goal is to help the student become better at karate. When the student studies karate, their goal is to help themselves become better at karate. When goals are aligned there is a much higher chance of success.

If you want better results from your favourite LLM, try providing it with Context, Clarity, and Constraints as a strategic way of ensuring both you and the LLM are aligned on the same goal, therefore improving your chance of success. I didn't invent these techniques, but I am recommending their utility as a strategy for achieving satisfactory outcomes both on the dojo floor and in the chat window.

When a new student arrives in the dojo, we align on a single goal such as "in today's class we will work on improving our punches." That's context! We are aligned on the same goal therefore we will improve our chances of success.

Karate has different types of punches so, if I want a student to improve their punch, clarity comes to the rescue when I explain that they are working to improve an oi-tsuki punch. This detail helps to steer the student to the desired result.

In order to focus attention or to force creativity, I might employ constraints. If I instruct the student to stand still while punching, it constrains movement and encourages focus on improving the punch. Similarly, instructing the student to try punching without using their fist may inspire a high-quality front kick or it may cause a lot of useless flailing about which is probably not the goal either of us is striving for.

Using these strategies won't get you perfect results, but the results you do get should be much more useful.

So, the next time you need to generate a TPS Report try something like: "As a senior engineer, create a test procedure specification using the provided template and don't forget the cover sheet."

• Context: "a senior engineer" • Clarity: "a test procedure report", "don't forget the cover sheet" • Constraint: "Use the provided template"

A prompt like this will help the LLM avoid forgetting the cover sheet when generating your TPS Reports which will hopefully avoid having to work on the weekend again!

meme

Remember: Always include the cover sheet!

After you've done some prompt engineering training, come back to the dojo and share what you've learned with the rest of the students so we can all grow together.

Domo arigato gozaimashita.

References

  1. Goal Setting in Teams: Goal Clarity and Team Performance in the Public Sector