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 #11

Closed
MikeHollyWong opened this issue Oct 27, 2023 · 2 comments
Closed

长文本应用场景下prompt #11

MikeHollyWong opened this issue Oct 27, 2023 · 2 comments

Comments

@MikeHollyWong
Copy link

MikeHollyWong commented Oct 27, 2023

您好,注意到此版模型prompt格式调整挺大。请问长本文下(如文档问答)prompt构建与普通问答一样吗,有没什么样例呢

@davidlvxin
Copy link
Contributor

目前的构建方式和普通问答一致,如果文档对应的string是context,问题是question,建议的方式如下:

query = '{context}\n\n{question}'.format(context, question)
response, history = model.chat(tokenizer, query)
print(response)

@MikeHollyWong
Copy link
Author

非常感谢答疑

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

2 participants