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

有了提示词的加入后,数据库中没有的内容依然会收到回复 #4

Open
Sumo1015 opened this issue Apr 16, 2024 · 0 comments

Comments

@Sumo1015
Copy link

prompt_template = (f"请在以下片段中寻找并生成问题的答案. 如果找不到相关内容, 就告诉我你不知道。"
f"{context}\n"
f"Question:{self.q}"
f"Answer:''") 我将提示词部分改成了这样
prompt = PromptTemplate(template=prompt_template, input_variables=["context", "question"])
之后我问它和我数据库中不相关的问题它依然会进行回复,这是为什么呢

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

1 participant