[LLM+AIGC] 01.应用篇之中文ChatGPT初探及利用ChatGPT润色论文对比浅析(文心一言 | 讯飞星火)

近年来,人工智能技术火热发展,尤其是OpenAI在2022年11月30日发布ChatGPT聊天机器人程序,其使用了Transformer神经网络架构(GPT-3.5),能够基于在预训练阶段所见的模式、统计规律和知识来生成回答,还能根据聊天的上下文进行互动,真正像人类一样来聊天交流以及完成复杂的NLP任务。基于此,为更好地学习前沿AI知识,了解LLM和AIGC应用实战,本人在忙完博士学业后,立刻开启了《LLM+AIGC》专栏,一方面作为在线笔记记录和分享自己的学习过程,另一方面期望帮助更多初学者以及对LLM感兴趣的同学。您的关注、点赞和转发就是对秀璋最大的支持,知识无价人有情,希望我们都能在人生路上开心快乐、共同成长。

该系列主要涵盖三方面:

  • 原理篇——以原理介绍和论文阅读为主
  • 实战篇——以编程实现和构建自制ChatGPT为主
  • 应用篇——以应用实践和API、Prompt探索为主

第一篇文章主要是ChatGPT应用初试,简单介绍什么是大语言模型(LLM)和人工智能生成内容(AIGC),利用中文ChatGPT实现英文论文润色,并与传统英文润色和语法校对进行比较。基础性文章,希望对您有所帮助!且行且珍惜,继续加油,提前祝大家中秋节快乐。O(∩_∩)O

文章目录

  • 一.什么是LLM和AIGC
  • 二.传统英文翻译方式
    • 1.英文翻译
    • 2.grammarly英文校对
  • 三.中文ChatGPT小试牛刀
    • 1.文心一言
    • 2.讯飞星火
    • 3.其它
    • 4.New bing及ChatGPT推荐
  • 四.中文ChatGPT润色尝试
    • 1.什么是Prompt
    • 2.论文润色Prompt
    • 3.润色示例
  • 五.结束语

一.什么是LLM和AIGC

大语言模型(Large Language Model,LLM) 是指使用大量文本数据训练的深度学习模型,可以生成自然语言文本或理解语言文本的含义。大语言模型可以处理多种自然语言任务,如文本分类、问答、对话等,是通向人工智能的一条重要途径。下图是艾瑞咨询研究院绘制的大语言模型改变数字产业生态路线图,非常好地展示了大语言模型相关的技术及应用。

  • 参考及推荐文章:https://36kr.com/p/2211610470512001

此外,大语言模型已渗透至各行各业,常见应用讴歌包括搜索引擎(如bing、google)、办公软件、对话式AI、智能问答、企业服务应用(如客服)、垂直领域(如医学)等。

生成式人工智能(Artificial Intelligence Generated Content,AIGC) 是指基于生成对抗网络、大型预训练模型等人工智能的技术方法,通过已有数据的学习和识别,以适当的泛化能力生成相关内容的技术。AIGC技术的核心思想是利用人工智能算法生成具有一定创意和质量的内容。通过训练模型和大量数据的学习,AIGC可以根据输入的条件或指导,生成与之相关的内容。

常见应用如下:

  • 文字类 ChatGPT:AI聊天机器人,可以通过自然语言与其对话。
  • 文字类 Jasper.ai:AI写作助手,可以自动为企业客户写广告、电子邮件、产品描述等。

  • 图像类:基于开源的stable diffusion模型(2022年发布的深度学习文生图模型)生成的AI图像,如Civitai网站,另外Midjourney的AI绘画产品效果也不错,再如DALL·E绘画产品等,包括一些国产生成图像网站。后续会分享如何生成自己的卡通头像。
    – 推荐原理文章:人工智能Ai画画——stable diffusion 原理和使用方法详解 – 陈老师

  • 音乐类:根据提示词和描述生成动听的音乐,视频配音等,如Mubert.com。
  • 视频类:利用AI来创造和生成视频,包括视频生成的具体流程,常见的如物体追踪(CV领域典型研究问题),再比如通过文字描述来改变视频、人脸替换等。代表作“FaceForensics++: Learning to Detect Manipulated Facial Images”,提出四种主流的视频换脸技术,并重点讲解视频质量(清晰度)对于伪造面部检测的影响,包括:
    – 面部表情操纵:Face2Face
    – 面部身份操纵:DeepFakes,FaceSwap ,NeuralTextures
    – 论文地址:https://arxiv.org/abs/1901.08971

  • 游戏类:可以使用ChatGPT与NPC自由对话,生成不同的游戏关卡。
  • 影视动漫类:很多环节可以被AI替代,比如剧本、特效、编剧等。
  • 教育媒体类:知识获取和内容产出会更高效,但行业也会受到一定影响。比如博客问答、博客撰写的影响就很大,以后影响会更大,后续也会带来版权、洗稿、内容泛滥等问题。

