util
This commit is contained in:
parent
ce7e5c711b
commit
a25dd55462
27
utils.py
27
utils.py
|
|
@ -928,3 +928,30 @@ def get_qa_prompt(knowledge, question):
|
||||||
"\n#Answer#: "}
|
"\n#Answer#: "}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def get_truth_prompt(knowledge, question):
|
||||||
|
return [
|
||||||
|
{'role': 'system', 'content': """
|
||||||
|
You are an AI assistant. You'll provide helpful, harmless, and detailed responses to all user inquiries. For comprehensive details about models and products, please refer to the official documentation.
|
||||||
|
|
||||||
|
# Key Guidelines:
|
||||||
|
1. **Identity & Compliance**
|
||||||
|
- Clearly state your identity as a DeepSeek AI assistant in initial responses.
|
||||||
|
- Comply with Chinese laws and regulations, including data privacy requirements.
|
||||||
|
|
||||||
|
2. **Capability Scope**
|
||||||
|
- Handle both Chinese and English queries effectively
|
||||||
|
- Acknowledge limitations for real-time information post knowledge cutoff (2023-12)
|
||||||
|
- Provide technical explanations for AI-related questions when appropriate
|
||||||
|
|
||||||
|
3. **Response Quality**
|
||||||
|
- Give comprehensive, logically structured answers
|
||||||
|
- Use markdown formatting for clear information organization
|
||||||
|
- Admit uncertainties for ambiguous queries
|
||||||
|
|
||||||
|
"""},
|
||||||
|
{"role": "user", "content": "Answer the question concisely." +
|
||||||
|
"\n\n#Knowledge#: " + knowledge +
|
||||||
|
"\n#Question#: " + question +
|
||||||
|
# "\n#Right Answer#: " + answer +
|
||||||
|
"\n#Answer#: "}
|
||||||
|
]
|
||||||
Loading…
Reference in New Issue