0%

2022年随着ChatGPT的大火而结束,最近一年的时间各巨头相继推出了许多表现出色的对话系统,有意思的是大家前进的方向不谋而合,不再专注模型结构和规模,而转向实用性:如何让一个对话系统更有用、更安全、更理解用户意图?

对话系统在过去一年里的主要提升得益如下三点:

  • 大模型:对话系统的基础,规模大才有足够的通用表示能力
  • 从人工反馈学习 (RLHF):通过人工标注不同模型输出,使模型更好地与用户意图align,甚至更小的模型可达到同样效果
  • 搜索API:使回复有所参考,内容更具体更有用,避免胡说八道 (hallucination)

Meta AI在2022年8月发布了新一代的对话系统 BlenderBot 3,希望通过这样一个公开的demo收集更多的真实数据来改进对话系统,使它变得更安全、更有用。

BlenderBot 3: A 175B parameter, publicly available chatbot that improves its skills and safety over time

BlenderBot 3: a deployed conversational agent that continually learns to responsibly engage

BlenderBot 3 (BB3) 只对在美国的成人开放,只用英文对话:

We present BlenderBot 3 (BB3), an open-domain dialogue model that we have deployed as an English speaking conversational agent on a public website accessible by adults in the United States.

此研究的主要目的与 Sparrow 最接近,使对话更responsible & useful:

The goal of this research program is then to explore how to construct models that continue to improve from such interactions both in terms of becoming more responsible and more useful.

这个tech report包括了BB3部署的细节,包括UI设计,本文主要关注模型部分。

Sparrow是DeepMind在今年9月底发布的对话系统,主打的点在"helpful, correct, and harmless"。总体来看,思路也是"alignment",即让对话机器人的回复与用户的意图更贴合。在技术路线上,也是采用reinforcement learning from human feedback,通过定义一批规则,让模型更好地向期望的对话方向推进; 此外,对于事实型的问题,参考搜索出的内容给出回复。

Building safer dialogue agents

Improving alignment of dialogue agents via targeted human judgements

ChatGPT火爆全网,要是能接到自己的微信公众号后台,岂不美哉?

想必有此想法的同志不止我一人,上周末就研究了一下,有几个问题需要解决。

首先就是ChatGPT API,最关键的问题没有之一,OpenAI并没有官方API支持。不过github上早有人反向工程破解了此API,Python实现:

WebGPT是OpenAI在2021年底发布的解决long-form quesion-answering (LFQA) 的方案。比InstructGPT的提出稍早一些。

WebGPT: Improving the Factual Accuracy of Language Models through Web Browsing

WebGPT: Browser-assisted question-answering with human feedback

WebGPT想解决什么问题?让开放域QA回复更长更可靠。

A rising challenge in NLP is long-form question-answering (LFQA), in which a paragraph-length answer is generated in response to an open-ended question. LFQA systems have the potential to become one of the main ways people learn about the world, but currently lag behind human performance.

整个圈子最近都被ChatGPT出色的对话和Coding能力惊艳到了,前面写了篇文章简析了下其原理,虽然看起来直观,但国内的对话水平与其差距确非一日之功。下面的知乎回答深以为然:

Why China Doesn’t Have ChatGPT

ChatGPT: Optimizing Language Models for Dialogue

既然大家都致力于发掘ChatGPT厉害的地方,就来找找它的不足吧。

最近ChatGPT火爆出圈,一众朋友发来各种网红文问我怎么看。ChatGPT的模型与InstructGPT一样,只是数据收集方式有区别。而InstructGPT的提出已差不多有一年了,只不过最近才引起大家的注意。其实,今年已经有不少工作是延续InstructGPT对提升模型效果的,如 Diamonte ,参考了human feedback的思路,但将RL的方案替换成了额外的loss fuction项; WeLM ,参考了人工编写prompt模板训练大规模语言模型。

话不多说,来看看原始的InstructGPT是如何打败大模型的。原始Paper很长,有68页,而事实上核心思想并不复杂。(PS: 现在训练个大模型要不写个50页以上的Paper,都对不起咱烧的那钱!)

Training language models to follow instructions with human feedback

Aligning Language Models to Follow Instructions

InstructGPT指出,模型并非越大越好:

Making language models bigger does not inherently make them better at following a user’s intent. For example, large language models can generate outputs that are untruthful, toxic, or simply not helpful to the user.

所以InstrcutGPT希望通过人工反馈让语言模型与用户意图更加align

We show an avenue for aligning language models with user intent on a wide range of tasks by fine-tuning with human feedback.

最终训练出来1.3B的InstructGPT模型,人工评测比175B的GPT-3要更好:

In human evaluations on our prompt distribution, outputs from the 1.3B parameter InstructGPT model are preferred to outputs from the 175B GPT-3, despite having 100x fewer parameters.