最后,给出ChatGPT的发展历史及基本思路。下图展示RLHF的(论文 TAMER:Training an Agent Manually via Evaluative Reinforcement )基本步骤:

  • 预训练一个语言模型
  • 收集对比数据并训练一个奖励模型
  • 利用强化学习微调语言模型

ChaptGPT会结合提示学习(Prompt Learning)实现,通过问题、Prompts、数据集来生成回答,整个过程通过Fine Tuning和Prompt Tuning实现对预训练模型的权重微调(GPT3.5),从而提升性能。

整个发展历程如下图所示,推荐大家阅读“快乐小码农”的博客。

  • 一文详解 ChatGPT:背后的技术,数据,未来发展

温馨提示:
本文主要以应用尝试为主,更多原理知识随着作者后续学习深入,再对其进行总结和归纳。该部分也仅简单描述相关问题。

二.传统英文翻译方式

假设存在一段系统安全方向需要翻译的文本,如下所示:

传统APT攻击检测主要通过构建规则,利用安全人员逆向分析提取特征来实现同源分析及检测,典型技术包括特征值检测技术、校验和检测技术、启发式检测技术和主动防御技术[8-9]。然而,先前的方法过度依赖安全专家经验,规则和知识库匹配较难准确识别APT攻击的行为,其自动化和智能化程度较低,并且在面对具有混淆、加壳、逃逸和欺骗技 术的恶意软件时,会进一步降低检测的准确率。

1.英文翻译

常见的翻译软件包括Google、有道、bing、DeepL等,整体效果各有优劣,但准确度均存在一定误差。具体翻译如下:

(1) 有道翻译

请添加图片描述

Traditional APT attack detection mainly realizes homology analysis and detection by constructing rules and using reverse analysis of security personnel to extract features. Typical technologies include eigenvalue detection technology, checksum detection technology, heuristic detection technology and active defense technology [8-9]. However, previous methods rely too much on the experience of security experts, rules and knowledge base matching is difficult to accurately identify APT attack behavior, its degree of automation and intelligence is low, and in the face of malware with confusion, shell, escape and deception techniques, will further reduce the detection accuracy.

(2) Google翻译

Traditional APT attack detection mainly identifies malicious attacks or analyzes attack behaviors by constructing rules, or security personnel use reverse analysis to extract features. Typical detection techniques include characteristic value detection, checksum detection, heuristic detection and active defense technology [8-9]. However, previous methods rely too much on security expert experience, rules, and knowledge bases, making it difficult to accurately identify the behavior of APT attacks, and the degree of automation and intelligence of existing methods is low. Existing methods will further reduce the accuracy of detection in the face of malware with obfuscation, packing, evasion and deception techniques.

(3) DeepL翻译

  • https://www.deepl.com/

请添加图片描述

总结: 由上图可知,在翻译过程中,某些专有名词、语序及表述均存在不准确的地方。

2.grammarly英文校对

接着我们利用Grammarly软件对英文进行校对。

请添加图片描述

修改后的内容如下图所示,除了语法校正外,也增加部分专业词汇。譬如:

  • 安全人员 -> security analysts utilize
  • 先前方法的自动化和智能程度低 -> lack … capabilities

Traditional APT attack detection identifies malicious attacks or analyzes attack behaviors by constructing rules, or security analysts utilize reverse analysis to extract features. Typical detection techniques include characteristic value detection, checksum detection, heuristic detection, and active defense technology [8-9]. However, the previous methods rely too much on the experience of security experts, rules, and knowledge bases, making it difficult to accurately identify APT attacks’ behavior. In addition, the existing methods lack automatic and intelligent detection capabilities, and they further reduce detection accuracy when facing malware with obfuscation, packing, evasion, and deception techniques.

