{"id":164951,"date":"2025-03-30T13:01:10","date_gmt":"2025-03-30T13:01:10","guid":{"rendered":"https:\/\/peraltafinancing.com\/analytics\/chain-of-draft-prompting-with-gemini-and-groq\/"},"modified":"2025-03-30T13:01:10","modified_gmt":"2025-03-30T13:01:10","slug":"chain-of-draft-prompting-with-gemini-and-groq","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=164951","title":{"rendered":"Chain of Draft Prompting with Gemini and Groq"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div id=\"article-start\">\n<p>Recent advancements in reasoning models, such as <a href=\"https:\/\/www.analyticsvidhya.com\/blog\/2024\/12\/openai-o1-is-out\/\" target=\"_blank\" rel=\"noreferrer noopener\">OpenAI\u2019s o1<\/a> and <a href=\"https:\/\/www.analyticsvidhya.com\/blog\/2025\/01\/deepseek-r1\/\" target=\"_blank\" rel=\"noreferrer noopener\">DeepSeek R1<\/a>, have propelled LLMs to achieve impressive performance through techniques like <a href=\"https:\/\/www.analyticsvidhya.com\/blog\/2023\/12\/what-is-chain-of-thought-prompting-and-its-benefits\/\" target=\"_blank\" rel=\"noreferrer noopener\">Chain of Thought<\/a> (CoT). However, the verbose nature of CoT leads to increased computational costs and latency. A novel paper published by Zoom Communications presents a new prompting technique called Chain of Draft (CoD). CoD focuses on concise, dense reasoning steps, reducing verbosity while maintaining accuracy. This approach mirrors human reasoning by prioritizing minimal, informative outputs, optimizing efficiency for real-world<br \/>applications.<\/p>\n<p>In this guide article we will explore this new prompting technique thoroughly and implement it\u00a0 using Gemini, Groq and Cohere API. And understand the differences between other prompting techniques and Chain of Draft prompting technique.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-learning-objectives\">Learning Objectives<\/h3>\n<ul class=\"wp-block-list\">\n<li>Gain a comprehensive understanding of the Chain of Draft (CoD) prompting technique.<\/li>\n<li>Learn how to implement the CoD technique using APIs from Gemini, Groq, and Cohere.<\/li>\n<li>Understand about the comparison between CoD and other prompting techniques.<\/li>\n<li>Analyze the advantages and limitations of the CoD prompting technique.<\/li>\n<\/ul>\n<p><em><strong>This article was published as a part of the\u00a0<\/strong><\/em><a href=\"https:\/\/www.analyticsvidhya.com\/datahack\/blogathon\" target=\"_blank\" rel=\"noreferrer noopener\"><em><strong>Data Science Blogathon.<\/strong><\/em><\/a><\/p>\n<h2 class=\"wp-block-heading\" id=\"h-introducing-chain-of-draft-prompting-nbsp\">Introducing Chain of Draft Prompting\u00a0<\/h2>\n<p>Chain of Draft (CoD) prompting is a novel approach to reasoning in <a href=\"https:\/\/www.analyticsvidhya.com\/blog\/2023\/03\/an-introduction-to-large-language-models-llms\/\" target=\"_blank\" rel=\"noreferrer noopener\">large language models<\/a> (LLMs), inspired by how humans tackle complex tasks. Rather than generating verbose, step-by-step explanations like the Chain of Thought (CoT) method, CoD focuses on producing concise, critical insights at each step. This minimalist approach allows LLMs to advance toward solutions more efficiently, using fewer tokens and reducing latency, all while maintaining or even improving accuracy. <\/p>\n<p>Introduced by researchers at Zoom Communications, CoD has shown significant improvements in cost-effectiveness and speed across tasks like arithmetic, common-sense reasoning, and symbolic problem-solving, making it a practical technique for real-world applications. One can read the published paper in detail <a href=\"https:\/\/arxiv.org\/html\/2502.18600v1\" target=\"_blank\" rel=\"nofollow noopener\">here<\/a>.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-background-on-other-prompting-techniques\">Background on Other Prompting Techniques<\/h2>\n<p>Large Language Models (LLMs) have significantly advanced in their ability to perform complex reasoning tasks, owing much of their progress to various structured reasoning frameworks. One foundational method, Chain-of-Thought (CoT) reasoning, encourages models to articulate intermediate steps, thereby enhancing problem-solving capabilities. Building upon this, more sophisticated structures like tree and graph-based reasoning have been developed, allowing LLMs to tackle increasingly intricate problems by representing hierarchical and relational data more effectively. <\/p>\n<p>Additionally, approaches such as self-consistency CoT incorporate verification and reflection mechanisms to bolster reasoning reliability, while ReAct integrates tool usage into the reasoning process, enabling LLMs to access external resources and knowledge. These innovations collectively expand the reasoning capabilities of LLMs across a diverse range of applications.\u00a0<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-different-prompting-techniques\">Different Prompting Techniques<\/h3>\n<ul class=\"wp-block-list\">\n<li>\u00a0<b>Chain-of-Thought (CoT) Prompting<\/b>: Encourages models to generate intermediate reasoning steps, breaking down complex problems into simpler tasks. This approach improves performance on arithmetic, commonsense, and symbolic reasoning tasks.<\/li>\n<li><b>Self-Consistency CoT<\/b>: Integrates verification and reflection mechanisms into the reasoning process, allowing models to assess the consistency of their intermediate steps and refine their conclusions, thereby increasing reasoning reliability.<\/li>\n<li><strong>ReAct (Reasoning and Acting):<\/strong> Combines reasoning with tool usage, enabling models to access external resources and knowledge bases during the reasoning process. This integration enhances the model\u2019s ability to perform tasks that require external information retrieval.<\/li>\n<li><b>Tree-of-Thought Prompting<\/b>: An advanced technique that explores multiple reasoning paths simultaneously by generating various approaches at each decision point and evaluating them to find the most promising solutions.<\/li>\n<li><b>Graph of Thought (GoT): <\/b>This\u00a0prompting is an advanced technique designed to enhance the reasoning capabilities of Large Language Models (LLMs) by structuring their thought processes as interconnected graphs.This method addresses the limitations of linear reasoning approaches, such as Chain-of-Thought (CoT) and Tree of Thoughts (ToT), by capturing the non-linear and dynamic nature of human cognition.<\/li>\n<li><b>Skeleton-of-Thought (SoT)<\/b>: Guides models to first generate a skeletal outline of the answer, followed by parallel decoding. This method aims to reduce latency in generating responses while maintaining reasoning quality.<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"h-explaining-chain-of-draft-prompting\">Explaining Chain of Draft Prompting<\/h2>\n<p>Chain of Draft (CoD) Prompting is a minimalist reasoning technique designed to optimize the performance of large language models (LLMs) by reducing verbosity during the reasoning process while maintaining accuracy. The core idea behind CoD is inspired by how humans approach problem-solving: instead of articulating every detail in a step-by-step manner, we tend to use concise, shorthand notes or drafts that capture only the most crucial pieces of information. This approach helps to reduce cognitive load and enables faster progress toward a solution.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-human-centric-inspiration\">Human-Centric Inspiration<\/h3>\n<ul class=\"wp-block-list\">\n<li>In human problem-solving, whether solving equations, drafting essays, or coding, we rarely articulate every step in great detail. Instead, we often jot down only the most important pieces of information that are essential to advancing the solution. This minimalistic method reduces cognitive load, keeping focus on the core concepts.<\/li>\n<li>For example, in mathematics, a person might record only key steps or simplified versions of equations, capturing the essence of the reasoning without excessive elaboration.<\/li>\n<\/ul>\n<h3 class=\"wp-block-heading\" id=\"h-mechanism-of-cod\">Mechanism of CoD<\/h3>\n<p><b>Concise Intermediate Steps<\/b>: CoD focuses on generating compact, dense outputs for each reasoning step, which capture only the essential information needed to move forward. This results in minimalistic drafts that help guide the model through problem-solving without unnecessary detail.<\/p>\n<p><b>Cognitive Scaffolding<\/b>: Just as humans use shorthand to track their ideas, CoD externalizes critical<br \/>thoughts while avoiding the verbosity that typically burdens traditional reasoning models. The goal is to maintain the integrity of the reasoning pathway without overloading the model with excessive tokens.<\/p>\n<h4 class=\"wp-block-heading\" id=\"h-example-of-cod\">Example of CoD<\/h4>\n<blockquote class=\"wp-block-quote blockquote text-center is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"mb-0\"><b>Problem<\/b>: Jason had 20 lollipops. He gave Denny some. Now he has 12 left. How many did Jason give to Denny?\u00a0\u00a0<\/p>\n<p class=\"mb-0\"><b>Response [CoD] :\u00a0<\/b>20\u201312 = 8 \u2192 Final Answer: 8.<\/p>\n<\/blockquote>\n<p>As we can see above the response for the problem had very concise symbolic reasoning steps similar to what we do when we are doing problem solving.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-comparison-between-different-prompting-techniques\">Comparison Between different Prompting Techniques<\/h2>\n<p>Different prompting techniques enhance LLM reasoning in unique ways, from step-by-step logic to external knowledge integration and structured thought processes.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-standard-prompting\">Standard Prompting<\/h3>\n<p>In standard prompting, the LLM generates a direct answer to a query without showing the intermediate reasoning steps. It provides the final output without revealing the thought process behind it.<\/p>\n<figure class=\"wp-block-image size-full figure mt-2 mb-2 d-table mx-auto\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1015\" height=\"169\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/standard-prompting.webp\" alt=\"standard prompting \" class=\"wp-image-228744\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/standard-prompting.webp 1015w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/standard-prompting-300x50.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/standard-prompting-768x128.webp 768w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/standard-prompting-150x25.webp 150w\" sizes=\"(max-width: 1015px) 100vw, 1015px\"\/><\/figure>\n<figure class=\"wp-block-image size-full figure mt-2 mb-2 d-table mx-auto\"><img loading=\"lazy\" decoding=\"async\" width=\"1040\" height=\"127\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Standard-Prompting-Example.webp\" alt=\"Standard Prompting Example\" class=\"wp-image-228746\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Standard-Prompting-Example.webp 1040w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Standard-Prompting-Example-300x37.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Standard-Prompting-Example-768x94.webp 768w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Standard-Prompting-Example-150x18.webp 150w\" sizes=\"auto, (max-width: 1040px) 100vw, 1040px\"\/><\/figure>\n<p>Although this approach is efficient in terms of token usage, it lacks transparency. Without insight into how the model reached its conclusion, verifying correctness or identifying reasoning errors becomes<br \/>challenging, particularly for complex problems that require step-by-step reasoning.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-chain-of-thought-cot-prompting\">Chain of Thought(CoT) Prompting<\/h3>\n<p>With CoT prompting, the model offers an in-depth explanation of its reasoning process.<\/p>\n<figure class=\"wp-block-image size-full figure mt-2 mb-2 d-table mx-auto\"><img loading=\"lazy\" decoding=\"async\" width=\"977\" height=\"214\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-ThoughtCoT-Prompting.webp\" alt=\"Chain of Thought(CoT) Prompting\" class=\"wp-image-228747\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-ThoughtCoT-Prompting.webp 977w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-ThoughtCoT-Prompting-300x66.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-ThoughtCoT-Prompting-768x168.webp 768w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-ThoughtCoT-Prompting-150x33.webp 150w\" sizes=\"auto, (max-width: 977px) 100vw, 977px\"\/><\/figure>\n<figure class=\"wp-block-image size-full figure mt-2 mb-2 d-table mx-auto\"><img loading=\"lazy\" decoding=\"async\" width=\"967\" height=\"334\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-Thought-Prompting-example.webp\" alt=\"Chain of Thought Prompting example\" class=\"wp-image-228749\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-Thought-Prompting-example.webp 967w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-Thought-Prompting-example-300x104.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-Thought-Prompting-example-768x265.webp 768w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-Thought-Prompting-example-350x120.webp 350w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-Thought-Prompting-example-150x52.webp 150w\" sizes=\"auto, (max-width: 967px) 100vw, 967px\"\/><\/figure>\n<p>This response is thorough and transparent, outlining every step of the reasoning process. However, it is overly detailed, including redundant information that doesn\u2019t contribute computationally. This excess verbosity greatly increases token usage, resulting in higher latency and cost.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-chain-of-draft-cod-prompting\">Chain of Draft (CoD) Prompting<\/h3>\n<p>With CoD prompting, the model focuses exclusively on the essential reasoning steps, providing only the most critical information. This approach eliminates unnecessary details, ensuring efficiency while maintaining accuracy.<\/p>\n<figure class=\"wp-block-image size-full figure mt-2 mb-2 d-table mx-auto\"><img loading=\"lazy\" decoding=\"async\" width=\"989\" height=\"253\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-Draft-CoD-Prompting.webp\" alt=\"Chain of Draft (CoD) Prompting\" class=\"wp-image-228750\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-Draft-CoD-Prompting.webp 989w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-Draft-CoD-Prompting-300x77.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-Draft-CoD-Prompting-768x196.webp 768w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-Draft-CoD-Prompting-150x38.webp 150w\" sizes=\"auto, (max-width: 989px) 100vw, 989px\"\/><\/figure>\n<figure class=\"wp-block-image size-full figure mt-2 mb-2 d-table mx-auto\"><img loading=\"lazy\" decoding=\"async\" width=\"935\" height=\"148\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-Draft-Prompting-example.webp\" alt=\"Chain of Draft Prompting example\" class=\"wp-image-228751\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-Draft-Prompting-example.webp 935w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-Draft-Prompting-example-300x47.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-Draft-Prompting-example-768x122.webp 768w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Chain-of-Draft-Prompting-example-150x24.webp 150w\" sizes=\"auto, (max-width: 935px) 100vw, 935px\"\/><\/figure>\n<h2 class=\"wp-block-heading\" id=\"h-advantages-of-chain-of-draft-cod-prompting\">Advantages of Chain of Draft (CoD) Prompting<\/h2>\n<p>Below we will look into the advantages of chain of draft prompting:<\/p>\n<ul class=\"wp-block-list\">\n<li><b>Reduced Latency<\/b>: CoD enhances response times by 48-76% by reducing the number of tokens generated. This leads to much faster AI-powered applications, particularly in real-time environments like support, education, and conversational AI, where latency can heavily affect user experience.<\/li>\n<li><b>Cost Reduction<\/b>:\u00a0By cutting token usage by 70-90% compared to CoT, CoD results in significantly lower inference costs. For an enterprise handling 1 million reasoning queries each month, CoD could reduce costs from $3,800 (CoT) to $760, saving over $3,000 per month\u2014savings that grow even more at scale. With its ability to scale efficiently across large workloads, CoD allows businesses to process millions of AI queries without incurring excessive expenses.<\/li>\n<li><b>Easier to integrate in systems<\/b>:\u00a0Less verbose responses allow responses to be more user friendly.<\/li>\n<li><b>Simplicity of Implementation<\/b>: Unlike AI techniques that require\u00a0model retraining or infrastructure changes, CoD is a\u00a0prompting strategy\u00a0that can be\u00a0adopted instantly. Organizations already using CoT can\u00a0switch to CoD with a simple prompt modification, making it highly accessible.\u00a0Because CoD requires no fine-tuning, enterprises can seamlessly scale AI reasoning across global deployments without model retraining.<\/li>\n<li><b>No model update required: <\/b>CoD is compatible with pre-existing LLMs, allowing it to take advantage of advancements in model development without the need for retraining or fine-tuning. This ensures that efficiency improvements remain relevant and continue to grow as AI models progress.<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"h-code-implementation-of-cod\">Code Implementation of CoD<\/h2>\n<p>Now we will see how we can implement the Chain of Draft prompting using different LLMs and methods.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-methods-to-implement-cod\">Methods to Implement CoD<\/h3>\n<p>We can implement Chain of Draft in different ways let us g through them:<\/p>\n<ul class=\"wp-block-list\">\n<li><b>Using Prompt Instruction<\/b>: To implement Chain of Draft (CoD) prompting, instruct the model with the following prompt: \u201cThink step\u00a0by step, but only keep a minimum draft for each thinking step, with 5 words at most.\u201d This guides the model to generate concise, essential reasoning for each step. Once the reasoning steps are complete, ask the model to return the final answer after a separator (####). This ensures minimal token usage while maintaining clarity and accuracy.<\/li>\n<li><b>Using One shot or Few shot example<\/b>: We can also make it more robust by adding some zero or few shots examples in our prompt to enable LLM to give a consistent response using those examples and generate intermediate steps in short drafts.<\/li>\n<\/ul>\n<p>We will now implement this in code using two different LLM Gemini and Groq API. Gr<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-implementation-using-gemini\">Implementation using Gemini<\/h2>\n<p>Let us now implement these prompting techniques using Gemini to enhance reasoning, decision-making, and problem-solving capabilities.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-step-1-generate-gemini-api-key\">Step 1: Generate Gemini API Key<\/h3>\n<p>For Gemini API Key visit <a href=\"https:\/\/ai.google.dev\/gemini-api\/docs\/api-key\" target=\"_blank\" rel=\"nofollow noopener\">Gemini Site<\/a>\u00a0Click on <i>get an API Key\u00a0<\/i>\u00a0button as shown below in pic. You will be<br \/>redirected <a href=\"https:\/\/aistudio.google.com\/app\/apikey\" target=\"_blank\" rel=\"nofollow noopener\">Google AI Studio<\/a>\u00a0where you will need to use your google account login and then find your API Key generated.<\/p>\n<figure class=\"wp-block-image size-full is-resized figure mt-2 mb-2 d-table mx-auto\"><img loading=\"lazy\" decoding=\"async\" width=\"1157\" height=\"597\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Generate-Gemini-API-Key.webp\" alt=\"Generate Gemini API Key\" class=\"wp-image-228755\" style=\"width:694px;height:auto\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Generate-Gemini-API-Key.webp 1157w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Generate-Gemini-API-Key-300x155.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Generate-Gemini-API-Key-768x396.webp 768w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Generate-Gemini-API-Key-150x77.webp 150w\" sizes=\"auto, (max-width: 1157px) 100vw, 1157px\"\/><\/figure>\n<h3 class=\"wp-block-heading\" id=\"h-step-2-install-libraries\">Step 2: Install Libraries<\/h3>\n<p>We basically need to install google genai library.<\/p>\n<pre class=\"wp-block-code\"><code>pip install google-genai<\/code><\/pre>\n<h3 class=\"wp-block-heading\" id=\"h-step-3-import-packages-and-setup-api-key\">Step 3: Import Packages and Setup API Key<\/h3>\n<p>We import relevant packages and add API key as a environment variable.<\/p>\n<pre class=\"wp-block-code\"><code>import base64\nimport os\nfrom google import genai\nfrom google.genai import types\n\nos.environ[\"GEMINI_API_KEY\"] = \"Your Gemini API Key\"\n<\/code><\/pre>\n<h3 class=\"wp-block-heading\" id=\"h-step-4-create-generate-function\">Step 4: Create Generate Function<\/h3>\n<p>Now we define the generate function and configure <i>model, contents and generate_content_config .<\/i><\/p>\n<p>Note in\u00a0generate_content_config\u00a0 we pass system instruction as \u201d Think step by step, but only keep a minimum draft for each thinking step, with 5 words at most. Return the answer at the end of the response after a separator ####.\u201d<\/p>\n<pre class=\"wp-block-code\"><code>def generate_gemini(example,question):\n    client = genai.Client(\n        api_key=os.environ.get(\"GEMINI_API_KEY\"),\n    )\n\n    model = \"gemini-2.0-flash\"\n    contents = [\n        types.Content(\n            role=\"user\",\n            parts=[\n                types.Part.from_text(text=example),\n                types.Part.from_text(text=question),\n            ],\n        ),\n    ]\n    generate_content_config = types.GenerateContentConfig(\n        temperature=1,\n        top_p=0.95,\n        top_k=40,\n        max_output_tokens=8192,\n        response_mime_type=\"text\/plain\",\n        system_instruction=[\n            types.Part.from_text(text=\"\"\"Think step by step, but only keep a minimum draft for each thinking step, with 5 words at most. Return the answer at the end of the response after a separator ####.\"\"\"),\n        ],\n    )\n\n# Now pass the parameters to generate_content_stream function\n    for chunk in client.models.generate_content_stream(\n        model=model,\n        contents=contents,\n        config=generate_content_config,\n    ):\n        print(chunk.text, end=\"\")<\/code><\/pre>\n<h3 class=\"wp-block-heading\" id=\"h-step-5-execute-the-code\">Step 5: Execute the Code\u00a0<\/h3>\n<p>Now we can execute the code using two methods one passing only system instruction prompt and question directly. Another is by passing one-shot example in prompt along with question and system instruction.<\/p>\n<pre class=\"wp-block-code\"><code>if __name__ == \"__main__\":\n    example = \"\"\"\"\"\"\n    question =\"\"\"Q: Anita bought 3 apples and 4 oranges. Each apple costs $1.20 and each orange costs $0.80. How much did she spend in total?\nA:\"\"\"\n    generate_gemini(example,question)<\/code><\/pre>\n<p>Response for Zero-shot CoD prompt from Gemini:<\/p>\n<pre class=\"wp-block-code\"><code>Apples cost: 3 * $1.20\nOranges cost: 4 * $0.80\nTotal: sum of both\n#### $6.80<\/code><\/pre>\n<pre class=\"wp-block-code\"><code>if __name__ == \"__main__\":\n    example = \"\"\"Q: Jason had 20 lollipops. He gave Denny some lollipops. Now Jason has 12 lollipops. How many lollipops did Jason give to Denny?\nA: 20 - x = 12; x = 8. #### 8\"\"\"\n    question =\"\"\"Q: Anita bought 3 apples and 4 oranges. Each apple costs $1.20 and each orange costs $0.80. How much did she spend in total?\nA:\"\"\"\n    generate_gemini(example,question)\n<\/code><\/pre>\n<p><b>Output<\/b><\/p>\n<pre class=\"wp-block-code\"><code>\nApple cost: 3 * 1.20 \nOrange cost: 4 * 0.80 \nTotal: apple + orange \nTotal cost: 3.60 +3.20\nTotal: 6.80\n#### 6.80<\/code><\/pre>\n<h2 class=\"wp-block-heading\" id=\"h-implementation-using-groq\">Implementation using Groq<\/h2>\n<p>Now we will use\u00a0 Groq API which uses Llamaa model within it to demonstrate CoD prompting technique.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-step-1-generate-groq-api-key\">Step 1: Generate Groq API Key<\/h3>\n<p>Similar to Gemini we need to first create an account in groq wwe can do it by logging in through one of google account (gmail) on this <a href=\"https:\/\/console.groq.com\/keys\" target=\"_blank\" rel=\"nofollow noopener\">site<\/a>. Once logged in click on \u201c<i>Create an API Key<\/i>\u201d\u00a0<i>\u00a0<\/i>button and give a name for our api key and copy the generated api key as it will not be displayed again.<\/p>\n<figure class=\"wp-block-image size-full figure mt-2 mb-2 d-table mx-auto\"><img loading=\"lazy\" decoding=\"async\" width=\"1880\" height=\"455\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Creating-Groq-API-Key.webp\" alt=\"Creating Groq API Key\" class=\"wp-image-228760\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Creating-Groq-API-Key.webp 1880w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Creating-Groq-API-Key-300x73.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Creating-Groq-API-Key-768x186.webp 768w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Creating-Groq-API-Key-1536x372.webp 1536w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Creating-Groq-API-Key-150x36.webp 150w\" sizes=\"auto, (max-width: 1880px) 100vw, 1880px\"\/><\/figure>\n<h3 class=\"wp-block-heading\" id=\"h-step-2-install-libraries-0\">Step 2: Install Libraries<\/h3>\n<p>We basically need to install groq library.<\/p>\n<pre class=\"wp-block-code\"><code>!pip install groq --quiet<\/code><\/pre>\n<h3 class=\"wp-block-heading\" id=\"h-step-3-import-packages-and-setup-api-key-0\">Step 3: Import Packages and Setup API Key<\/h3>\n<p>We import relevant packages and add API key as a environment variable.<\/p>\n<pre class=\"wp-block-code\"><code>from groq import Groq\n\n# configure the LM, and remember to export your API key, please set any one of the key\nos.environ['GROQ_API_KEY'] = \"Your Groq API Key\"<\/code><\/pre>\n<h3 class=\"wp-block-heading\" id=\"h-step-4-create-generate-function-0\">Step 4:\u00a0Create Generate Function<\/h3>\n<p>Now we create generate_groq function by passing example and question. We also add system prompt \u201cThink step by step, but only keep a minimum draft for each thinking step, with 5 words at most. Return the answer at the end of the response after a separator ####.\u201d\u201d<\/p>\n<pre class=\"wp-block-code\"><code>def generate_groq(example,question):\n\n  client = Groq()\n  completion = client.chat.completions.create(\n      model=\"llama-3.3-70b-versatile\",\n      messages=[\n          {\n              \"role\": \"system\",\n              \"content\": \"Think step by step, but only keep a minimum draft for each thinking step, with 5 words at most. Return the answer at the end of the response after a separator ####.\"\n          },\n          {\n              \"role\": \"user\",\n              \"content\": example+\"\\n\"+question\n          },\n      ],\n      temperature=1,\n      max_completion_tokens=1024,\n      top_p=1,\n      stream=True,\n      stop=None,\n  )\n\n  for chunk in completion:\n      print(chunk.choices[0].delta.content or \"\", end=\"\")\n<\/code><\/pre>\n<h3 class=\"wp-block-heading\" id=\"h-step-5-execute-the-code-0\">Step 5: Execute the Code\u00a0<\/h3>\n<p>Now we can execute the code using two methods one passing only system instruction prompt and question directly. Another is by passing one-shot example in prompt along with question and system instruction. Let\u2019s see the output for Groq Llama models<\/p>\n<pre class=\"wp-block-code\"><code>#One shot \nif __name__ == \"__main__\":\n    example = \"\"\"Q: Jason had 20 lollipops. He gave Denny some lollipops. Now Jason has 12 lollipops. How many lollipops did Jason give to Denny?\nA: 20 - x = 12; x = 8. #### 8\"\"\"\n    question =\"\"\"Q: Anita bought 3 apples and 4 oranges. Each apple costs $1.20 and each orange costs $0.80. How much did she spend in total?\nA:\"\"\"\n    generate_groq(example,question)\n<\/code><\/pre>\n<p><b>Output<\/b><\/p>\n<pre class=\"wp-block-code\"><code>Apples cost $1.20 * 3\nOranges cost $0.80 * 4 \nAdd both costs together \nTotal cost is $3.60 + $3.20 \nEquals $6.80\n#### $6.8<\/code><\/pre>\n<pre class=\"wp-block-code\"><code>#zero shot\nif __name__ == \"__main__\":\n    example = \"\"\"\"\"\"\n    question =\"\"\"Q: Anita bought 3 apples and 4 oranges. Each apple costs $1.20 and each orange costs $0.80. How much did she spend in total?\nA:\"\"\"\n    generate_groq(example,question)<\/code><\/pre>\n<p><b>Output<\/b><\/p>\n<pre class=\"wp-block-code\"><code>Calculate apple cost. \nCalculate orange cost.\nAdd both costs.\n#### $7.20<\/code><\/pre>\n<p>As we can see for zero shot the answer is not coming correct for llama model unlike gemini model we will try to tweak and add more words in our question prompt to arrive at correct answer.<\/p>\n<p>We add this line further to our Question at end <i>\u201cVerify the answer is correct with steps\u201d<\/i><\/p>\n<pre class=\"wp-block-code\"><code> #tweaked Zero shot\nif __name__ == \"__main__\":\n    example = \"\"\"\"\"\"\n    question =\"\"\"Q: Anita bought 3 apples and 4 oranges. Each apple costs $1.20 and each orange costs $0.80. How much did she spend in total?Verify the answer is correct with steps\nA:\"\"\"\n    generate_groq(example,question)\n<\/code><\/pre>\n<p><b>Output<\/b><\/p>\n<pre class=\"wp-block-code\"><code>Calculate apple cost 3*1.20\nEqual 3.60\nCalculate orange cost 4 * 0.80 \nEqual 3.20\nAdd costs together 3.603.20\nEqual 6.80\n#### 6.80<\/code><\/pre>\n<h2 class=\"wp-block-heading\" id=\"h-limitations-of-cod\">Limitations of CoD<\/h2>\n<p>Let us now look into the limitation of CoD below:<\/p>\n<ul class=\"wp-block-list\">\n<li><b>Less Transparency :\u00a0<\/b>\u00a0As compared to other prompting techniques such as CoT, CoD has less transparency as it does not clearly provide each verbose steps which can help in debugging and understanding the flow.<\/li>\n<li><b>Increased likelihood of mistakes in intricate reasoning<\/b>: Certain problems demand thorough intermediate steps to maintain logical accuracy, which CoD may overlook.<\/li>\n<li><b>CoD\u2019s Dependency on Examples<\/b>: As we saw above for smaller models the performance drops in zero shot cases. It struggles in zero-shot scenarios, showing a significant drop in accuracy without example prompts. This is likely due to the absence of CoD-style reasoning patterns in training data, making it harder for models to grasp the approach without guidance.<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n<p>Chain of Draft (CoD) prompting presents a compelling alternative to traditional reasoning techniques by prioritizing efficiency and conciseness. Its ability to reduce latency and cost while maintaining accuracy makes it a valuable approach for real-world AI applications. However, CoD\u2019s reliance on minimalistic reasoning steps can reduce transparency, making debugging and validation more challenging. Additionally, it struggles in zero-shot scenarios, particularly with smaller models, due to the lack of CoD-style reasoning in training data. Despite these limitations, CoD remains a powerful tool for optimizing LLM performance in constrained environments. Future research and fine-tuning may help address its weaknesses and broaden its applicability.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-key-takeaways\">Key Takeaways<\/h3>\n<ul class=\"wp-block-list\">\n<li>A new, concise prompting technique from Zoom Communications, CoD reduces verbosity compared to Chain of Thought (CoT), mirroring human reasoning for efficiency.<\/li>\n<li>CoD cuts token usage by 70-90% and latency by 48-76%, potentially saving thousands monthly (e.g., $3,000 for a million queries).<\/li>\n<li>Easily applied via APIs like Gemini and Groq with minimal prompts, no model retraining needed.<\/li>\n<li>Offers less transparency than CoT and may falter in complex reasoning or zero-shot scenarios without examples.<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"h-frequently-asked-questions\">Frequently Asked Questions<\/h2>\n<div class=\"schema-faq wp-block-yoast-faq-block\">\n<div class=\"schema-faq-section\" id=\"faq-question-1743143774554\"><strong class=\"schema-faq-question\"><b>Q1.\u00a0How is CoD different from Chain of Thought (CoT)?<\/b><\/strong> <\/p>\n<p class=\"schema-faq-answer\">A. CoD generates significantly more concise reasoning compared to CoT while preserving accuracy. By eliminating non-essential details and utilizing equations or shorthand notation, it achieves a 68-92% reduction in token usage with minimal impact on accuracy.<\/p>\n<\/p><\/div>\n<div class=\"schema-faq-section\" id=\"faq-question-1743143786684\"><strong class=\"schema-faq-question\"><b>Q2.\u00a0\u00a0How can I apply Chain of Draft (CoD) in my prompts?<\/b><\/strong> <\/p>\n<p class=\"schema-faq-answer\">A. Runnable interfaces allow developers to chain functions easily,<br \/>improving code readability and maintainability. To implement CoD in your prompts, you can provide a system directive such as:<br \/>\u201cThink step by step, but limit each thinking step to a minimal draft of no more than five words. Return the final answer after a separator (####).\u201d Additionally, using one-shot or few-shot examples can improve consistency, especially for models that struggle in zero-shot scenarios.<\/p>\n<\/p><\/div>\n<div class=\"schema-faq-section\" id=\"faq-question-1743143802358\"><strong class=\"schema-faq-question\"><b>Q3.\u00a0Which tasks are best suited for Chain of Draft (CoD)?<\/b><\/strong> <\/p>\n<p class=\"schema-faq-answer\">A. CoD is most effective for structured reasoning tasks, including mathematical problem-solving, symbolic reasoning, and logic-based challenges. It excels in benchmarks like GSM8k and tasks that require step-by-step logical thinking.<\/p>\n<\/p><\/div>\n<div class=\"schema-faq-section\" id=\"faq-question-1743143817071\"><strong class=\"schema-faq-question\"><b>Q4.\u00a0How does Chain of Draft (CoD) impact cost savings compared to Chain of Thought (CoT)?<\/b><\/strong> <\/p>\n<p class=\"schema-faq-answer\">A. In paper it was mentioned that CoD can reduce token usage by 68-92%, significantly lowering LLM API costs for high-volume applications while maintaining accuracy.<\/p>\n<\/p><\/div>\n<\/p><\/div>\n<p><strong>The media shown in this article is not owned by Analytics Vidhya and is used at the Author\u2019s discretion.<\/strong><\/p>\n<div class=\"border-top py-3 author-info my-4\">\n<div class=\"author-card d-flex align-items-center\">\n<div class=\"flex-shrink-0 overflow-hidden\">\n                                    <a href=\"https:\/\/www.analyticsvidhya.com\/blog\/author\/ritika-bits\/\" class=\"text-decoration-none active-avatar\"><br \/>\n                                                                       <img decoding=\"async\" src=\"https:\/\/av-eks-lekhak.s3.amazonaws.com\/media\/lekhak-profile-images\/converted_image_oHzb1Uq.webp\" width=\"48\" height=\"48\" alt=\"Ritika\" loading=\"lazy\" class=\"rounded-circle\"\/><\/p>\n<p>                                <\/a>\n                                <\/div>\n<\/p><\/div>\n<p>                                                                                I am a professional working as data scientist after finishing my MBA in Business Analytics and Finance. A keen learner who loves to explore and understand and simplify stuff!  I am currently learning about advanced ML and NLP techniques and reading up on various topics related to it including research papers .                                                                                 <\/p>\n<\/p><\/div>\n<\/p><\/div>\n<p><h4 class=\"fs-24 text-dark\">Login to continue reading and enjoy expert-curated content.<\/h4>\n<p>                        <button class=\"btn btn-primary mx-auto d-table\" data-bs-toggle=\"modal\" data-bs-target=\"#loginModal\" id=\"readMoreBtn\">Keep Reading for Free<\/button>\n                    <\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>Recent advancements in reasoning models, such as OpenAI\u2019s o1 and DeepSeek R1, have propelled LLMs to achieve impressive performance through techniques like Chain of Thought (CoT). However, the verbose nature of CoT leads to increased computational costs and latency. A novel paper published by Zoom Communications presents a new prompting technique called Chain of Draft [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12033],"tags":[5815,917,15878,20726,66896,14550],"dealstore":[],"offerexpiration":[],"class_list":["post-164951","post","type-post","status-publish","format-standard","hentry","category-analytics","tag-blogathon","tag-chain","tag-draft","tag-gemini","tag-groq","tag-prompting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Chain of Draft Prompting with Gemini and Groq - Som2ny Network<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fivemor.com\/?p=164951\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Chain of Draft Prompting with Gemini and Groq - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"Recent advancements in reasoning models, such as OpenAI\u2019s o1 and DeepSeek R1, have propelled LLMs to achieve impressive performance through techniques like Chain of Thought (CoT). However, the verbose nature of CoT leads to increased computational costs and latency. A novel paper published by Zoom Communications presents a new prompting technique called Chain of Draft [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=164951\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-30T13:01:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/standard-prompting.webp\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"16 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fivemor.com\/?p=164951#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=164951\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"Chain of Draft Prompting with Gemini and Groq\",\"datePublished\":\"2025-03-30T13:01:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=164951\"},\"wordCount\":2599,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=164951#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/standard-prompting.webp\",\"keywords\":[\"Blogathon\",\"Chain\",\"Draft\",\"Gemini\",\"Groq\",\"Prompting\"],\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=164951#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=164951\",\"url\":\"https:\/\/fivemor.com\/?p=164951\",\"name\":\"Chain of Draft Prompting with Gemini and Groq - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=164951#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=164951#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/standard-prompting.webp\",\"datePublished\":\"2025-03-30T13:01:10+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=164951#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=164951\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=164951#primaryimage\",\"url\":\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/standard-prompting.webp\",\"contentUrl\":\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/standard-prompting.webp\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=164951#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Chain of Draft Prompting with Gemini and Groq\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fivemor.com\/#website\",\"url\":\"https:\/\/fivemor.com\/\",\"name\":\"Som2ny Network\",\"description\":\"Daily Deals\",\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fivemor.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/fivemor.com\/#organization\",\"name\":\"Som2ny Network\",\"url\":\"https:\/\/fivemor.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"width\":300,\"height\":86,\"caption\":\"Som2ny Network\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/fivemor.com\"],\"url\":\"https:\/\/fivemor.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Chain of Draft Prompting with Gemini and Groq - Som2ny Network","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fivemor.com\/?p=164951","og_locale":"en_US","og_type":"article","og_title":"Chain of Draft Prompting with Gemini and Groq - Som2ny Network","og_description":"Recent advancements in reasoning models, such as OpenAI\u2019s o1 and DeepSeek R1, have propelled LLMs to achieve impressive performance through techniques like Chain of Thought (CoT). However, the verbose nature of CoT leads to increased computational costs and latency. A novel paper published by Zoom Communications presents a new prompting technique called Chain of Draft [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=164951","og_site_name":"Som2ny Network","article_published_time":"2025-03-30T13:01:10+00:00","og_image":[{"url":"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/standard-prompting.webp","type":"","width":"","height":""}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"16 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fivemor.com\/?p=164951#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=164951"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"Chain of Draft Prompting with Gemini and Groq","datePublished":"2025-03-30T13:01:10+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=164951"},"wordCount":2599,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=164951#primaryimage"},"thumbnailUrl":"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/standard-prompting.webp","keywords":["Blogathon","Chain","Draft","Gemini","Groq","Prompting"],"articleSection":["Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=164951#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=164951","url":"https:\/\/fivemor.com\/?p=164951","name":"Chain of Draft Prompting with Gemini and Groq - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=164951#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=164951#primaryimage"},"thumbnailUrl":"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/standard-prompting.webp","datePublished":"2025-03-30T13:01:10+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=164951#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=164951"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=164951#primaryimage","url":"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/standard-prompting.webp","contentUrl":"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/standard-prompting.webp"},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=164951#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"Chain of Draft Prompting with Gemini and Groq"}]},{"@type":"WebSite","@id":"https:\/\/fivemor.com\/#website","url":"https:\/\/fivemor.com\/","name":"Som2ny Network","description":"Daily Deals","publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fivemor.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fivemor.com\/#organization","name":"Som2ny Network","url":"https:\/\/fivemor.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","width":300,"height":86,"caption":"Som2ny Network"},"image":{"@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","caption":"admin"},"sameAs":["https:\/\/fivemor.com"],"url":"https:\/\/fivemor.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/164951","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=164951"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/164951\/revisions"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=164951"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=164951"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=164951"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=164951"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=164951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}