来个好玩的,遇到过 git reset --hard 来回翻烧饼的事儿么?每reset一次,文件内容就更改一次,像鬼打墙一样。不信可以在Windows机器上clone下这个repo:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
D:\$ git clone https://github.com/finisky/git-case-demo.git
Cloning into 'git-case-demo'...
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 11 (delta 0), reused 8 (delta 0), pack-reused 0
Unpacking objects: 100% (11/11), 1.85 KiB | 126.00 KiB/s, done.
warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:

  'File.txt'
  'file.txt'

然后就会发现刚拉的main分支都不干净(橙色),而且git reset --hard也失效了,仔细看才发现,每reset一次,会在大写 File.txt 和小写 file.txt 之间切换,神奇不?

在一篇老文 # 迁移Hexo博客到GitHub Pages 中提到:

GitHub Pages可能是个单行线,只能迁出,不好再迁出了。简单研究了一下文档,它不允许用户修改Server配置,所以看起来无法完成301重定向。

但在迁移博客时,301重定向必不可少,它是保证站点迁移不损失搜索排名的关键所在。具体来说,在迁移到新站点之后,需要 手动修改 Google Search Console 的配置 :

Do you lose credit for links when you redirect to new URLs?
No, 301 or 302 redirects do not cause a loss in PageRank

所以如何才是无损排名迁移 GitHub Pages 的正确方式?

今天来聊聊老板喜欢什么样的下属。这个问题其实因老板而异,工作这些年见过各种风格的老板,但不论什么风格,靠谱和有能力的下属都是重点培养对象。我们先从老板的角度,简单分析下作为下属可以从哪些方面提升这些能力。

Knowledge Grounded Conversation (KGC),就是基于知识的对话生成,与不使用知识的对话生成相比,生成的回复更有信息量,可更好地与用户互动。

本文不是KGC的综述,所谓漫谈,则是比较随性地聊聊这个方向的代表工作,顺带简单梳理其发展脉络。

之前 WeLM的文章 探讨了微信大语言模型的原理。同时,WeLM开放了API:https://welm.weixin.qq.com/docs/api/ ,有幸申请到了API Token,将其接入了微信公众号Finisky Garden,聊天机器人取名小菲,大家可以来试试~

一个看着非常简单的App:手机敲木鱼,居然能在App Store上评分4.8,十几万的评论,还有App内购买赚钱,刷新认知不?

这年头多少人绞尽脑汁做App都无人理睬,反倒被这么个极简的玩意儿割了韭菜,原因还是它抓住了用户的痛点。

Google今年发布的聊天机器人LaMDA确实惊艳,之前一个Google员工与它对话后,声称它已经有了自我意识,还上了热搜。今天就来看看这机器人背后的原理是什么。

关键词: 大模型,高质量人工标注数据。

LaMDA: Language Models for Dialog Applications

论文的标题很大,有50多个作者,挺有意思。

今天来看看这篇 ACL2022 的文章:

[ACL2022] Leveraging Similar Users for Personalized Language Modeling with Limited Data

解决的问题很容易理解,个性化语言模型在用户刚加入时缺少数据的冷启动问题:

Personalized language models are designed and trained to capture language patterns specific to individual users.

However, when a new user joins a platform and not enough text is available, it is harder to build effective personalized language models.

思路也比较直接,使用新用户的少量数据在已有用户中找到相似的用户,然后用相似用户的数据进行语言模型的训练,从而解决数据稀疏的问题。

实验论文,提出了三种不同的指标来进行用户相似度计算,实验证明 user embedding + interpolate model效果最好。

开卷有益是一个成语,最早出自《与子俨等疏》。 意思是读书总有益处。常用以勉励人们勤奋好学,多读书就会受益。

现在这年头,出书不要太容易,烂书也是出奇的多,开卷有益这词儿已经不适用了。就随口说说我最近翻过的几本烂书:《断舍离》,《组织的力量》,《底层逻辑》。

今天来看看这篇 ACL2022 的文章:

[ACL2022] Beyond Goldfish Memory: Long-Term Open-Domain Conversation

问题比较清楚,提升长期开放域对话的效果。题目用到一个梗:超越金鱼的7秒记忆,可以看出论文要解决的问题是跨越数小时甚至数天的会话。

注意: 这里是“长期” (long-term) 对话,不是 “长程”对话,即对话时间跨度比较长的对话。

本文同时发布了一个人与人进行长期对话的数据集 Multi-Session Chat (MSC),其中双方通过之前的会话互相了解对方的喜好,并在之后的对话中得以体现。

在长期对话中,使用retrieval-augmented的方式,结合对上下文对话的摘要,可以达到超越传统encoder-decoder架构的模型效果。