总结: 尽管相比于翻译软件,其描述取得一定改进。然而,整个描述仍然存在一些问题,比如“特征值检测技术、校验和检测技术、启发式检测技术”可以修改为“signature-based detection, checksum-based detection, heuristic detection”,再比如英文通常会说“However, these traditional methods have some limitations…”,甚至是“state-of-the-art”来表现现有先进方法。

  • 中文一定要按照英文的表达方式进行重新整理
  • 专业名词一定要翻译准确
  • 大家写论文更建议学习顶会顶刊论文,按照英文的习惯逐句进行撰写,而不是翻译

三.中文ChatGPT小试牛刀

在利用ChatGPT进行润色之前,我们先介绍中文ChatGPT的常用方法。以最近非常火的网图为例,中文ChatGPT主要应用如下:

1.文心一言

来源百度,官方网址:

  • https://yiyan.baidu.com/

其运行的主界面如下图所示:

请添加图片描述

(1) 首先我们对其进行简单提问。

  • 请问什么是恶意代码分析?

请添加图片描述

(2)对其进行编程提问。

  • 请给出一段Python语言的代码,实现对[9, 5, 2, 6, 1, 4]的快速排序。

请添加图片描述

生成代码如下:

def quick_sort(arr):  
    if len(arr) <= 1:  
        return arr  
    else:  
        pivot = arr[len(arr) // 2]  
        left = [x for x in arr if x < pivot]  
        middle = [x for x in arr if x == pivot]  
        right = [x for x in arr if x > pivot]  
        return quick_sort(left) + middle + quick_sort(right)  
  
numbers = [9, 5, 2, 6, 1, 4]  
sorted_numbers = quick_sort(numbers)  
print(sorted_numbers)

(3)接下来给出一个更为复杂的问题。

  • 本人是一个简体中文windows10的用户,现需要一个bat格式的批量重命名脚本,我希望以如下格式来命名: 项目名称-创建日期-文件编号,其中创建日期只要月和日就好,不要年份,文件编号只需两位数编号,如01或15。这个脚本,我希望可以直接双击打开运行,打开之后先让我输入文件夹路径,我输入之后回车,再问我项目名称,然后我输入完,回车,就帮我执行重命名操作,并自动退出脚本。

生成的代码如下:

@echo off  
setlocal  
  
set /p folder_path=请输入文件夹路径:   
set /p project_name=请输入项目名称:   
  
set "counter=0"  
for %%F in ("%folder_path%*") do (  
    set /a "counter+=1"  
    set "file_name=%%~nxF"  
    set "extension=%%~xF"  
    set "new_file_name=%project_name%-%%~tF-!counter:~-2!!extension!"  
    ren "%%F" "!new_file_name!"  
)  
  
echo 重命名完成。  
pause

文心全景框架如下图所示:

此外,读者还可以尝试插件开发。

请添加图片描述

总结: 文心一言尽管能实现一定程度的智能问答,但也存在一些问题。比如“反向工程”应修改为更加准确的“逆向工程”,再如恶意代码分析的这几个步骤不能简单的罗列,其描述也存在不准确的问题,动态分析和静态分析可归为一类。在代码方面效果还不错,能够生成直接运行的快速排序代码,但仍然存在需要提升的地方,比如复杂逻辑的代码。

2.讯飞星火

来源科大讯飞,官方网址:

  • https://xinghuo.xfyun.cn/

请添加图片描述

其运行的主界面如下图所示:

请添加图片描述

(1)首先我们对其进行简单提问。

  • 请问什么是恶意代码分析?

请添加图片描述

(2)对其进行编程提问。

  • 请给出一段Python语言的代码,实现对[9, 5, 2, 6, 1, 4]的快速排序。

(3)接下来给出一个更为复杂的问题及输出结果。

总结: 讯飞回答相对简洁,同样能实现各种功能。比如,在论文润色方面,文心一言润色后相对啰嗦,而讯飞回答会直接给出答案,当然前者会告诉你为什么这样,适用于初学者理解;后者更方便解决实际问题,见人见面。

3.其它

还有其它的中文应用,除了大公司还有一些小团队或个人的尝试。比如:

  • https://chatgpt.611ai.com/

4.New bing及ChatGPT推荐

当然还有两个非常重要的应用推荐,即——New bing和ChatGPT。

读者在使用过程中会遇到部分问题,需要学会独立解决喔。

四.中文ChatGPT润色尝试

最后,我们将尝试利用中文ChatGPT对前面的句子进行润色。

1.什么是Prompt

有人说,Prompt(提示词)是AI 2.0时代打开大模型能力的金钥匙,它能够大大的提高现有工作的小珞,在百度内部沟通会中,李彦宏预测“十年后全世界所有工作当中50%的内容恐怕都是写Prompt”。随后,衍生出提示学习(Prompt Learning)。

什么是Prompt(提示)。类似于搜索引擎,根据输入就可以给出对应的提示,利用提示让人想起具体的事情。提示学习将这种模式植入到大语言模型训练中,类似于激发人类一样来激发大语言模型的学习能力。

  • Prompt类似于给预训练模型一个提示或线索,更好地理解人类的问题,帮助模型实现AI生成式应用

下图是浙大许文豪老师,非常棒地解释了什么是Prompt。如果把大语言模型具象成一个员工,那Prompt提示词则好比是你给员工下的指令,给出指令越详细,员工执行的结果就越好。

  • 参考和推荐资料:https://www.bilibili.com/video/BV1Rj41117gG

Prompt作为一种用于与人工智能模型进行交互的文本输入方式,它可以帮助用户更容易地与模型进行对话、提问或请求特定的信息。典型的应用场景如下:

常见的提示词框架如下:

2.论文润色Prompt

在英文润色中,常见的Prompt如下(后续会长期更新),参考Google和知乎(见后)。

  • I need you to act as a professional English paper teacher, please help me to improve my expression in the style of academic writing. Here is my expression:
  • Please continue to help me to improve my expression in the style of the journal Nature.
  • Please keep assisting me in improving my expression to the highest AJE service standards.
  • Paraphrase the text using more academic and scientific language. Use a neutral tone and avoid repetitions of words and phrases.

3.润色示例

I need you to act as a professional English paper teacher, please help me to improve my expression in the style of academic writing. Here is my expression:

Traditional APT attack detection identifies malicious attacks or analyzes attack behaviors by constructing rules, or security analysts utilize reverse analysis to extract features. Typical detection techniques include characteristic value detection, checksum detection, heuristic detection, and active defense technology [8-9]. However, the previous methods rely too much on the experience of security experts, rules, and knowledge bases, making it difficult to accurately identify APT attacks’ behavior. In addition, the existing methods lack automatic and intelligent detection capabilities, and they further reduce detection accuracy when facing malware with obfuscation, packing, evasion, and deception techniques.

文心一言润色如下:

Traditional methods for detecting APT (Advanced Persistent Threat) attacks involve the use of rules-based systems or security analysts who reverse engineer the malicious software to extract features. Common techniques include signature-based detection, checksum-based detection, heuristic detection, and proactive defense measures [8-9]. However, these traditional methods have significant limitations, as they rely heavily on the experience of security experts, rules-based knowledge bases, and manual analysis processes. They often struggle to accurately identify the behavior of advanced persistent threats, particularly when facing advanced obfuscation, packing, evasion, and deception techniques used by attackers.

讯飞星火润色如下:

Traditional Automatic Patching (APT) attack detection relies on constructing rules or employing reverse analysis to identify malicious attacks and analyze their behavior. Common detection techniques include characteristic value detection, checksum detection, heuristic detection, and active defense technology [8-9]. However, these methods heavily rely on the experiences of security experts, rules, and knowledge bases, making it challenging to accurately recognize APT attacks’ patterns. Furthermore, these existing approaches lack automatic and intelligent detection capabilities, which can further decrease detection accuracy when confronted with malware employing obfuscation, packing, evasion, and deception techniques.

星河超算ChatGPT润色如下:

Traditional APT attack detection aims to identify malicious attacks and analyze attack behaviors through the construction of rules or the utilization of reverse analysis by security analysts. Commonly used detection techniques involve characteristic value detection, checksum detection, heuristic detection, and active defense technology [8-9]. However, these conventional methods heavily rely on the expertise of security professionals, predefined rules, and knowledge bases, thus posing challenges in accurately identifying the behavior of APT attacks. Moreover, existing approaches lack automatic and intelligent detection capabilities, which further compromises their effectiveness in detecting malware with obfuscation, packing, evasion, and deception techniques.

五.结束语

总结: 上述润色有一定提升,但还是存在不准确的地方,建议大家在撰写英文论文时,还是以自身为主,多阅读顶会顶刊论文,学习别人更地道的句子和专有名词。此外,撰写的时候就采用英文语气会更佳,按照每个段落来描述会更好。他山之石可以攻玉,ChatGPT尽管给大家带了众多便利,但仍然存在很多问题,如版权、安全等,切勿直接用ChatGPT来撰写论文、作业、文稿等,知识产权还需要大家共同维护,并且学术问题也是底线问题。

写到这里,文章就结束了。本文主要带领大家了解什么是LLM、AIGC和ChatGPT,并熟悉中文ChatGPT的应用,简单用论文润色进行对比。基础性文章,希望对您有所帮助。后续作者会继续深入,分享更多LLM和AIGC内容,加油,共勉!

  • 一.什么是LLM和AIGC
  • 二.传统英文翻译方式
    1.英文翻译
    2.grammarly英文校对
  • 三.中文ChatGPT小试牛刀
    1.文心一言
    2.讯飞星火
    3.其它
    4.New bing及ChatGPT推荐
  • 四.中文ChatGPT润色尝试
    1.什么是Prompt
    2.论文润色Prompt
    3.润色示例
  • 五.总结

祝天下所有教师节日快乐!三尺讲台三寸笔,从小受到很多老师的教诲和解惑,师恩难忘,唯有感恩。祝长辈和老师们节日快乐,阖家幸福,身体健康,桃李满天。
​回想,自己2014年站在支教的讲台前,到2016年成为大学教师开启暑假实训,再到网上博客授课和答疑,以及完成自己的一门门课程,这已经是自己的第10个教师节。站在讲台前的那一刻,真的好想把自己所学所感分享出去。那些年,我刚成为老师,和老于成立了V创联盟,我俩自愿教60多名学生写代码,三年,下班后、周末,许许多多贵财凌晨三点都有我们的身影,办公室深夜更是灯火通明,熬夜训练,分组比赛,无数个日夜陪伴着学生编程,真想一头扎进家乡贵州的教育。很遗憾,后来两人读博V创联盟解散,随着年龄增长激情淡出;但也很幸运,那些年培养的学生出来都找到了很好的工作,拥有很棒的编程经历,更是留下深厚的友谊。这两周,还接到之前学生成为贵州这边某单位编程负责人,也有放弃稳定的事业单位选择去高校当老师的故事,以及正在读博未来争取成为老师的期盼。回首,自己给14级到18级,五个年级的学生上过课,有二十多人成为了教师,分散在贵州小学、中学、高职、大学的经历,我们亦师亦友,还挺开心的。这些年出来读博,更多是线上分享和博客分享,期待重回讲台的那一天,希望自己能记住当老师的那份美丽,记住你们脸上洋溢的笑容。不忘初心,知行合一,止于至善,砥砺前行。当教师最美的经历永远是和女神一起站在讲台前的那天,我来分享编程,你课间为我大四学生分享考公的经验。哈哈,都是青春,都是记忆,无悔,加油

(By:Eastmount 2023-09-18 夜于贵阳 http://blog.csdn.net/eastmount/ )

参考文献如下,感谢各位老师和大佬,也推荐大家阅读。

  • [1] 百度百科. ChatGPT. https://baike.baidu.com/item/ChatGPT/62446358
  • [2] 百度百科. 大语言模型. https://baike.baidu.com/item/大语言模型/62884793
  • [3] 艾瑞咨询. ChatGPT浪潮下,看中国大语言模型产业发展. https://36kr.com/p/2211610470512001
  • [4] 百度百科. AIGC. https://baike.baidu.com/item/AIGC
  • [5] B站 Liam的冒险. AIGC是什么?风口还是泡沫?普通人如何把握机会?. https://www.bilibili.com/video/BV1db411f7HC
  • [6] 知乎. 人工智能Ai画画——stable diffusion 原理和使用方法详解. https://zhuanlan.zhihu.com/p/610094594
  • [7] Andreas Rössler, et al. FaceForensics++: Learning to Detect Manipulated Facial Images. https://arxiv.org/abs/1901.08971
  • [8] B站 二次元的Datawhale. 【Prompt大赛专题分享】 Prompt工程师养成记——从小白到大神. https://www.bilibili.com/video/BV1Rj41117gG
  • [9] 知乎. ChatGPT最实用的提示(Prompts)写法有哪些?. https://www.zhihu.com/question/584402332
  • [10] 知乎. ChatGPT 在论文润色方面可以有哪些应用?. https://www.zhihu.com/question/582506176

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
xiaoxingxing的头像xiaoxingxing管理团队
上一篇 2023年12月14日
下一篇 2023年12月14日

相关推荐