only_ever_generator 0.3.2 → 0.3.3
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 +1 -1
- package/dist/card_gen/generate_cards.js +19 -23
- package/dist/constants/prompts/card_gen_prompt.js +1 -158
- package/package.json +1 -1
- package/src/bootstrap/app.ts +1 -1
- package/src/card_gen/generate_cards.ts +21 -24
- package/src/constants/prompts/card_gen_prompt.ts +1 -190
package/dist/bootstrap/app.js
CHANGED
|
@@ -87,7 +87,7 @@ class OnlyEverGenerator {
|
|
|
87
87
|
response = yield this.generateCard(this.promptForCardGen +
|
|
88
88
|
"Generate cards only suitable for the given remaining concepts and facts" +
|
|
89
89
|
JSON.stringify(gapFill) +
|
|
90
|
-
"Exclude generating
|
|
90
|
+
"Exclude generating cards with content in the following", JSON.stringify(cardGenData.cards_data), true);
|
|
91
91
|
}
|
|
92
92
|
return response;
|
|
93
93
|
});
|
|
@@ -197,32 +197,28 @@ class GenerateCards {
|
|
|
197
197
|
return `${question} ---- ${optionsString}`;
|
|
198
198
|
}
|
|
199
199
|
parseMatchCard(cardData) {
|
|
200
|
-
let
|
|
200
|
+
let content = cardData.card_content;
|
|
201
201
|
const transformedData = {};
|
|
202
|
-
for (let key in
|
|
203
|
-
if (
|
|
204
|
-
transformedData[key] = [
|
|
205
|
-
// let value = data[key].replace(/[\[\]]/g, '');
|
|
206
|
-
// let items = data[key].split(',').map((item: string) => item.trim());
|
|
207
|
-
// map.set(key, items);
|
|
208
|
-
// }
|
|
202
|
+
for (let key in content) {
|
|
203
|
+
if (content.hasOwnProperty(key)) {
|
|
204
|
+
transformedData[key] = [content[key]];
|
|
209
205
|
}
|
|
210
|
-
let displayTitle = this.generateMatchCardDisplayTitle(transformedData);
|
|
211
|
-
let matchCard = {
|
|
212
|
-
type: {
|
|
213
|
-
category: 'learning',
|
|
214
|
-
sub_type: data.type,
|
|
215
|
-
},
|
|
216
|
-
heading: cardData.card_reference,
|
|
217
|
-
content: transformedData,
|
|
218
|
-
// content: cardData.card_content,
|
|
219
|
-
displayTitle: displayTitle,
|
|
220
|
-
concepts: cardData.concepts,
|
|
221
|
-
facts: cardData.facts,
|
|
222
|
-
bloomLevel: cardData.bloom_level,
|
|
223
|
-
};
|
|
224
|
-
return matchCard;
|
|
225
206
|
}
|
|
207
|
+
let displayTitle = this.generateMatchCardDisplayTitle(transformedData);
|
|
208
|
+
let matchCard = {
|
|
209
|
+
type: {
|
|
210
|
+
category: 'learning',
|
|
211
|
+
sub_type: cardData.type,
|
|
212
|
+
},
|
|
213
|
+
heading: cardData.card_reference,
|
|
214
|
+
content: transformedData,
|
|
215
|
+
// content: cardData.card_content,
|
|
216
|
+
displayTitle: displayTitle,
|
|
217
|
+
concepts: cardData.concepts,
|
|
218
|
+
facts: cardData.facts,
|
|
219
|
+
bloomLevel: cardData.bloom_level,
|
|
220
|
+
};
|
|
221
|
+
return matchCard;
|
|
226
222
|
}
|
|
227
223
|
generateMatchCardDisplayTitle(answers) {
|
|
228
224
|
let titles = [];
|
|
@@ -1,163 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
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:
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.returnCardGenPrompt = void 0;
|
|
7
|
-
// 1. Title of the source
|
|
8
|
-
// 2. Main headings
|
|
9
|
-
// 3. The content
|
|
10
|
-
// 4. The field of knowledge it belongs
|
|
11
|
-
// 5. Key concepts in the source
|
|
12
|
-
// 6. Important facts in the source.
|
|
13
|
-
// 7. Summary of the content using cards
|
|
14
|
-
// Follow these steps:
|
|
15
|
-
// 1. Analyze the content to identify any key concepts missing from the provided list.
|
|
16
|
-
// 2. Analyze the content to identify any important facts missing from the provided list.
|
|
17
|
-
// 3. Generate test cards for each concept and fact, tethered to either the entire source or specific headings.
|
|
18
|
-
// 4. Ensure all concepts and facts have at least one test card.
|
|
19
|
-
// Please format your response in the following format.
|
|
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": "heading",
|
|
27
|
-
// "concepts": ["Concept1", "Concept2", "..."],
|
|
28
|
-
// "facts": ["Fact1", "Fact2", "..."],
|
|
29
|
-
// "bloom_level": <1-5>
|
|
30
|
-
// }
|
|
31
|
-
// ]
|
|
32
|
-
// **Criteria**
|
|
33
|
-
// • Atleast one test card must be generated.
|
|
34
|
-
// • Each test card must include at least one concept or fact.
|
|
35
|
-
// • Each test card must include bloom_level.
|
|
36
|
-
// • Flashcards must not exceed 15% of the total number of cards.
|
|
37
|
-
// • Each concept and fact must have at least one test card.
|
|
38
|
-
// Further instructions are provided below.
|
|
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.
|
|
43
|
-
// 2. **Inclusion Criteria**: Include a concept only if it has not been previously included in the list provided to you.
|
|
44
|
-
// List the concepts in the following JSON format:
|
|
45
|
-
// {
|
|
46
|
-
// "missing_concepts":
|
|
47
|
-
// [
|
|
48
|
-
// "concept1",
|
|
49
|
-
// "concept2",
|
|
50
|
-
// "concept3",
|
|
51
|
-
// "..."
|
|
52
|
-
// ]
|
|
53
|
-
// }
|
|
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.
|
|
57
|
-
// 1. **Definition of a Fact**: Standalone information that is concrete and independently verifiable.
|
|
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.
|
|
59
|
-
// Record the facts in the following JSON format:
|
|
60
|
-
// {
|
|
61
|
-
// "missing_facts": ["fact1", "fact2", "fact3", "..."]
|
|
62
|
-
// }
|
|
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).
|
|
74
|
-
// Test cards must be one of the following types:
|
|
75
|
-
// 1. Flashcards: Have a front and back.
|
|
76
|
-
// json:
|
|
77
|
-
// {
|
|
78
|
-
// "type": "flash",
|
|
79
|
-
// "card_content": {
|
|
80
|
-
// "front": "<content for the front>",
|
|
81
|
-
// "back": "<content for the back>"
|
|
82
|
-
// },
|
|
83
|
-
// "card_reference": "heading",
|
|
84
|
-
// "concepts": ["Concept1", "Concept2", "..."],
|
|
85
|
-
// "facts": ["Fact1", "Fact2", "..."],
|
|
86
|
-
// "bloom_level": <1-5>
|
|
87
|
-
// }
|
|
88
|
-
// - Each side must not exceed 300 characters.
|
|
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": "heading",
|
|
102
|
-
// "concepts": ["Concept1", "Concept2", "..."],
|
|
103
|
-
// "facts": ["Fact1", "Fact2", "..."],
|
|
104
|
-
// "bloom_level": <1-5>
|
|
105
|
-
// }
|
|
106
|
-
// • Minimum choices required: 2
|
|
107
|
-
// • Maximum choices allowed: 8
|
|
108
|
-
// • Minimum correct choices required: 1
|
|
109
|
-
// • Maximum character length for the prompt: 320
|
|
110
|
-
// • Maximum character length for each choice: 42
|
|
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
|
|
113
|
-
// {
|
|
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": "heading",
|
|
126
|
-
// "concepts": ["Concept1", "Concept2", "..."],
|
|
127
|
-
// "facts": ["Fact1", "Fact2", "..."],
|
|
128
|
-
// "bloom_level": <1-5>
|
|
129
|
-
// }
|
|
130
|
-
// • Minimum choices required: 2
|
|
131
|
-
// • Maximum choices allowed: 8
|
|
132
|
-
// • Minimum correct choices required: 1
|
|
133
|
-
// • Maximum character length for the prompt: 320
|
|
134
|
-
// • Maximum character length for an individual cloze: 90
|
|
135
|
-
// 4. Match: Pairing items.
|
|
136
|
-
// json
|
|
137
|
-
// {
|
|
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": "heading",
|
|
145
|
-
// "concepts": ["Concept1", "Concept2", "..."],
|
|
146
|
-
// "facts": ["Fact1", "Fact2", "..."],
|
|
147
|
-
// "bloom_level": <1-5>
|
|
148
|
-
// }
|
|
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: ""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.
|
|
153
|
-
// Are there any concept or fact that don't have a test card yet? If yes, go back and create one.
|
|
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.
|
|
155
|
-
// Once you are done generating the test cards, review the full list of concepts and facts, including any missing ones you identified.
|
|
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
4
|
const promptString = `
|
|
162
5
|
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:
|
|
163
6
|
|
|
@@ -183,7 +26,7 @@ json
|
|
|
183
26
|
"test_cards": [
|
|
184
27
|
{
|
|
185
28
|
"type": "flash" | "mcq" | "cloze" | "match",
|
|
186
|
-
"card_content": {
|
|
29
|
+
"card_content": {schema for content is explained below in detail}
|
|
187
30
|
"card_reference": "heading",
|
|
188
31
|
"concepts": ["Concept1", "Concept2", "..."],
|
|
189
32
|
"facts": ["Fact1", "Fact2", "..."]
|
package/package.json
CHANGED
package/src/bootstrap/app.ts
CHANGED
|
@@ -110,7 +110,7 @@ export class OnlyEverGenerator {
|
|
|
110
110
|
this.promptForCardGen +
|
|
111
111
|
"Generate cards only suitable for the given remaining concepts and facts" +
|
|
112
112
|
JSON.stringify(gapFill) +
|
|
113
|
-
"Exclude generating
|
|
113
|
+
"Exclude generating cards with content in the following",
|
|
114
114
|
JSON.stringify(cardGenData.cards_data),
|
|
115
115
|
true
|
|
116
116
|
);
|
|
@@ -205,35 +205,32 @@ return question;
|
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
parseMatchCard(cardData: any) {
|
|
208
|
-
let
|
|
208
|
+
let content = cardData.card_content;
|
|
209
209
|
const transformedData: { [key: string]: string[] } = {};
|
|
210
210
|
|
|
211
|
-
for (let key in
|
|
212
|
-
if (
|
|
213
|
-
transformedData[key] = [
|
|
214
|
-
// let value = data[key].replace(/[\[\]]/g, '');
|
|
215
|
-
// let items = data[key].split(',').map((item: string) => item.trim());
|
|
216
|
-
// map.set(key, items);
|
|
217
|
-
// }
|
|
211
|
+
for (let key in content) {
|
|
212
|
+
if (content.hasOwnProperty(key)) {
|
|
213
|
+
transformedData[key] = [content[key]];
|
|
218
214
|
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
215
|
+
}
|
|
216
|
+
let displayTitle = this.generateMatchCardDisplayTitle(transformedData);
|
|
217
|
+
let matchCard = {
|
|
218
|
+
type: {
|
|
219
|
+
category: 'learning',
|
|
220
|
+
sub_type: cardData.type,
|
|
221
|
+
},
|
|
222
|
+
heading: cardData.card_reference,
|
|
223
|
+
content: transformedData,
|
|
224
|
+
// content: cardData.card_content,
|
|
225
|
+
displayTitle: displayTitle,
|
|
226
|
+
concepts: cardData.concepts,
|
|
227
|
+
facts: cardData.facts,
|
|
228
|
+
bloomLevel: cardData.bloom_level,
|
|
232
229
|
|
|
233
|
-
|
|
230
|
+
};
|
|
234
231
|
|
|
235
|
-
|
|
236
|
-
|
|
232
|
+
return matchCard;
|
|
233
|
+
|
|
237
234
|
}
|
|
238
235
|
|
|
239
236
|
generateMatchCardDisplayTitle(answers: any) {
|
|
@@ -1,192 +1,3 @@
|
|
|
1
|
-
// const promptString : any = {
|
|
2
|
-
// role: `
|
|
3
|
-
// 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
|
-
// 1. Title of the source
|
|
6
|
-
// 2. Main headings
|
|
7
|
-
// 3. The content
|
|
8
|
-
// 4. The field of knowledge it belongs
|
|
9
|
-
// 5. Key concepts in the source
|
|
10
|
-
// 6. Important facts in the source.
|
|
11
|
-
// 7. Summary of the content using cards
|
|
12
|
-
|
|
13
|
-
// Follow these steps:
|
|
14
|
-
|
|
15
|
-
// 1. Analyze the content to identify any key concepts missing from the provided list.
|
|
16
|
-
// 2. Analyze the content to identify any important facts missing from the provided list.
|
|
17
|
-
// 3. Generate test cards for each concept and fact, tethered to either the entire source or specific headings.
|
|
18
|
-
// 4. Ensure all concepts and facts have at least one test card.
|
|
19
|
-
|
|
20
|
-
// Please format your response in the following format.
|
|
21
|
-
|
|
22
|
-
// "missing_concepts": ["concept1", "concept2", "concept3", "..."],
|
|
23
|
-
// "missing_facts": ["fact1", "fact2", "fact3", "..."],
|
|
24
|
-
// "test_cards": [
|
|
25
|
-
// {
|
|
26
|
-
// "type": "flash" | "mcq" | "cloze" | "match",
|
|
27
|
-
// "card_content": { "front": "...", "back": "..." | "prompt": "...", "choices": [ ... ] | "prompt": "...", "options": [ ... ] | "...": "...", "....": "..." },
|
|
28
|
-
// "card_reference": "heading",
|
|
29
|
-
// "concepts": ["Concept1", "Concept2", "..."],
|
|
30
|
-
// "facts": ["Fact1", "Fact2", "..."],
|
|
31
|
-
// "bloom_level": <1-5>
|
|
32
|
-
// }
|
|
33
|
-
// ]
|
|
34
|
-
// **Criteria**
|
|
35
|
-
// • Atleast one test card must be generated.
|
|
36
|
-
// • Each test card must include at least one concept or fact.
|
|
37
|
-
// • Each test card must include bloom_level.
|
|
38
|
-
// • Flashcards must not exceed 15% of the total number of cards.
|
|
39
|
-
// • Each concept and fact must have at least one test card.
|
|
40
|
-
|
|
41
|
-
// Further instructions are provided below.
|
|
42
|
-
// `,
|
|
43
|
-
// concepts : `
|
|
44
|
-
// You are provided with a list of identified concepts. Review this list and the content to determine if any concepts are missing.
|
|
45
|
-
|
|
46
|
-
// 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.
|
|
47
|
-
// 2. **Inclusion Criteria**: Include a concept only if it has not been previously included in the list provided to you.
|
|
48
|
-
|
|
49
|
-
// List the concepts in the following JSON format:
|
|
50
|
-
// {
|
|
51
|
-
// "missing_concepts":
|
|
52
|
-
// [
|
|
53
|
-
// "concept1",
|
|
54
|
-
// "concept2",
|
|
55
|
-
// "concept3",
|
|
56
|
-
// "..."
|
|
57
|
-
// ]
|
|
58
|
-
// }
|
|
59
|
-
// `,
|
|
60
|
-
// facts :`
|
|
61
|
-
// You are provided with a list of identified facts. Review this list and the content to determine if any facts are missing.
|
|
62
|
-
|
|
63
|
-
// 1. **Definition of a Fact**: Standalone information that is concrete and independently verifiable.
|
|
64
|
-
// 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.
|
|
65
|
-
|
|
66
|
-
// Record the facts in the following JSON format:
|
|
67
|
-
// {
|
|
68
|
-
// "missing_facts": ["fact1", "fact2", "fact3", "..."]
|
|
69
|
-
// }
|
|
70
|
-
// `,
|
|
71
|
-
// card_gen: `
|
|
72
|
-
// After you have the complete list of concepts and facts, including any missing ones you identified, proceed to generate test cards for each.
|
|
73
|
-
|
|
74
|
-
// 1. Clarity: Ensure the test content is clear and unambiguous.
|
|
75
|
-
// 2. Specificity: Be specific about what you are asking. Avoid vague or overly broad questions or prompts.
|
|
76
|
-
// 3. Simplicity: Use simple and direct language. Avoid complex sentences or jargon unless testing understanding of that jargon.
|
|
77
|
-
// 4. Relevance: Ensure the test content is directly related to the key concepts or facts you want to test.
|
|
78
|
-
|
|
79
|
-
// Include the following property for each card:
|
|
80
|
-
|
|
81
|
-
// 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.
|
|
82
|
-
|
|
83
|
-
// Make sure to include this field in each card.
|
|
84
|
-
// 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).
|
|
85
|
-
|
|
86
|
-
// Test cards must be one of the following types:
|
|
87
|
-
|
|
88
|
-
// 1. Flashcards: Have a front and back.
|
|
89
|
-
|
|
90
|
-
// json:
|
|
91
|
-
// {
|
|
92
|
-
// "type": "flash",
|
|
93
|
-
// "card_content": {
|
|
94
|
-
// "front": "<content for the front>",
|
|
95
|
-
// "back": "<content for the back>"
|
|
96
|
-
// },
|
|
97
|
-
// "card_reference": "heading",
|
|
98
|
-
// "concepts": ["Concept1", "Concept2", "..."],
|
|
99
|
-
// "facts": ["Fact1", "Fact2", "..."],
|
|
100
|
-
// "bloom_level": <1-5>
|
|
101
|
-
// }
|
|
102
|
-
|
|
103
|
-
// - Each side must not exceed 300 characters.
|
|
104
|
-
// 2. Multiple Choice Questions (MCQ): Provide multiple choices to pick from. One or more should be correct.
|
|
105
|
-
|
|
106
|
-
// json:
|
|
107
|
-
// {
|
|
108
|
-
// "type": "mcq",
|
|
109
|
-
// "card_content": {
|
|
110
|
-
// "prompt": "<question text>",
|
|
111
|
-
// "choices": [
|
|
112
|
-
// {"choice": "choice 1", "is_correct": true or false},
|
|
113
|
-
// {"choice": "choice 2", "is_correct": true or false},
|
|
114
|
-
// "... up to 8 choices"
|
|
115
|
-
// ]
|
|
116
|
-
// },
|
|
117
|
-
// "card_reference": "heading",
|
|
118
|
-
// "concepts": ["Concept1", "Concept2", "..."],
|
|
119
|
-
// "facts": ["Fact1", "Fact2", "..."],
|
|
120
|
-
// "bloom_level": <1-5>
|
|
121
|
-
// }
|
|
122
|
-
|
|
123
|
-
// • Minimum choices required: 2
|
|
124
|
-
// • Maximum choices allowed: 8
|
|
125
|
-
// • Minimum correct choices required: 1
|
|
126
|
-
// • Maximum character length for the prompt: 320
|
|
127
|
-
// • Maximum character length for each choice: 42
|
|
128
|
-
|
|
129
|
-
// 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.
|
|
130
|
-
|
|
131
|
-
// json
|
|
132
|
-
// {
|
|
133
|
-
// "type": "cloze",
|
|
134
|
-
// "card_content": {
|
|
135
|
-
// "prompt": "Accidentals in music denote {{c0:notes}} that do not belong to the {{c1:scale}} or {{c2:mode}} indicated by the key signature.",
|
|
136
|
-
// "options": [
|
|
137
|
-
// {"option": "notes", "cloze": "c0"},
|
|
138
|
-
// {"option": "scale", "cloze": "c1"},
|
|
139
|
-
// {"option": "mode", "cloze": "c2"},
|
|
140
|
-
// {"option": "chords", "cloze": "null"},
|
|
141
|
-
// "... up to 8 choices"
|
|
142
|
-
// ]
|
|
143
|
-
// },
|
|
144
|
-
// "card_reference": "heading",
|
|
145
|
-
// "concepts": ["Concept1", "Concept2", "..."],
|
|
146
|
-
// "facts": ["Fact1", "Fact2", "..."],
|
|
147
|
-
// "bloom_level": <1-5>
|
|
148
|
-
// }
|
|
149
|
-
|
|
150
|
-
// • Minimum choices required: 2
|
|
151
|
-
// • Maximum choices allowed: 8
|
|
152
|
-
// • Minimum correct choices required: 1
|
|
153
|
-
// • Maximum character length for the prompt: 320
|
|
154
|
-
// • Maximum character length for an individual cloze: 90
|
|
155
|
-
|
|
156
|
-
// 4. Match: Pairing items.
|
|
157
|
-
|
|
158
|
-
// json
|
|
159
|
-
// {
|
|
160
|
-
// "type": "match",
|
|
161
|
-
// "card_content": {
|
|
162
|
-
// "left_choice 1": "right_choice 1",
|
|
163
|
-
// "left_choice 2": "right_choice 2",
|
|
164
|
-
// "... up to 8 total pairs"
|
|
165
|
-
// },
|
|
166
|
-
// "card_reference": "heading",
|
|
167
|
-
// "concepts": ["Concept1", "Concept2", "..."],
|
|
168
|
-
// "facts": ["Fact1", "Fact2", "..."],
|
|
169
|
-
// "bloom_level": <1-5>
|
|
170
|
-
// }
|
|
171
|
-
|
|
172
|
-
// • Maximum character length for each item in a pair: 42
|
|
173
|
-
// `,
|
|
174
|
-
// 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: ""main_heading, where #main_heading is optional.`,
|
|
175
|
-
// 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.
|
|
176
|
-
|
|
177
|
-
// Are there any concept or fact that don't have a test card yet? If yes, go back and create one.
|
|
178
|
-
|
|
179
|
-
// 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.
|
|
180
|
-
|
|
181
|
-
// Once you are done generating the test cards, review the full list of concepts and facts, including any missing ones you identified.
|
|
182
|
-
|
|
183
|
-
// 1. Ensure every concept and fact has at least one test card (if not more).
|
|
184
|
-
// 2. If any concept or fact is missing a test card, create one for it.
|
|
185
|
-
// 3. Repeat this step until all concepts and facts are covered.
|
|
186
|
-
|
|
187
|
-
// 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.`
|
|
188
|
-
|
|
189
|
-
// }
|
|
190
1
|
const promptString: string = `
|
|
191
2
|
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:
|
|
192
3
|
|
|
@@ -212,7 +23,7 @@ json
|
|
|
212
23
|
"test_cards": [
|
|
213
24
|
{
|
|
214
25
|
"type": "flash" | "mcq" | "cloze" | "match",
|
|
215
|
-
"card_content": {
|
|
26
|
+
"card_content": {schema for content is explained below in detail}
|
|
216
27
|
"card_reference": "heading",
|
|
217
28
|
"concepts": ["Concept1", "Concept2", "..."],
|
|
218
29
|
"facts": ["Fact1", "Fact2", "..."]
|