feat: 初始化考培练系统项目
- 从服务器拉取完整代码 - 按框架规范整理项目结构 - 配置 Drone CI 测试环境部署 - 包含后端(FastAPI)、前端(Vue3)、管理端 技术栈: Vue3 + TypeScript + FastAPI + MySQL
This commit is contained in:
48
backend/app/services/ai/prompts/answer_judge_prompts.py
Normal file
48
backend/app/services/ai/prompts/answer_judge_prompts.py
Normal file
@@ -0,0 +1,48 @@
|
||||
"""
|
||||
答案判断器提示词模板
|
||||
|
||||
功能:判断填空题与问答题是否回答正确
|
||||
"""
|
||||
|
||||
# ==================== 元数据 ====================
|
||||
|
||||
PROMPT_META = {
|
||||
"name": "answer_judge",
|
||||
"display_name": "答案判断器",
|
||||
"description": "判断填空题与问答题的答案是否正确",
|
||||
"module": "kaopeilian",
|
||||
"variables": ["question", "correct_answer", "user_answer", "analysis"],
|
||||
"version": "1.0.0",
|
||||
"author": "kaopeilian-team",
|
||||
}
|
||||
|
||||
|
||||
# ==================== 系统提示词 ====================
|
||||
|
||||
SYSTEM_PROMPT = """你是一个答案判断器,根据用户提交的答案,比对题目、答案、解析。给出正确或错误的判断。
|
||||
|
||||
注意:仅输出"正确"或"错误",无需更多字符和说明。"""
|
||||
|
||||
|
||||
# ==================== 用户提示词模板 ====================
|
||||
|
||||
USER_PROMPT = """题目:{question}。
|
||||
正确答案:{correct_answer}。
|
||||
解析:{analysis}。
|
||||
|
||||
考生的回答:{user_answer}。"""
|
||||
|
||||
|
||||
# ==================== 判断结果常量 ====================
|
||||
|
||||
CORRECT_KEYWORDS = ["正确", "correct", "true", "yes", "对", "是"]
|
||||
INCORRECT_KEYWORDS = ["错误", "incorrect", "false", "no", "wrong", "不正确", "错"]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user