Self-consistency is an advanced method to improve prompt engineering by finding the most reliable answer through multiple tries. Instead of using one straightforward answer, we generate multiple possible answers by trying different ways of thinking. Then, we choose the answer that appears most consistently across those attempts. This method works well for tasks like math problems and common-sense questions.

Let’s break it down with an example:

Example:
You ask:
“When I was 6 years old, my sister was half my age. Now I’m 70. How old is my sister?”

Answer:
35

That answer is wrong. But we can improve it using self-consistency by trying several approaches and then picking the most consistent answer.

Here’s how we can try this out using simpler math examples first:

Few Examples:

1. Tree planting:
   Question: There are 15 trees in the grove. After planting new trees, there are 21 trees. How many trees were planted?
   Answer: 21 - 15 = 6 trees.

2. Cars in a parking lot:
   Question: There are 3 cars in the parking lot. Two more cars arrive. How many cars are there now?
   Answer: 3 + 2 = 5 cars.

3. Chocolates:
   Question: Leah had 32 chocolates, and her sister had 42. If they ate 35, how many chocolates are left?
   Answer: 32 + 42 - 35 = 39 chocolates.

Now let’s return to the original problem about ages, and try different approaches:

Question:
When I was 6 years old, my sister was half my age. Now I’m 70. How old is my sister?

Possible Answers:

1. Answer 1:
   When I was 6, my sister was 3 (half of my age). Now that I am 70, my sister is 70 - 3 = 67.

2. Answer 2:
   When I was 6, my sister was 3. Now I’m 70, so she’s 70 - 3 = 67 years old.

3. Answer 3 (Incorrect):
   When I was 6, my sister was 3. Now I’m 70, so she must be 70/2 = 35 (this is wrong).

By comparing these, we see that answers 1 and 2 both give 67, which makes it the most consistent answer. That’s how self-consistency helps in choosing the right response—by finding the answer that shows up the most frequently from different reasoning paths.

Takeaway: Self-consistency improves accuracy by considering multiple approaches and choosing the answer that consistently comes up as the best option.