AI Self-Correction

人工智能自校正

2024-01-16 09:30 lionbridge

本文共1125个字,阅读需12分钟

阅读模式 切换至中文

Embracing Generative AI is crucial to succeeding, especially when your competitors are doing the same for their workflows, translation, or content creation and optimization. One critical element of using Generative AI is self-correction. Unfortunately, Large Language Models (LLMs) can deliver output with inaccuracies due to a few factors. This is because the data an LLM is trained on might include problematic or wrong information. AI tools will also sometimes “hallucinate,” or make up information. To address issues in AI output, it’s possible to take “self-correction” measures into the initial set of prompts. (Some experts have also called it “self-critique” or “self-refine.) Multiple studies have tested methods that require LLMs to review their output and refine responses before delivering them. Read our blog post to learn some of the techniques people are using to implement self-correction in their AI solutions (or having their AI solutions provider do it). This blog will also cover the limitations of AI self-correction. Common AI Self-Correction Tactics These are four ways people are currently implementing AI self-correction: 1. An accuracy-focused prompt: Sometimes, adding a prompt emphasizing accuracy into the series of prompts is effective. Here is a popular one posted on X: “You are an autoregressive language model that has been fine-tuned with instruction-tuning and RLHF. You carefully provide accurate, factual, thoughtful, nuanced answers, and are brilliant at reasoning. If you think there might not be a correct answer, you say so.” 2. Turning AI tools into an expert: One way to preempt inaccuracies is to turn your AI tool into an expert less likely to make mistakes. Many users and AI service providers, including a group of GitHub developers, are creating prompts that command AI tools to act like experts. Notably, the best expert personas are the ones with the most detail about following best practices — provided they’re widely accepted. With commands that are too general, the AI tool may begin to hallucinate its content. For example, saying, “You’re an excellent career counselor,” isn’t enough. The prompts should include guidance for best practices that career counselors generally follow. Another best practice is to test the series of prompts with a task you know the answer to. This will help determine where to optimize the expert persona prompts. Sometimes, it may even make sense to develop multiple iterations of an expert persona prompt depending on the type of task. The GitHub developers made a list of 15 series of prompts they used to turn AI into an expert assistant. Though they aren’t the only ones to do this, their list is notably comprehensive. 1. Career Counselor 2. Interviewer for a specific position 3. English Pronunciation Helper 4. Advertiser 5. Social Media Manager 6. AI Writing Tutor for Students 7. Accountant 8. Web Design Consultant 9. Act as a UX/UI Developer 10. IT Architect 11. Cyber Security Specialist 12. Machine Learning Engineer 13. IT Expert 14. Generator of Excel formulas 15. Personal Chef 3. Adding “pre-hoc” or “post-hoc” prompting: It’s possible to add prompts that modify the style of AI output. Perhaps the style needs to be more formal or informal, or targeted towards highly-educated audiences or audiences with a high school-level education. If the prompts are added after the output is generated, this is called a “post-hoc prompt.” Per a recent research project from Google’s DeepMind, the best results occur with equally strong pre-hoc and post-hoc prompting. 4. Using prompts to address biases: If LLMs aren’t trained on the right data, their output may reflect the biases of the millions of people who spew hateful content on the Internet. Per a recent study by the Anthropic AI lab, it’s possible to use Reinforcement Learning from Human Feedback (RLHF) to train an LLM to produce output without (or with less) racism, ageism, misogyny, etc. Include instructions in the AI’s constitution to consider general ethical principles your team decides upon. Part of this process is adding a line into prompts that preempts the LLM from relying on harmful stereotypes or philosophies. In some cases, AI tools have been shown to begin “positively discriminating” in their output, which may even exceed expectations. Limitations of AI Self-Correction While AI self-correction measures may be powerful, studies also show that it still has limitations. The same Google DeepMind study found that LLMs sometimes actually perform worse with self-correction measures. In cases where it doesn’t impair performance, self-correction isn’t consistently effective for every series of AI prompts, especially where external sources (a calculator, code executor, knowledge base, etc.) aren’t used. For best results, self-correction measures need access to a benchmarked data set with basic truths built in. With these references, the AI tool will know when to stop its reasoning process, thus avoiding overcorrecting its output. Of course, the researchers noted that some tasks are too complex to enable providing an AI tool with these kinds of references. The same study also found that another limitation of AI self-correction occurs when multi-agent LLM applications are used. The LLM is asked to perform multiple tasks as different “agents,” or actors. The LLM generates code as one agent. Then, it also checks the code as another agent. The LLM performs a debate, with one agent taking each side. The problem occurs because the multiple agents use a form of majority voting to decide which answer is correct, thus creating a kind of echo chamber or “self-consistency,” rather than true accuracy. The Value of a Human in the Loop The limitations of AI self-correction underscore how essential a human in the loop is. AI tools can enhance translation efficiency, but they often need human intervention at some point. Perhaps a human must develop the best series of prompts, check an initial sample, or review output at the end. Self-correction measures may assist with the entire process, but can’t replace a human in the loop. To that end, it’s vital to work with AI consulting experts, like the ones at Lionbridge, who can help address the AI trust gap. They should: Minimize the risk of untrustworthy or low-quality content/output Ensure security of data from cyber-attacks or any kind of compromise Be creative and help develop new, engaging, and original content or output Check and correct for accuracy, especially for complex material that requires intensive education or expertise Never try to sell you unnecessary technology, solutions, or subscriptions Share the entire process and invite input, feedback, and customization throughout Get in touch Interested in learning how to utilize AI to automate content creation, website content optimization, or other language services? Lionbridge’s dedicated team of AI experts is ready to help. Let’s get in touch.
拥抱生成式人工智能对成功至关重要,尤其是当你的竞争对手正在为他们的工作流程、翻译或内容创作和优化做同样的事情时。使用生成式人工智能的一个关键因素是自我修正。不幸的是,由于一些因素,大型语言模型(LLMs)可能会提供不准确的输出。这是因为LLM训练的数据可能包含有问题或错误的信息。人工智能工具有时也会“产生幻觉”,或者编造信息。为了解决人工智能输出中的问题,可以在初始提示集中采取“自我纠正”措施。(一些专家也称之为“自我批判”或“自我完善”。)多项研究测试了一些方法,这些方法要求LLMs在交付之前审查其输出并完善响应。阅读我们的博客文章,了解人们正在使用的一些技术,以在他们的人工智能解决方案中实现自我纠正(或让他们的人工智能解决方案提供商这样做)。这篇博客还将涵盖人工智能自我修正的局限性。 常见的人工智能自我修正策略 以下是人们目前实施人工智能自我纠正的四种方式: 1.注重准确性的提示:有时,在一系列提示中添加一个强调准确性的提示是有效的。这里有一个流行的贴在X上: “你是一个自回归的语言模型,已经用指令调优和RLHF进行了微调。你小心翼翼地提供准确、真实、周到、细致入微的答案,并且擅长推理。如果你认为可能没有正确的答案,你就说出来。” 2.把人工智能工具变成专家:预防错误的一个方法是把你的人工智能工具变成一个不太可能出错的专家。许多用户和人工智能服务提供商,包括一群GitHub开发者,正在创建提示,命令人工智能工具像专家一样行动。值得注意的是,最好的专家角色是那些最详细地遵循最佳实践的角色——前提是它们被广泛接受。对于过于笼统的命令,人工智能工具可能会开始对其内容产生幻觉。例如,说“你是一名优秀的职业顾问”是不够的。提示应该包括职业顾问通常遵循的最佳实践指南。另一个最佳实践是用一个你知道答案的任务来测试一系列提示。这将有助于确定在哪里优化专家角色提示。有时,根据任务类型开发专家角色提示的多次迭代甚至是有意义的。GitHub开发者列出了他们用来将AI变成专家助手的15个系列提示。虽然他们不是唯一这样做的人,但他们的清单非常全面。 1.职业顾问 2.特定职位的面试官 3.英语发音助手 4.广告商 5.社交媒体经理 6.人工智能学生写作导师 7.会计 8.网页设计顾问 9.充当UX/UI开发人员 10.信息技术架构师 11.网络安全专家 12.机器学习工程师 13.信息技术专家 14.Excel公式生成器 15.私人厨师 3.添加“pre-hoc”或“post-hoc”提示:可以添加修改AI输出样式的提示。也许风格需要更正式或非正式,或者针对受过高等教育的观众或受过高中教育的观众。如果提示是在生成输出后添加的,这称为“事后提示”根据谷歌DeepMind最近的一个研究项目,最好的结果出现在同样强大的事先和事后提示下。 4.使用提示解决偏见:如果LLM没有接受正确数据的训练,它们的输出可能会反映出数百万在互联网上散布仇恨内容的人的偏见。根据Anthropic AI lab最近的一项研究,有可能使用来自人类反馈(RLHF)的强化学习来训练LLM产生没有(或较少)种族主义、年龄歧视、厌女症等的输出。在人工智能的构成中包括说明,以考虑你的团队决定的一般伦理原则。这个过程的一部分是在提示中添加一行,防止LLM依赖有害的刻板印象或哲学。在某些情况下,人工智能工具已经被证明开始在其输出中“积极辨别”,这甚至可能超出预期。 人工智能自校正的局限性 虽然人工智能的自我纠正措施可能很强大,但研究也表明,它仍然有局限性。谷歌DeepMind的同一项研究发现,LLMs有时在自我纠正措施下表现更差。在不影响性能的情况下,自我纠正并不总是对每一系列人工智能提示有效,特别是在外部来源(计算器、代码执行器、知识库等)的情况下。)都没用。为了获得最佳结果,自我纠正措施需要访问内置基本事实的基准数据集。有了这些参考,人工智能工具将知道何时停止推理过程,从而避免过度校正其输出。当然,研究人员指出,一些任务过于复杂,无法为人工智能工具提供这些类型的参考。 同一项研究还发现,当使用多智能体LLM应用程序时,人工智能自我校正的另一个限制发生了。LLM被要求作为不同的“代理”或参与者执行多项任务。 LLM作为一个代理生成代码。然后,它还作为另一个代理检查代码。 LLM进行辩论,每一方都有一名代理人。 问题的出现是因为多个代理使用一种多数投票的形式来决定哪个答案是正确的,从而产生了一种回音室或“自我一致性”,而不是真正的准确性。 人在循环中的价值 人工智能自我纠正的局限性强调了人类在循环中的重要性。人工智能工具可以提高翻译效率,但在某些时候往往需要人工干预。也许人类必须开发出最好的一系列提示,检查初始样本,或者在最后检查输出。自我纠正措施可能有助于整个过程,但不能取代循环中的人。 为此,与人工智能咨询专家合作至关重要,比如Lionbridge的专家,他们可以帮助解决人工智能信任差距。它们应: 最大限度地降低不可信或低质量内容/输出的风险 确保数据安全免受网络攻击或任何形式的危害 发挥创造力,帮助开发新的、吸引人的、原创的内容或输出 检查和纠正准确性,特别是对于需要强化教育或专业知识的复杂材料 永远不要试图向你推销不必要的技术、解决方案或订阅 共享整个过程并邀请输入、反馈和定制 取得联系 有兴趣学习如何利用人工智能来自动化内容创建、网站内容优化或其他语言服务吗?Lionbridge专门的人工智能专家团队随时准备提供帮助。让我们保持联系。

以上中文文本为机器翻译,存在不同程度偏差和错误,请理解并参考英文原文阅读。

阅读原文