Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GodsDusk opened this issue Apr 18, 2023 · 4 comments
Open

Comments

@GodsDusk
Copy link

 {"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
Copy link
Owner

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

@GodsDusk
Copy link
Author

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

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

@zzzjl2021
Copy link

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

@WaitRainbow
Copy link

我的经验是,在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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants