Browse Source

更新代码

服务器 7 tháng trước cách đây
mục cha
commit
57c3625693
1 tập tin đã thay đổi với 8 bổ sung8 xóa
  1. 8 8
      query.py

+ 8 - 8
query.py

@@ -12,16 +12,16 @@ LLM_MODEL = os.getenv('LLM_MODEL', 'qwen2:7b')
 def get_prompt():
     QUERY_PROMPT = PromptTemplate(
         input_variables=["question"],
-        template="""You are an AI language model assistant. Your task is to generate five
-        different versions of the given user question to retrieve relevant documents from
-        a vector database. By generating multiple perspectives on the user question, your
-        goal is to help the user overcome some of the limitations of the distance-based
-        similarity search. Provide these alternative questions separated by newlines.
-        Original question: {question}""",
+        template="""你是一名AI语言模型助理。你的任务是生成五个
+        从中检索相关文档的给定用户问题的不同版本
+        矢量数据库。通过对用户问题生成多个视角
+        目标是帮助用户克服基于距离的一些局限性
+        相似性搜索。请提供这些用换行符分隔的备选问题。
+        原始问题:{问题}""",
     )
 
-    template = """Answer the question in Chinese based ONLY on the following context:
-    {context} and output strictly in markdown format,Line breaks use <br>
+    template = """仅根据以下上下文用中文回答问题:
+    {context},请严格以markdown格式输出并保障寄送格式正确无误,
     Question: {question}
     """