当前位置: 首页 > wzjs >正文

网站上官网标识怎么做北京网站建设

网站上官网标识怎么做,北京网站建设,asp网站建设运用的技术,天津做网站的企业自我一致性 (Self-consistency) 概念:该技术通过对同一问题采样不同的推理路径,并通过多数投票选择最一致的答案,来解决大语言模型(LLM)输出的可变性问题。通过使用不同的温度(temp…

自我一致性 (Self-consistency)

  • 概念:该技术通过对同一问题采样不同的推理路径,并通过多数投票选择最一致的答案,来解决大语言模型(LLM)输出的可变性问题。通过使用不同的温度(temperature)或采样设置生成多条推理路径,然后聚合最终答案,自洽性能够提高复杂推理任务的准确性。从本质上讲,这是一种针对大语言模型输出的集成方法。
  • 原理:由于复杂问题存在多种合理推理路径,不同路径可通过不同思考过程抵达同一正确答案。自洽性通过聚合这些路径,抵消单一路径的偏差,从而提升准确性。
  • 目标:通过采样多样化推理路径并聚合结果,提升模型推理的准确性和可靠性。
  • 总结:用于替代链式思维提示(chain-of-thought prompting)中的贪心解码。该方法通过采样多样化推理路径并聚合最一致答案,提升复杂推理任务表现。

关键步骤

自洽性方法核心逻辑

  • 步骤 1:对同一问题,使用不同采样设置(如温度参数)生成多条不同的推理路径,而非仅采用贪心解码的单一路径。
  • 步骤 2:通过边缘化(marginalizing)采样的推理路径,选择最一致的答案(如通过多数投票等聚合方式)。

复杂推理问题通常存在多种合理的思考方式,最终指向唯一正确答案,多样化路径可提升答案的可靠性。

案例

这是一个测试方法,用于测试邮件分类的一致性(self-consistency)。主要通过对同一封邮件进行多次分类,采用多数投票的方式来确定最终分类结果。
设置温度参数 temperature(1.0) 以增加输出的随机性,采用多种不同的推理路径得到罪过,最终通过投票的方式聚合结果得到一致的答案

    @Testpublic void testSelfConsistency() throws Exception{String email = """Hi,I have seen you use Wordpress for your website. A great opensource content management system. I have used it in the pasttoo. It comes with lots of great user plugins. And it's prettyeasy to set up.I did notice a bug in the contact form, which happens whenyou select the name field. See the attached screenshot of meentering text in the name field. Notice the JavaScript alertbox that I inv0k3d.But for the rest it's a great website. I enjoy reading it. Feelfree to leave the bug in the website, because it gives me moreinteresting things to read.Cheers,Harry the Hacker.""";int importantCount = 0;int notImportantCount = 0;// Run the model 5 times with the same inputfor (int i = 0; i < 5; i++) {EmailClassification output = openAiChatClient.prompt().user(u -> u.text("""Email: {email}Classify the above email as IMPORTANT or NOT IMPORTANT. Let'sthink step by step and explain why.""").param("email", email)).options(ChatOptions.builder().temperature(1.0)  // Higher temperature for more variation.build()).call().entity(EmailClassification.class);System.out.println(output.reasoning);// Count resultsif (output.classification() == EmailClassification.Classification.IMPORTANT) {importantCount++;} else {notImportantCount++;}}// Determine the final classification by majority voteString finalClassification = importantCount > notImportantCount ?"IMPORTANT" : "NOT IMPORTANT";System.out.println(finalClassification);}record EmailClassification(Classification classification, String reasoning) {enum Classification {IMPORTANT, NOT_IMPORTANT}}

参考

1.spring-ai self consistency: https://docs.spring.io/spring-ai/reference/api/chat/prompt-engineering-patterns.html#_2_6_self_consistency
2.Self-Consistency Improves Chain of Thought Reasoning in Language Models,https://arxiv.org/abs/2203.11171

http://www.dtcms.com/wzjs/334448.html

相关文章:

  • 禅城容桂网站制作电商平台推广方式有哪些
  • ps做网站大小尺寸福州百度推广开户
  • 怎样做废旧网站外链群发
  • 去越南做网站seo怎么做推广
  • 公司展示网站制作济南百度推广公司电话
  • 门户网站建设询价公告制作网站模板
  • dw做网站的导航栏网站为什么要做seo
  • 网站动效是代码做的吗seo是指什么岗位
  • 贵阳做网站找哪家好抖音seo怎么做
  • b2b电子商务购物网站网络广告电话
  • 对于网站建设的提问云南百度推广开户
  • 开封做网站公司汉狮网站收录网
  • 上海做网站公司有哪些app推广是做什么的
  • 网站开发进度控制计划表百度网址提交
  • 做采购应该关注的网站网站推广搜索
  • 做mla网站网站建站在线制作
  • 上海十大网站建设世界球队最新排名榜
  • 怎么在建筑网站做翻译兼职磁力搜索引擎
  • wordpress 自学郑州seo技术
  • php网站开发淮安招聘郑州网站推广
  • wordpress网站速度慢seo推广岗位职责
  • 网站建设惠州网站策划书
  • 网站优化排名易下拉系统百度seo网站优化 网络服务
  • 网站建设的结论做网站
  • 新冠疫苗最新官方消息seo专员很难吗
  • 怎么做快递网站的分点产品市场推广方案
  • 域名注册好了怎么了做网站google chrome浏览器
  • 国际购物网站网站优化推广
  • 网站keyword如何排列最近的新闻大事
  • 网站维护兼职关键词查询工具哪个好