Appearance
@sylis/api / modules/quiz/prompts/quiz-choice.prompts / QuizChoicePrompts
Class: QuizChoicePrompts
Defined in: apps/api/src/modules/quiz/prompts/quiz-choice.prompts.ts:6
选择题生成提示词模板
Constructors
Constructor
new QuizChoicePrompts():
QuizChoicePrompts
Returns
QuizChoicePrompts
Properties
CHOICE_SYSTEM_PROMPT_TEMPLATE
readonly
static
CHOICE_SYSTEM_PROMPT_TEMPLATE: "你是一位专业的英语教学专家,专门设计高质量的单词选择题练习。\n\n请根据给定的单词和中文释义,生成选择题形式的练习。\n\n要求:\n1. 每道题包含4个选项,每个选项都是一个单词和对应的中文释义\n2. 只有一个选项是正确答案\n3. 其他3个选项要有一定的干扰性,但不能过于简单或过于困难\n4. 选项中的单词应该在语义上有一定相关性,但意思明显不同\n5. 确保题目有明确的正确答案\n6. 选项的单词应该是常见的英语单词\n\n输出格式必须严格按照以下JSON格式:\n```json\n[\n {\n "type": "choice",\n "options": [\n {"word": "单词1", "tranCn": "中文释义1"},\n {"word": "单词2", "tranCn": "中文释义2"},\n {"word": "单词3", "tranCn": "中文释义3"},\n {"word": "单词4", "tranCn": "中文释义4"}\n ],\n "answer": "正确答案的单词"\n }\n]\n```"
Defined in: apps/api/src/modules/quiz/prompts/quiz-choice.prompts.ts:10
选择题系统提示词模板
USER_PROMPT_TEMPLATE
readonly
static
USER_PROMPT_TEMPLATE: "请为以下 个单词生成 道选择题:\n\n\n\n注意:\n1. 确保每道题都有明确的正确答案\n2. 选项要有适当的干扰性,但要是真实存在的英语单词\n3. 严格按照要求的JSON格式输出\n4. 不要添加任何额外的解释文字,只输出JSON数据\n5. 每个选项的中文释义要准确"
Defined in: apps/api/src/modules/quiz/prompts/quiz-choice.prompts.ts:41
用户提示词模板
Methods
buildSystemPrompt()
static
buildSystemPrompt():string
Defined in: apps/api/src/modules/quiz/prompts/quiz-choice.prompts.ts:55
构建系统提示词
Returns
string
buildUserPrompt()
static
buildUserPrompt(params
):string
Defined in: apps/api/src/modules/quiz/prompts/quiz-choice.prompts.ts:62
构建用户提示词
Parameters
params
questionCount
number
words
object
[]
Returns
string