kaixindelele / ChatPaper

Use ChatGPT to summarize the arXiv papers. 全流程加速科研,利用chatgpt进行论文全文总结+专业翻译+润色+审稿+审稿回复
https://chatwithpaper.org
Other
18.01k stars 1.9k forks source link

看了 prompt,为什么 assistant 可以直接接在 system 后面? #185

Open GodsDusk opened 1 year ago

GodsDusk commented 1 year ago
 {"role": "system",
             "content": "You are a researcher in the field of [" + self.key_word + "] who is good at summarizing papers using concise statements"},
            # chatgpt 角色
            {"role": "assistant",
             "content": "This is the <summary> and <Method> part of an English document, where <summary> you have summarized, but the <Methods> part, I need your help to read and summarize the following questions." + clip_text},
            # 背景知识
            {"role": "user", "content": """                 
                 ...

目前网上看到的用法都是 system-user-assistant-user-... 的这种用法, 请问assistant放 system 后面有相关教程教怎么用吗,比如什么情况下可以这么用。 另外似乎 assistant content 可以塞比较多的 token?

kaixindelele commented 1 year ago

其实我也不知道有什么区别,原则上字典不分先后吧,如果有其它同学知道的话,麻烦帮忙一起解答一下

GodsDusk commented 1 year ago

其实我也不知道有什么区别,原则上字典不分先后吧,如果有其它同学知道的话,麻烦帮忙一起解答一下

感谢回复,但messages不是字典吧,是 List[dict]

zzzjl2021 commented 1 year ago

image 因为不是对话式吧,只要问题在所有的先验知识之后就行,openai文档里说system这块目前权重较低,assistent存储的也是先验知识。如果是对话式,感觉先后顺序就很重要了。这个项目不是对话主打的,主要还是总结

WaitRainbow commented 10 months ago

我的经验是,在assistant prompt中可以放上对于问题的推理过程,这样他的回复就会按这个范式进行,举个例子: system: You're a data scientist and you have some database contents, please give me a correct Sqlite SQL query for the given question: 'xxxxxxx' assistant: According to your question, I'll be using the following tables: xxx. From these tables, I'll be using the following columns: xxx. Then the SQL query I'll be generating is: SELECT count(*) FROM xxxx. user: select all the entries with an age exceeding 20.