File size: 1,759 Bytes
19d49a8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
GEN_INCORRECT_WORD_QUESTION_TOOL = {
    "type": "function",
    "function": {
        "name": "gen_find_error_question",
        "description": (
            "Extract infomations of question."
        ),
        "parameters": {
            "type": "object",
            "properties": {
                "question": {
                    "type": "string",
                    "description": "The generated question: an erroneous English sentence with each word indexed (e.g., 'He(1) talk(2) when(3) I(4) talk(5).')."
                },
                "choices": {
                    "type": "array",
                    "items": {"type": "string"},
                    "description": "List of answer choices. Each choice is an indexed word/phrase from the question (e.g., 'talk(2)')."
                },
                "answer": {
                    "type": "array",
                    "items": {"type": "string"},
                    "description": "List of the *exact* incorrect word(s)/phrase(s) *with their indices* (e.g., ['talk(2)', 'angry(8)']). This must match the incorrect options in 'choices'."
                },
                "explanation": {
                    "type": "string",
                    "description": "The grammatically correct version of the sentence (the original sentence from step 1 of the prompt), without indices."
                },
                "tags": {
                    "type": "array",
                    "items": {"type": "string"},
                    "description": "List of linguistic error types introduced in the question (e.g., 'verb tense', 'article', 'vocabulary')."
                }
            },
            "required": ["question", "choices", "answer", "explanation", "tags"]
        }
    }
}