Enhancing LLM prompting with CO-STAR
The quality of output we receive from LLMs largely depends on the quality of our input, namely the prompt. This is crucial for ChatGPT users, and even more so for those developing LLM applications.
There have been several techniques emerging from the community, but I recently came across an intriguing one: the CO-STAR framework, as detailed in an article on Medium.
Interestingly, I haven't found many formal references to it beyond that article, so I decided to give it a quick try.
I'll provide a practical example, and we can observe the results together. You might be surprised!
But first, let's shed light on the CO-STAR framework, introduced by Singapore GovTech.
CO-STAR stands for Context, Objective, Style, Tone, Audience, Response:
领英推荐
Now, here's the surprise (or perhaps not so surprising): I've employed the CO-STAR framework to explain the CO-STAR framework itself when presenting its concept to an LLM.
The following was the prompt, crafted in adherence to the CO-STAR guidelines:
# CONTEXT #
I want to post on Linkedin an article about a new technique to enhance LLM prompting. My field is software development and GenAI.
# OBJECTIVE #
Create a post for me about CO-STAR framework created by Singapore GovTech to increase effectiveness and relevance of an LLM’s response. CO-STAR stands for Context, Objective, Style, Tone, Audience, Response. Please associate these things to the increase of quality of responses from an LLM such as ChatGPT.
# STYLE #
Follow the writing style of successful AI writers.
# TONE #
Smart.
# AUDIENCE #
Other IT professionals, people interested in GenAI, LLM app developers.
# RESPONSE #
The Linkedin post, impactful.
Almost everything presented in the ordered bullet list is actually the response from the LLM using the CO-STAR framework.
What are your thoughts on its effectiveness?
Please share any other LLM prompting techniques you've been using as well!
Director of Content & Regional Director SA
1 年Natasha Nel very relevant post for what we are working on now. Can't wait to try it!
GovTech Prompt Royale Lead ? 6th at Global Prompt Engineering Championship 2024
1 年Hi Sebastian, thanks for advocating our framework! Saw the liner on how you couldn't find further references to the CO-STAR framework. If you'd like to read further, you can check out the framework in our larger Prompt Engineering Playbook here: https://go.gov.sg/promptengineering-playbook-file-public! ?? Joseph Tan
Principal Solutions Architect @ Genesis Global | MBA in Finance
1 年This is great Article. Thank you
Growth | Capital Markets | Strategic Sales | Fintech | AI | Digital Assets
1 年Great article!