我曾用GPT-4生成关于制作anki卡片的prompt,灵感来源于auto prompt,旨在AI在衡量输出结果的品质后不断调试自己的prompt,以达到最优;在Claude和GPT-4上实验如下的
prompt:
在制作抽认卡时,请充分参考SuperMemo的20条规则,AP考试及其他考试中的问题和不同教程中的引导性问题。同时,注意遵循以下要求:
根据SuperMemo的20条规则,我们可以从文本中提取信息并制作以下抽认卡:
问题 | 答案 |
---|---|
太阳系中唯一的恒星是什么? | 太阳。 |
太阳主要由哪两种气体组成? | 氢气和氦气。 |
太阳的核心温度约为多少摄氏度? | 1500万摄氏度。 |
在太阳的高温核心中,氢气核子发生什么反应? | 聚变反应。 |
在聚变反应中,氢气核子形成了什么元素? | 氦元素。 |
太阳的聚变反应会释放出哪种能量? | 大量能量。 |
文本:地球自转一周的时间为23小时56分4秒,这段时间被称为恒星日。地球绕太阳公转一周的时间约为365.24天,被称为回归年。
根据SuperMemo的20条规则制作抽认卡:
问题 | 答案 |
---|---|
地球自转一周的时间称为什么? | 恒星日。 |
恒星日的时长是多少? | 23小时56分4秒。 |
地球绕太阳公转一周的时间称为什么? | 回归年。 |
回归年的时长约为多少天? | 365.24天。 |
这套抽认卡遵循了以下规则:
在Claude和GPT4上发现一个现象,在涉及到通过大量举例子来说明一个细节问题的文本来生成问答的时候,有近8成问答无法独立于文本存在,需要手动改动;
GPT-4能较好的提出独立的问题,但是答案涉及多个步骤或是要点的时候,很容易陷入列举恶梦,忽略了拆分要点和步骤形成更容易记住的卡片。它理解的事实,关键是从问题出发的,而非答案。
Claude不仅有少部分中英混杂的现象,还出现了链式问题的现象,相当于一个问答下面有三个需要知道母问题涉及的内容的子问题,过于省略,比如“这反映了什么?”“反映了公式之间的一致性”
latex公式我用的是quicker中的好未来ocr免费识别的,起码不用考虑mathpix付费问题,先用文本ocr完毕后,再对公式部分一一识别
好的入门教材让初学者上手更快,就像复旦出的《高等代数学》
文本陈述的越简明扼要,越有逻辑性,生成的问答越好,但缺点是用语法提问主语或是宾语等等,变换成不同形式相同逻辑和思想的问题能力较差。输入的文本的书写风格一致才行,否则很容易出现Waluigi效应递增
我们可以看到一个陈述细节的内容往往生成的问答比较详细,随着文本长度,对话长度等递增,Waluigi效应递增
Claude虽有少部分中英混杂的现象,但一致性保持较强,反馈调试较差,问题的冗余性保持良好
GPT-4容易生成太过笼统的问题,但提供背景的能力比Claude强,反馈调试能力较强,问题太少,冗余性较差
写prompt的时候要注意的是模式和特殊性,专注做什么而非不做什么。
基于Claude,GPT-4生成针对词典文本的内容容易生成“举个例子”的问题(数量上也少),原因是没有针对词典文本优化问题。还有一个fine understanding的问题,它们不能确保在深度的文学问题上胜出,简单讲就是古人的“小学”的语言细分的学问,它们基于模型的概率问题,原来训练的数据里面如果包括高频性的语言和领域知识,那么它们会生成高质,正确的内容,但是错误或是有歧义用法的概率还是存在的,它们会自动校正以符合错误有歧义但似乎正确的用法
我曾写过关于词典,文字解释的生成问题的prompt,与上文的prompt差别很大,如:
Sentence miner in languages learning is a kind of people who would use the grammar books or dictionaries to create flashcards (mostly in Q&A forms)
For example, text: welcome2 ●●● S2 W3 adjective
1 you’re welcome SPOKEN a polite way of replying to someone who has just thanked you for something
‘Thanks for the coffee.’ ‘You’re welcome.’
2 if someone is welcome in a place, other people are glad that they are there
I had the feeling I wasn’t really welcome.
I didn’t feel welcome in the club.
Mary made us very welcome.
We try to make the new students feel welcome.
3 if something is welcome, you enjoy it because you feel that you need it
The weekend was a welcome break from the pressures of work.
Six months in Scotland would make a welcome change from London.
A cup of tea would be very welcome.
4 if something is welcome, you are glad that it has happened
The increase in interest rates is welcome news for investors.
This new funding will come as a welcome boost for the industry.
5 be welcome to something SPOKEN used to say that someone can have something if they want it, because you certainly do not want it
If you want to take the job you’re welcome to it!
6 be welcome to do something SPOKEN used to invite someone to do something if they would like to
You’re welcome to stay for lunch.
Q&A: Q: How might someone respond with "you're welcome"? (SPOKEN)
A: "You're welcome" is a polite way of replying to someone who has just thanked you for something.
Q: In what situations might someone not feel welcome?
A: If someone is not welcome in a place, it means that other people are not glad that they are there.
Q: What is welcome's meaning in "Mary made us very welcome"?
A: If someone is welcome in a place, other people are glad that they are there. So it means Mary made other people are glad thar we are there.
Q: What is welcome's meaning in "The weekend was a welcome break from the pressures of work."?
A: if something is welcome, you enjoy it because you feel that you need it. So it means the break is that I need.
Q: When might someone find something welcome?
A: If something is welcome, it means you enjoy it because you feel that you need it.
Q:What's the meaning of welcome in "The increase in interest rates is welcome news for investors"?
A: if something is welcome, you are glad that it has happened, so it means the increase in interest rates has happened.
Q: How might someone use "you're welcome" to invite someone to do something?
A: "You're welcome to stay for lunch".
Q: What's the meaning of "be welcome to something"(SPOKEN)?
A: It is used to say that someone can have something if they want it, because you certainly do not want it.
Q: What's the meaning of "be welcome to something" in "If you want to take the job you’re welcome to it!"
A: It means I can take the job because the speaker certainly do not want it.
Q: What's the meaning of "be welcome to do something"(SPOKEN)?
A:It is used to invite someone to do something if they would like to.
Q: What's the meaning of "be welcome to do something" in "You’re welcome to stay for lunch."
A: It is used to invite the listener to stay for lunch.
I will provide you the text to generate the Q&A forms.
用AI形成问答,还有一个缺陷,它们往往会针对句中单一语法部分提问,但是形成问答题,不应该仅有“什么是xxx与xxx的关系”“yyy是xxx与xxx的关系”,具体有归纳,对比,文本的逻辑思路(用流畅,有逻辑地语言有助于知识和语言模板地构建,简单化的表述有时不大严谨,模板可以再拆分,比如数学或是计算机思想不断细化,然后在记忆复杂的问题不断学会调动不同原子知识模块和原子方法步骤)
避免是非题:如果一个问答只需要判断对错,而没有给出理由,那么很容易让学习者感到困惑和不满。
背景和引用:为了让问答更加独立于文本,我们需要提供清晰的背景和引用,让学习者知道这是哪个学科领域的知识。例如,函数在数学中是一种映射关系,而在计算机科学中是方法的另一种称呼。可以使用类似文献引用的方法来介绍信息源,以便日后查看和修改
问题多样和冗余:为了让学习者对一个细节有更深入的理解,我们需要提出不同角度的问题,激发他们的主动回忆和思考能力。因此,尽量生成多个有质量的问题。这些问题会从不同角度切入主题,考察不同层面上的理解。例如,对于一个概念可以同时询问其定义、作用、属性等。
prompt和卡片是需要不断修改的,在这篇文章我会记录不同版本的prompt,效果的。
正如:
Generate flashcards based on text. (Tentative)
Flashcards are a powerful learning tool. They’re also a pain in the butt to make.
Some readers said they were using ChatGPT to generate flashcards for subjects they’re studying. This seems well within the LLM abilities as a “calculator for words.” Thus, with the correct prompts, you could get fairly good results here—provided you’re inputting the material you wish to see transformed into flashcards and not expecting the LLM to get the facts on its own (see below).
However, given the difficulty of making “good” flashcards, I wouldn’t enter any into my Anki without reviewing them first. Nonetheless, making flashcards is tedious, so getting a first draft that I later review might speed up the process considerably. The risks seem relatively limited if you confirm the cards’ correctness before putting them in your deck.——Scott.H.Young