only_ever_generator 0.2.8 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bootstrap/app.js +3 -3
- package/dist/card_gen/generate_cards.js +1 -1
- package/dist/constants/prompts/card_gen_prompt.js +201 -196
- package/dist/constants/prompts/typology_prompt.js +1 -7
- package/dist/constants/source_data.js +883 -7
- package/dist/index.js +1 -1
- package/dist/parse/parse_source_content.js +0 -7
- package/dist/utils/parse_openai_response.js +1 -0
- package/package.json +1 -1
- package/src/bootstrap/app.ts +3 -3
- package/src/card_gen/generate_cards.ts +1 -1
- package/src/constants/prompts/card_gen_prompt.ts +208 -208
- package/src/constants/prompts/typology_prompt.ts +1 -7
- package/src/constants/source_data.ts +886 -18
- package/src/index.ts +1 -1
- package/src/parse/parse_source_content.ts +0 -6
- package/src/utils/parse_openai_response.ts +1 -0
package/dist/bootstrap/app.js
CHANGED
|
@@ -39,7 +39,7 @@ class OnlyEverGenerator {
|
|
|
39
39
|
content: parsedData.content,
|
|
40
40
|
},
|
|
41
41
|
// parsedData.type == 'cards' ? this.typologyResponse = parsedData.taxonomy : this.typologyResponse = null;
|
|
42
|
-
this.typologyResponse =
|
|
42
|
+
this.typologyResponse = generationContent.content.taxonomy;
|
|
43
43
|
this.expectedFields = generationContent.content.fields; //returnFields();
|
|
44
44
|
this.promptForTypology = (0, typology_prompt_1.returnTypologyPrompt)(generationContent.prompt.typology);
|
|
45
45
|
this.promptForCardGen = (0, card_gen_prompt_1.returnCardGenPrompt)(generationContent.prompt.card_generation);
|
|
@@ -95,10 +95,10 @@ class OnlyEverGenerator {
|
|
|
95
95
|
generateCard(prompt, additionalContent, isGapFill) {
|
|
96
96
|
return __awaiter(this, void 0, void 0, function* () {
|
|
97
97
|
let generateCards = new generate_cards_1.GenerateCards(this.openAiService);
|
|
98
|
-
|
|
98
|
+
let cardResp = yield generateCards.generateCards(prompt !== null && prompt !== void 0 ? prompt : "", this.parsedContent + additionalContent, isGapFill);
|
|
99
99
|
// let response = await this.openAiService?.sendRequest(prompt,this.parsedContent);
|
|
100
100
|
// response['type'] = 'card_gen';
|
|
101
|
-
return
|
|
101
|
+
return cardResp;
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
generateTypology(prompt) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// const promptString
|
|
3
|
-
//
|
|
2
|
+
// const promptString : any = {
|
|
3
|
+
// role: `
|
|
4
|
+
// As a dedicated assistant at a learning company, your role is to analyze educational content and create test cards that help learners understand and remember key concepts and facts. You will be provided with:
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
6
|
exports.returnCardGenPrompt = void 0;
|
|
6
7
|
// 1. Title of the source
|
|
@@ -16,131 +17,149 @@ exports.returnCardGenPrompt = void 0;
|
|
|
16
17
|
// 3. Generate test cards for each concept and fact, tethered to either the entire source or specific headings.
|
|
17
18
|
// 4. Ensure all concepts and facts have at least one test card.
|
|
18
19
|
// Please format your response in the following format.
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
//
|
|
20
|
+
// "missing_concepts": ["concept1", "concept2", "concept3", "..."],
|
|
21
|
+
// "missing_facts": ["fact1", "fact2", "fact3", "..."],
|
|
22
|
+
// "test_cards": [
|
|
23
|
+
// {
|
|
24
|
+
// "type": "flash" | "mcq" | "cloze" | "match",
|
|
25
|
+
// "card_content": { "front": "...", "back": "..." | "prompt": "...", "choices": [ ... ] | "prompt": "...", "options": [ ... ] | "...": "...", "....": "..." },
|
|
26
|
+
// "card_reference": "source_title#heading",
|
|
27
|
+
// "concepts": ["Concept1", "Concept2", "..."],
|
|
28
|
+
// "facts": ["Fact1", "Fact2", "..."],
|
|
29
|
+
// "bloom_level": <1-5>
|
|
30
|
+
// }
|
|
31
|
+
// ]
|
|
31
32
|
// **Criteria**
|
|
33
|
+
// • Atleast one test card must be generated.
|
|
32
34
|
// • Each test card must include at least one concept or fact.
|
|
35
|
+
// • Each test card must include bloom_level.
|
|
33
36
|
// • Flashcards must not exceed 15% of the total number of cards.
|
|
34
37
|
// • Each concept and fact must have at least one test card.
|
|
35
38
|
// Further instructions are provided below.
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
+
// `,
|
|
40
|
+
// concepts : `
|
|
41
|
+
// You are provided with a list of identified concepts. Review this list and the content to determine if any concepts are missing.
|
|
42
|
+
// 1. **Definition of a Concept**: Concepts are fundamental ideas that form the basis of knowledge in any discipline. They help organize and explain information, making it accessible and relatable.
|
|
39
43
|
// 2. **Inclusion Criteria**: Include a concept only if it has not been previously included in the list provided to you.
|
|
40
44
|
// List the concepts in the following JSON format:
|
|
41
|
-
// json
|
|
42
45
|
// {
|
|
43
|
-
//
|
|
46
|
+
// "missing_concepts":
|
|
47
|
+
// [
|
|
48
|
+
// "concept1",
|
|
49
|
+
// "concept2",
|
|
50
|
+
// "concept3",
|
|
51
|
+
// "..."
|
|
52
|
+
// ]
|
|
44
53
|
// }
|
|
45
|
-
//
|
|
46
|
-
//
|
|
54
|
+
// `,
|
|
55
|
+
// facts :`
|
|
56
|
+
// You are provided with a list of identified facts. Review this list and the content to determine if any facts are missing.
|
|
47
57
|
// 1. **Definition of a Fact**: Standalone information that is concrete and independently verifiable.
|
|
48
58
|
// 2. **Selection Criteria**: Choose facts based on their significance to the content's main themes or concepts, their educational value, or their foundational role in the subject. Only inlcude those that have not present in the list provided to you.
|
|
49
59
|
// Record the facts in the following JSON format:
|
|
50
|
-
// json
|
|
51
60
|
// {
|
|
52
|
-
//
|
|
61
|
+
// "missing_facts": ["fact1", "fact2", "fact3", "..."]
|
|
53
62
|
// }
|
|
54
|
-
//
|
|
55
|
-
//
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
//
|
|
63
|
+
// `,
|
|
64
|
+
// card_gen: `
|
|
65
|
+
// After you have the complete list of concepts and facts, including any missing ones you identified, proceed to generate test cards for each.
|
|
66
|
+
// 1. Clarity: Ensure the test content is clear and unambiguous.
|
|
67
|
+
// 2. Specificity: Be specific about what you are asking. Avoid vague or overly broad questions or prompts.
|
|
68
|
+
// 3. Simplicity: Use simple and direct language. Avoid complex sentences or jargon unless testing understanding of that jargon.
|
|
69
|
+
// 4. Relevance: Ensure the test content is directly related to the key concepts or facts you want to test.
|
|
70
|
+
// Include the following property for each card:
|
|
71
|
+
// bloom_level: Indicate the level of Bloom’s Taxonomy the card corresponds to (from level 1 to level 5). Ensure that you produce a balanced number of cards across all levels, focusing on levels 1 through 5. Aim for a diverse range of cognitive challenges.
|
|
72
|
+
// Make sure to include this field in each card.
|
|
73
|
+
// Ensure that you produce at least one card for each concept and fact. Do not skip any concepts or facts, and be thorough in your coverage. Cards should span across different levels of Bloom’s Taxonomy, from level 1 (Remembering) to level 5 (Evaluating), but exclude level 6 (Creating).
|
|
59
74
|
// Test cards must be one of the following types:
|
|
60
75
|
// 1. Flashcards: Have a front and back.
|
|
61
|
-
//
|
|
62
|
-
// json schema for Flash Cards:
|
|
76
|
+
// json:
|
|
63
77
|
// {
|
|
64
|
-
//
|
|
65
|
-
//
|
|
66
|
-
//
|
|
67
|
-
//
|
|
68
|
-
//
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
//
|
|
78
|
+
// "type": "flash",
|
|
79
|
+
// "card_content": {
|
|
80
|
+
// "front": "<content for the front>",
|
|
81
|
+
// "back": "<content for the back>"
|
|
82
|
+
// },
|
|
83
|
+
// "card_reference": "source_title#heading",
|
|
84
|
+
// "concepts": ["Concept1", "Concept2", "..."],
|
|
85
|
+
// "facts": ["Fact1", "Fact2", "..."],
|
|
86
|
+
// "bloom_level": <1-5>
|
|
72
87
|
// }
|
|
88
|
+
// - Each side must not exceed 300 characters.
|
|
73
89
|
// 2. Multiple Choice Questions (MCQ): Provide multiple choices to pick from. One or more should be correct.
|
|
90
|
+
// json:
|
|
91
|
+
// {
|
|
92
|
+
// "type": "mcq",
|
|
93
|
+
// "card_content": {
|
|
94
|
+
// "prompt": "<question text>",
|
|
95
|
+
// "choices": [
|
|
96
|
+
// {"choice": "choice 1", "is_correct": true or false},
|
|
97
|
+
// {"choice": "choice 2", "is_correct": true or false},
|
|
98
|
+
// "... up to 8 choices"
|
|
99
|
+
// ]
|
|
100
|
+
// },
|
|
101
|
+
// "card_reference": "source_title#heading",
|
|
102
|
+
// "concepts": ["Concept1", "Concept2", "..."],
|
|
103
|
+
// "facts": ["Fact1", "Fact2", "..."],
|
|
104
|
+
// "bloom_level": <1-5>
|
|
105
|
+
// }
|
|
74
106
|
// • Minimum choices required: 2
|
|
75
107
|
// • Maximum choices allowed: 8
|
|
76
108
|
// • Minimum correct choices required: 1
|
|
77
109
|
// • Maximum character length for the prompt: 320
|
|
78
110
|
// • Maximum character length for each choice: 42
|
|
79
|
-
//
|
|
111
|
+
// 3. Cloze: A test card where a portion of text is masked for the learner to identify from the provided options. Use double curly braces {{c<n>: cloze_text}} to indicate a cloze, where n is the index number of the cloze (starting from 0) and cloze_text is the word or phrase being clozed.
|
|
112
|
+
// json
|
|
80
113
|
// {
|
|
81
|
-
//
|
|
82
|
-
//
|
|
83
|
-
//
|
|
84
|
-
//
|
|
85
|
-
//
|
|
86
|
-
//
|
|
87
|
-
//
|
|
88
|
-
//
|
|
89
|
-
//
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
//
|
|
114
|
+
// "type": "cloze",
|
|
115
|
+
// "card_content": {
|
|
116
|
+
// "prompt": "Accidentals in music denote {{c0:notes}} that do not belong to the {{c1:scale}} or {{c2:mode}} indicated by the key signature.",
|
|
117
|
+
// "options": [
|
|
118
|
+
// {"option": "notes", "cloze": "c0"},
|
|
119
|
+
// {"option": "scale", "cloze": "c1"},
|
|
120
|
+
// {"option": "mode", "cloze": "c2"},
|
|
121
|
+
// {"option": "chords", "cloze": "null"},
|
|
122
|
+
// "... up to 8 choices"
|
|
123
|
+
// ]
|
|
124
|
+
// },
|
|
125
|
+
// "card_reference": "source_title#heading",
|
|
126
|
+
// "concepts": ["Concept1", "Concept2", "..."],
|
|
127
|
+
// "facts": ["Fact1", "Fact2", "..."],
|
|
128
|
+
// "bloom_level": <1-5>
|
|
93
129
|
// }
|
|
94
|
-
// 3. Cloze:
|
|
95
|
-
// Fill-in-the-blank style test card. Use double curly braces {{}} to indicate a cloze this is absolute necessagr
|
|
96
130
|
// • Minimum choices required: 2
|
|
97
131
|
// • Maximum choices allowed: 8
|
|
98
132
|
// • Minimum correct choices required: 1
|
|
99
133
|
// • Maximum character length for the prompt: 320
|
|
100
134
|
// • Maximum character length for an individual cloze: 90
|
|
101
|
-
// json schema for cloze
|
|
102
|
-
// {
|
|
103
|
-
// "type": "cloze",
|
|
104
|
-
// "card_content": {
|
|
105
|
-
// "text": "Accidentals in music denote {{c0:notes}} that do not belong to the {{c1:scale}} or {{c2:mode}} indicated by the key signature.",
|
|
106
|
-
// "options": [
|
|
107
|
-
// {"option": "notes", "cloze": "c0"},
|
|
108
|
-
// {"option": "scale", "cloze": "c1"},
|
|
109
|
-
// {"option": "mode", "cloze": "c2"},
|
|
110
|
-
// {"option": "chords", "cloze": null},
|
|
111
|
-
// "... up to 8 choices"
|
|
112
|
-
// ]
|
|
113
|
-
// },
|
|
114
|
-
// "card_reference": "heading",
|
|
115
|
-
// "concepts": ["Concept1", "Concept2", "..."],
|
|
116
|
-
// "facts": ["Fact1", "Fact2", "..."]
|
|
117
|
-
// }
|
|
118
135
|
// 4. Match: Pairing items.
|
|
119
|
-
//
|
|
120
|
-
// json schema for match
|
|
136
|
+
// json
|
|
121
137
|
// {
|
|
122
|
-
//
|
|
123
|
-
//
|
|
124
|
-
//
|
|
125
|
-
//
|
|
126
|
-
//
|
|
127
|
-
//
|
|
128
|
-
//
|
|
129
|
-
//
|
|
130
|
-
//
|
|
138
|
+
// "type": "match",
|
|
139
|
+
// "card_content": {
|
|
140
|
+
// "left_choice 1": "right_choice 1",
|
|
141
|
+
// "left_choice 2": "right_choice 2",
|
|
142
|
+
// "... up to 8 total pairs"
|
|
143
|
+
// },
|
|
144
|
+
// "card_reference": "source_title#heading",
|
|
145
|
+
// "concepts": ["Concept1", "Concept2", "..."],
|
|
146
|
+
// "facts": ["Fact1", "Fact2", "..."],
|
|
147
|
+
// "bloom_level": <1-5>
|
|
131
148
|
// }
|
|
132
|
-
//
|
|
149
|
+
// • Maximum character length for each item in a pair: 42
|
|
150
|
+
// `,
|
|
151
|
+
// reference : `Each test card needs a reference. A reference can either be the entire source or a specific heading in the source. Whenever possible, pick a main heading to direct the user to the most relevant part of the source material. The reference schema is as follows: source_title#main_heading, where #main_heading is optional.`,
|
|
152
|
+
// checkcoverage: `Once you are done generating the test cards. Go back and evaulate the full list of concepts and fact that include any of the missing concepts or facts along with the list that was provided as the input.
|
|
133
153
|
// Are there any concept or fact that don't have a test card yet? If yes, go back and create one.
|
|
134
154
|
// Once you are done creating come back to this step again to check if you have full coverage of all the concepts and facts in the source. You can stop generating test questions once you achieve full coverage.
|
|
135
155
|
// Once you are done generating the test cards, review the full list of concepts and facts, including any missing ones you identified.
|
|
136
|
-
//
|
|
137
|
-
//
|
|
138
|
-
//
|
|
139
|
-
// Only stop generating test questions once you believe there is sufficient testing material for learners to fully understand the concepts and remember the facts. The same concept or fact can have multiple test cards, so continue creating test cards until you are confident that there are enough for learners to fully grasp the source material
|
|
140
|
-
//
|
|
141
|
-
const promptString =
|
|
142
|
-
|
|
143
|
-
As a dedicated assistant at a learning company, your role is to analyze educational content and create test cards that help learners understand and remember key concepts and facts. You will be provided with:
|
|
156
|
+
// 1. Ensure every concept and fact has at least one test card (if not more).
|
|
157
|
+
// 2. If any concept or fact is missing a test card, create one for it.
|
|
158
|
+
// 3. Repeat this step until all concepts and facts are covered.
|
|
159
|
+
// Only stop generating test questions once you believe there is sufficient testing material for learners to fully understand the concepts and remember the facts. The same concept or fact can have multiple test cards, so continue creating test cards until you are confident that there are enough for learners to fully grasp the source material.`
|
|
160
|
+
// }
|
|
161
|
+
const promptString = `
|
|
162
|
+
As a dedicated assistant at a learning company, your role is to analyze educational content and create test cards that help learners understand and remember key concepts and facts. You will be provided with:
|
|
144
163
|
|
|
145
164
|
1. Title of the source
|
|
146
165
|
2. Main headings
|
|
@@ -158,108 +177,101 @@ Follow these steps:
|
|
|
158
177
|
4. Ensure all concepts and facts have at least one test card.
|
|
159
178
|
|
|
160
179
|
Please format your response in the following format.
|
|
180
|
+
json
|
|
181
|
+
"missing_concepts": ["concept1", "concept2", "concept3", "..."],
|
|
182
|
+
"missing_facts": ["fact1", "fact2", "fact3", "..."],
|
|
183
|
+
"test_cards": [
|
|
184
|
+
{
|
|
185
|
+
"type": "flash" | "mcq" | "cloze" | "match",
|
|
186
|
+
"card_content": { "front": "...", "back": "..." | "prompt": "...", "choices": [ ... ] | "prompt": "...", "options": [ ... ] | "right_choice 1": "...", "left_choice 1": "..." },
|
|
187
|
+
"card_reference": "source_title#heading",
|
|
188
|
+
"concepts": ["Concept1", "Concept2", "..."],
|
|
189
|
+
"facts": ["Fact1", "Fact2", "..."]
|
|
190
|
+
}
|
|
191
|
+
]
|
|
161
192
|
|
|
162
|
-
"missing_concepts": ["concept1", "concept2", "concept3", "..."],
|
|
163
|
-
"missing_facts": ["fact1", "fact2", "fact3", "..."],
|
|
164
|
-
"test_cards": [
|
|
165
|
-
{
|
|
166
|
-
"type": "flash" | "mcq" | "cloze" | "match",
|
|
167
|
-
"card_content": { "front": "...", "back": "..." | "prompt": "...", "choices": [ ... ] | "prompt": "...", "options": [ ... ] | "...": "...", "....": "..." },
|
|
168
|
-
"card_reference": "source_title#heading",
|
|
169
|
-
"concepts": ["Concept1", "Concept2", "..."],
|
|
170
|
-
"facts": ["Fact1", "Fact2", "..."],
|
|
171
|
-
"bloom_level": <1-5>
|
|
172
|
-
}
|
|
173
|
-
]
|
|
174
193
|
**Criteria**
|
|
175
|
-
• Atleast one test card must be generated.
|
|
176
194
|
• Each test card must include at least one concept or fact.
|
|
177
|
-
• Each test card must include bloom_level.
|
|
178
195
|
• Flashcards must not exceed 15% of the total number of cards.
|
|
179
196
|
• Each concept and fact must have at least one test card.
|
|
180
197
|
|
|
181
198
|
Further instructions are provided below.
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
You are provided with a list of identified concepts. Review this list and the content to determine if any concepts are missing.
|
|
199
|
+
|
|
200
|
+
You are provided with a list of identified concepts. Review this list and the content to determine if any concepts are missing.
|
|
185
201
|
|
|
186
202
|
1. **Definition of a Concept**: Concepts are fundamental ideas that form the basis of knowledge in any discipline. They help organize and explain information, making it accessible and relatable.
|
|
187
203
|
2. **Inclusion Criteria**: Include a concept only if it has not been previously included in the list provided to you.
|
|
188
204
|
|
|
189
205
|
List the concepts in the following JSON format:
|
|
206
|
+
|
|
207
|
+
json
|
|
190
208
|
{
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
209
|
+
"missing_concepts":
|
|
210
|
+
[
|
|
211
|
+
"concept1",
|
|
212
|
+
"concept2",
|
|
213
|
+
"concept3",
|
|
214
|
+
"..."
|
|
215
|
+
]
|
|
198
216
|
}
|
|
199
|
-
`,
|
|
200
|
-
facts: `
|
|
201
217
|
You are provided with a list of identified facts. Review this list and the content to determine if any facts are missing.
|
|
202
218
|
|
|
203
219
|
1. **Definition of a Fact**: Standalone information that is concrete and independently verifiable.
|
|
204
220
|
2. **Selection Criteria**: Choose facts based on their significance to the content's main themes or concepts, their educational value, or their foundational role in the subject. Only inlcude those that have not present in the list provided to you.
|
|
205
221
|
|
|
206
222
|
Record the facts in the following JSON format:
|
|
223
|
+
json
|
|
207
224
|
{
|
|
208
|
-
|
|
225
|
+
"missing_facts": ["fact1", "fact2", "fact3", "..."]
|
|
209
226
|
}
|
|
210
|
-
`,
|
|
211
|
-
card_gen: `
|
|
212
227
|
After you have the complete list of concepts and facts, including any missing ones you identified, proceed to generate test cards for each.
|
|
213
228
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
229
|
+
1. Clarity: Ensure the test content is clear and unambiguous.
|
|
230
|
+
2. Specificity: Be specific about what you are asking. Avoid vague or overly broad questions or prompts.
|
|
231
|
+
3. Simplicity: Use simple and direct language. Avoid complex sentences or jargon unless testing understanding of that jargon.
|
|
232
|
+
4. Relevance: Ensure the test content is directly related to the key concepts or facts you want to test.
|
|
218
233
|
|
|
219
234
|
Include the following property for each card:
|
|
220
235
|
|
|
221
236
|
bloom_level: Indicate the level of Bloom’s Taxonomy the card corresponds to (from level 1 to level 5). Ensure that you produce a balanced number of cards across all levels, focusing on levels 1 through 5. Aim for a diverse range of cognitive challenges.
|
|
222
237
|
|
|
223
|
-
Make sure to include this field in each card.
|
|
224
238
|
Ensure that you produce at least one card for each concept and fact. Do not skip any concepts or facts, and be thorough in your coverage. Cards should span across different levels of Bloom’s Taxonomy, from level 1 (Remembering) to level 5 (Evaluating), but exclude level 6 (Creating).
|
|
225
239
|
|
|
226
240
|
Test cards must be one of the following types:
|
|
227
241
|
|
|
228
242
|
1. Flashcards: Have a front and back.
|
|
229
243
|
|
|
230
|
-
json
|
|
244
|
+
json
|
|
231
245
|
{
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
246
|
+
"type": "flash",
|
|
247
|
+
"card_content": {
|
|
248
|
+
"front": "<content for the front>",
|
|
249
|
+
"back": "<content for the back>"
|
|
250
|
+
},
|
|
251
|
+
"card_reference": "source_title#heading",
|
|
252
|
+
"concepts": ["Concept1", "Concept2", "..."],
|
|
253
|
+
"facts": ["Fact1", "Fact2", "..."],
|
|
254
|
+
"bloom_level": <1-5>
|
|
241
255
|
}
|
|
242
|
-
|
|
243
256
|
- Each side must not exceed 300 characters.
|
|
244
257
|
2. Multiple Choice Questions (MCQ): Provide multiple choices to pick from. One or more should be correct.
|
|
245
258
|
|
|
246
|
-
json
|
|
259
|
+
json
|
|
247
260
|
{
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
+
"type": "mcq",
|
|
262
|
+
"card_content": {
|
|
263
|
+
"prompt": "<question text>",
|
|
264
|
+
"choices": [
|
|
265
|
+
{"choice": "choice 1", "is_correct": true or false},
|
|
266
|
+
{"choice": "choice 2", "is_correct": true or false},
|
|
267
|
+
"... up to 8 choices"
|
|
268
|
+
]
|
|
269
|
+
},
|
|
270
|
+
"card_reference": "source_title#heading",
|
|
271
|
+
"concepts": ["Concept1", "Concept2", "..."],
|
|
272
|
+
"facts": ["Fact1", "Fact2", "..."],
|
|
273
|
+
"bloom_level": <1-5>
|
|
261
274
|
}
|
|
262
|
-
|
|
263
275
|
• Minimum choices required: 2
|
|
264
276
|
• Maximum choices allowed: 8
|
|
265
277
|
• Minimum correct choices required: 1
|
|
@@ -270,23 +282,22 @@ json:
|
|
|
270
282
|
|
|
271
283
|
json
|
|
272
284
|
{
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
285
|
+
"type": "cloze",
|
|
286
|
+
"card_content": {
|
|
287
|
+
"prompt": "Accidentals in music denote {{c0:notes}} that do not belong to the {{c1:scale}} or {{c2:mode}} indicated by the key signature.",
|
|
288
|
+
"options": [
|
|
289
|
+
{"option": "notes", "cloze": "c0"},
|
|
290
|
+
{"option": "scale", "cloze": "c1"},
|
|
291
|
+
{"option": "mode", "cloze": "c2"},
|
|
292
|
+
{"option": "chords", "cloze": "null"},
|
|
293
|
+
"... up to 8 choices"
|
|
294
|
+
]
|
|
295
|
+
},
|
|
296
|
+
"card_reference": "source_title#heading",
|
|
297
|
+
"concepts": ["Concept1", "Concept2", "..."],
|
|
298
|
+
"facts": ["Fact1", "Fact2", "..."],
|
|
299
|
+
"bloom_level": <1-5>
|
|
288
300
|
}
|
|
289
|
-
|
|
290
301
|
• Minimum choices required: 2
|
|
291
302
|
• Maximum choices allowed: 8
|
|
292
303
|
• Minimum correct choices required: 1
|
|
@@ -294,45 +305,39 @@ json
|
|
|
294
305
|
• Maximum character length for an individual cloze: 90
|
|
295
306
|
|
|
296
307
|
4. Match: Pairing items.
|
|
297
|
-
|
|
298
308
|
json
|
|
299
309
|
{
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
+
"type": "match",
|
|
311
|
+
"card_content": {
|
|
312
|
+
"right_choice 1": "left_choice 1",
|
|
313
|
+
"right_choice 2": "left_choice 2",
|
|
314
|
+
"... up to 8 total pairs"
|
|
315
|
+
},
|
|
316
|
+
"card_reference": "source_title#heading",
|
|
317
|
+
"concepts": ["Concept1", "Concept2", "..."],
|
|
318
|
+
"facts": ["Fact1", "Fact2", "..."],
|
|
319
|
+
"bloom_level": <1-5>
|
|
310
320
|
}
|
|
311
|
-
|
|
312
321
|
• Maximum character length for each item in a pair: 42
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
322
|
+
|
|
323
|
+
Each test card needs a reference. A reference can either be the entire source or a specific heading in the source. Whenever possible, pick a main heading to direct the user to the most relevant part of the source material. The reference schema is as follows: source_title#main_heading, where #main_heading is optional.
|
|
324
|
+
Once you are done generating the test cards. Go back and evaulate the full list of concepts and fact that include any of the missing concepts or facts along with the list that was provided as the input.
|
|
316
325
|
|
|
317
326
|
Are there any concept or fact that don't have a test card yet? If yes, go back and create one.
|
|
318
327
|
|
|
319
328
|
Once you are done creating come back to this step again to check if you have full coverage of all the concepts and facts in the source. You can stop generating test questions once you achieve full coverage.
|
|
329
|
+
Generate atleast 10 cards.
|
|
320
330
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
1. Ensure every concept and fact has at least one test card (if not more).
|
|
324
|
-
2. If any concept or fact is missing a test card, create one for it.
|
|
325
|
-
3. Repeat this step until all concepts and facts are covered.
|
|
326
|
-
|
|
327
|
-
Only stop generating test questions once you believe there is sufficient testing material for learners to fully understand the concepts and remember the facts. The same concept or fact can have multiple test cards, so continue creating test cards until you are confident that there are enough for learners to fully grasp the source material.`
|
|
328
|
-
};
|
|
331
|
+
`;
|
|
329
332
|
function returnCardGenPrompt(cardGenPrompt) {
|
|
330
|
-
|
|
331
|
-
for (let key in cardGenPrompt) {
|
|
332
|
-
if (cardGenPrompt.hasOwnProperty(key)) {
|
|
333
|
-
concatenatedString += cardGenPrompt[key];
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
return concatenatedString;
|
|
333
|
+
return promptString;
|
|
337
334
|
}
|
|
338
335
|
exports.returnCardGenPrompt = returnCardGenPrompt;
|
|
336
|
+
// let concatenatedString: string = '';
|
|
337
|
+
// for (let key in cardGenPrompt) {
|
|
338
|
+
// if (cardGenPrompt.hasOwnProperty(key)) {
|
|
339
|
+
// concatenatedString += cardGenPrompt[key];
|
|
340
|
+
// }
|
|
341
|
+
// }
|
|
342
|
+
// return concatenatedString;
|
|
343
|
+
// }
|
|
@@ -178,12 +178,6 @@ Format your output in JSON as follows:
|
|
|
178
178
|
`,
|
|
179
179
|
};
|
|
180
180
|
function returnTypologyPrompt(typologyPrompt) {
|
|
181
|
-
|
|
182
|
-
for (let key in typologyPrompt) {
|
|
183
|
-
if (typologyPrompt.hasOwnProperty(key)) {
|
|
184
|
-
concatenatedString += typologyPrompt[key];
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
return concatenatedString;
|
|
181
|
+
return typologyPrompt;
|
|
188
182
|
}
|
|
189
183
|
exports.returnTypologyPrompt = returnTypologyPrompt;
|