RSS

Tag Archives: Few-Shot Prompting

Enhance Your Content Creation with Few-shot and Chain of Thought Prompting Techniques

I have been prompting ChatGPT, CoPilot, and now Gemini for some time. I have also been doing the two things that I outline below. However, I have not been able to name or articulate using the proper lingo before. Here are the two prompting techniques that I am talking about:

1 – Few-shot prompting: This is using a few examples in the prompt. So, first, I might say something like:

“Write me a concise email to coworkers about upcoming tasks that need to be completed efficiently using very few adjectives and adverbs. Do not be flowery. Below, I have added two examples of what they might sound like. Write something similar:

Email 1: Task Update

Subject: Project Deliverables Due

Hi Team,

Please focus on completing the project deliverables by Thursday. We need to finalize the report, update the spreadsheet, and review the presentation. Assignments have been shared in the task tracker. Ensure everything is submitted on time.

Let me know if there are any issues.

Thanks,
[Your Name]

Email 2: Task Urgency

Subject: Urgent Task Completion

Hi Team,

We have a tight deadline to meet. Please prioritize the report, spreadsheet update, and presentation review. These tasks must be finished by Thursday. The task tracker has all assignments listed.

Reach out immediately if any problems arise.

Best,
[Your Name]”

Comparatively, there is also one-shot and zero-shot prompting, which would have one example or no examples respectively.

2 – Chain of Thought Prompting: This is a prompt whereby the user asks in the prompt for Large Language Model (LLM) to explain its reasoning. One might wonder why to do this. Here are two reasons presented from Coursera:

Benefits 

Chain-of-thought prompting has two main benefits:

  1. It can improve the overall accuracy of an LLM’s output. When you divide a task into more manageable steps, you help the LLM produce accurate and consistent results.
  2. It can improve the problem solving process. By instructing an LLM to break down the problem, you can better understand the steps used by the LLM to arrive at the solution. 
This image was generated using Gemini in Slides. (My first time using Google to generate images)

Be sure to include:

  • When crafting prompts for large language models (LLMs), understanding the context of “Goal,” “Audience,” “Tone,” and “Output” is essential to get the desired results. Here’s an expanded explanation of each:

    Goal
  • The “Goal” refers to the primary objective or purpose of the prompt. It answers the question: What are you trying to achieve? This could range from generating creative writing, summarizing information, answering specific questions, providing advice, or assisting with tasks like coding or data analysis. Defining the goal clearly helps the LLM understand what the end result should be and tailors its responses to fulfill that purpose.

    Audience
  • The “Audience” identifies the intended readers or users of the generated content. It answers the question: Who is this content for? Knowing the audience guides the LLM in adjusting the complexity, formality, and style of the output. For instance, content meant for children will differ significantly in language and tone from content intended for professionals or experts. Understanding the audience ensures that the response is appropriate, relatable, and engaging for the intended readers.

    Tone
  • The “Tone” describes the emotional and stylistic quality of the content. It answers the question: How should the content feel to the reader? The tone can range from formal to informal, friendly to authoritative, or humorous to serious. Specifying the tone helps the LLM align its language, word choice, and sentence structure with the desired emotional impact, ensuring the output resonates with the intended mood or atmosphere.

    Output
  • The “Output” defines the expected format, length, or style of the generated content. It answers the question: What should the final product look like? This could include specifications like a detailed essay, a brief summary, bullet points, a dialogue, a creative story, or a step-by-step guide. By specifying the output, you guide the LLM to structure the response in a way that meets your specific needs, ensuring the final result is both useful and appropriate for its intended purpose.

What have you and what would you use in the future? Have you discovered any new tools or techniques that have significantly impacted your work? Are there any prompts or methods you have found particularly effective, and are there different ways you are considering using them in the future? I am curious to hear your thoughts.

 

Tags: , , , , , , , , , , , , , , ,