No history yet

Reasoning Frameworks

Beyond Simple Instructions

Standard prompts get you standard answers. They are great for retrieving facts or summarizing text, but they often fail when a task requires multiple logical steps. To unlock an LLM's ability to reason, you need to move beyond simple instructions and guide its thinking process. The key is to make the model externalize its

We explore how generating a chain of thought -- a series of intermediate reasoning steps -- significantly improves the ability of large language models to perform complex reasoning.

This approach transforms the model from a black box that just gives an answer into a more transparent reasoner that shows its work. This single shift is one of the most powerful techniques in modern prompt engineering.

Implementing Chain-of-Thought

The simplest way to elicit reasoning is with a zero-shot prompt. By just adding a phrase like "Think step-by-step" or "Let's break this down," you can often coax the model into producing a more structured, reasoned output. This is known as and requires no examples.

For more complex or nuanced tasks, manual (or few-shot) Chain-of-Thought is more reliable. Here, you provide the model with a few examples that demonstrate the step-by-step reasoning process you want it to follow. The model then uses these examples as a template for solving your actual problem.

Q: John has 5 apples. He gives 2 to Jane and then buys 3 more. How many apples does he have?
A: John starts with 5 apples. He gives 2 to Jane, so he has 5 - 2 = 3 apples. Then he buys 3 more, so he has 3 + 3 = 6 apples. The answer is 6.

Q: A juggler has 16 balls. Half are red. He picks up 2 more red balls. How many red balls does he have now?
A: The juggler starts with 16 balls. Half are red, so there are 16 / 2 = 8 red balls. He picks up 2 more red balls, so now he has 8 + 2 = 10 red balls. The answer is 10.

Q: The school cafeteria had 23 apples. They used 20 to make pies and bought 6 more. How many apples do they have now?
A:

By providing a clear format, you're not just asking for an answer; you're teaching the model how to arrive at one. This structure significantly reduces errors in arithmetic, commonsense, and symbolic reasoning tasks.

Improving Accuracy with Self-Consistency

Chain-of-Thought is powerful, but a single reasoning path can still be flawed. is a technique that builds on CoT to improve accuracy by leveraging the model's creativity. Instead of generating just one step-by-step answer, you prompt the model to generate several different reasoning paths for the same problem.

Each path might be slightly different. For a math problem, the model might set up the equation differently or calculate the steps in another order. Once you have multiple outputs, you simply take a majority vote. If three out of five reasoning paths arrive at the answer

This method works because while a model might make a random error in one line of reasoning, it's less likely to make the same error across multiple, diverse attempts. The correct answer tends to be the most consistent outcome.

Decomposing Hard Problems

Some problems are too complex for a single Chain-of-Thought prompt. They need to be broken down into smaller, more manageable pieces. This is the idea behind —a strategy that decomposes a difficult problem into a series of simpler subproblems and then solves them sequentially.

Instead of tackling the final question head-on, you first prompt the model to identify the necessary steps. Then, you use the output of one step as input for the next. For example, to answer "What is the combined GDP of the countries that won the FIFA World Cup between 2000 and 2010?", you would first ask the model to list the winning countries for those years. Then, you'd feed that list into a second prompt asking for the GDP of each country, and finally, a third prompt to sum the results.

By focusing the model's attention on one piece of the puzzle at a time, you increase the likelihood of getting each part correct, leading to a more reliable final answer. This method allows models to solve problems that are far beyond the reach of standard prompting.

Let's test what you've learned about these reasoning frameworks.

Quiz Questions 1/5

What is the primary benefit of making an LLM externalize its reasoning process, for example by asking it to "think step-by-step"?

Quiz Questions 2/5

Which prompting technique involves generating multiple different reasoning paths for the same problem and then choosing the most common answer?

Mastering these techniques will allow you to push LLMs beyond simple question-answering and into the realm of genuine problem-solving.