SolidUI Community-Prompt word self-consistency

background

With the rise of language models that generate images from text, SolidUI wants to help people quickly build visualization tools. The visualization content includes 2D, 3D, and 3D scenes to quickly construct three-dimensional data presentation scenes. SolidUI is an innovative project that aims to combine natural language processing (NLP) with computer graphics to implement Vincent diagram functionality. By building a self-developed Vincentian graph language model, SolidUI uses the RLHF (Reinforcement Learning Human Feedback) process to realize the process from text description to graphics generation.

Point location: https://github.com/CloudOrc/SolidUI

Project mirror address: https://gitee.com/CloudOrc/SolidUI

Community official website: https://website.solidui.top

Official project address:https://github.com/CloudOrc/SolidUI-Website

Introduction to self-consistency

Self-consistency is a more advanced technique in prompt engineering, proposed by Wang et al. in 2022. It aims to improve the greedy decoding method used in chain thought prompts, producing more consistent and accurate results.

https://arxiv.org/pdf/2203.11171.pdf

working principle

Self-consistency works by sampling multiple different reasoning paths through few-shot chain thinking, then comparing all generated answers and selecting the most consistent one as the final result. Specifically, it uses chain thinking to generate multiple candidate answers for a reasoning task. Then choose the answer that appears most frequently and is the most logical, rather than simply relying on the first generated answer.

Example

We can look at an example of arithmetic reasoning. "When I was 6 years old, my sister was half the age. Now I am 70 years old. How old is my sister?" Using simple chain thinking, you might deduce the age of 35, but this is wrong. Self-consistency samples similar examples of arithmetic reasoning, linking multiple possible reasoning paths. Finally, it was found that the answer 67 years old appeared the most, so 67 years old was chosen as the final result.

## 输入
小明有5个苹果,他把两个苹果给了妈妈,请问小明还剩下多少个苹果?
当我6岁时,妹妹一半年龄,现在我70岁,妹妹多大?

## 输出
好的,让我来思考一下:
小明有5个苹果,给了妈妈2个,所以小明还剩下5 - 2 = 3个苹果。

对于第二个问题:
我现在70岁,当我6岁时,妹妹一半年龄,也就是3岁。
那么我每长1岁,妹妹也长1岁。
我从6岁到70岁,一共长了70 - 6 = 64岁。
那么妹妹也从3岁长到3 + 64 = 67岁。

所以答案是:
小明还剩3个苹果。
我妹妹现在67岁。

Directly enter the second question, how old is your sister, and the calculation fails. Find a simple example of Xiao Ming's Apple problem, let the model learn this way of thinking, and calculate the second question after solving the first question according to the link. Self-consistency , to ensure the reasoning results.

Conclusion

Self-consistency can correct errors in chain thinking and generate more accurate and reliable output by sampling multiple reasoning paths and selecting the most consistent answer. This is one of the more advanced techniques in prompt engineering.

If you become a contributor

  • Official documentation contribution. Participate in community contributions by discovering document deficiencies, optimizing documents, and continuously updating documents. Through document contribution, developers can become familiar with how to submit PR and truly participate in community building. Reference strategy:https://github.com/CloudOrc/SolidUI/discussions/54
  • Code contribution. We have sorted out the simple and easy-to-start tasks in the community, which are very suitable for newcomers to make code contributions. Please check the newbie task list:https://github.com/CloudOrc/SolidUI/issues/12
  • Content contribution: Publish content related to SolidUI open source components, including but not limited to installation and deployment tutorials, usage experience, case practices, etc., in any form, please submit to the assistant. For example:https://github.com/CloudOrc/SolidUI/issues/10
  • Community Q&A: Actively answer questions in the community, share technology, help developers solve problems, etc.;
    Others: Actively participate in community activities, become a community volunteer, help community publicity, Provide effective suggestions for community development, etc.;

Guess you like

Origin blog.csdn.net/qq_19968255/article/details/132219525