util
This commit is contained in:
parent
ce7e5c711b
commit
a25dd55462
29
utils.py
29
utils.py
|
|
@ -927,4 +927,31 @@ def get_qa_prompt(knowledge, question):
|
|||
# "\n#Right Answer#: " + 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