Skip to main content
  1. Posts/

Self-Consistency

·246 words·2 mins· loading · loading · ·
 Author
Curious

Self-Consistency
#

Prompt:

“Please solve the following logical reasoning problem using the Self-Consistency Prompt technique. Generate at least three distinct reasoning paths, and then select the most consistent answer as the final conclusion.

Question: If all birds can fly, and penguins are a type of bird, can penguins fly?

Generate your reasoning paths and choose the most consistent answer.”

Reasoning Path 1:

  1. Premise: All birds can fly.
  2. Premise: Penguins are a type of bird.
  3. Conclusion: Therefore, penguins can fly.

Reasoning Path 2:

  1. Premise: All birds can fly.
  2. Premise: Penguins are a type of bird.
  3. Observation: However, penguins are known to be flightless.
  4. Conclusion: Therefore, penguins cannot fly.

Reasoning Path 3:

  1. Premise: All birds can fly.
  2. Premise: Penguins are a type of bird.
  3. Observation: Penguins have adapted to a lifestyle that does not include flying.
  4. Conclusion: Therefore, penguins cannot fly.

Self-Consistency Prompt Selection:

Upon reviewing the reasoning paths, Path 1 concludes that “penguins can fly,” while Paths 2 and 3 conclude that “penguins cannot fly.” Given that Paths 2 and 3 are more consistent with the known biological facts about penguins, the most consistent answer is “penguins cannot fly.”

Final Conclusion:

Penguins cannot fly.

[!IMPORTANT]

Self-Consistency use in llm intern to keep logic consistency,Top-k parameters uses in restrinct output format of llm

Think of Self-Consistency as helping the LLM think more logically like a human would debate different options, while Top-k acts like a filter, selecting the best words from a pool to make the output clearer.