only_ever_generator 0.2.8 → 0.2.9

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/index.js CHANGED
@@ -45,7 +45,7 @@ Object.defineProperty(exports, "OnlyEverGenerator", { enumerable: true, get: fun
45
45
  // // summary_prompt: "",
46
46
  // // }
47
47
  // // )
48
- // let typologyRequest = await oeGen.generate(true, true);
48
+ // let typologyRequest = await oeGen.generate(false, true);
49
49
  // res.send(typologyRequest);
50
50
  // }
51
51
  // });
@@ -10,13 +10,6 @@ class ParseSourceContent {
10
10
  // if(this.content.type == 'source') {
11
11
  let dataAfterRemovingUnWantedBlocks = this.removeSectionsByTitle(this.content.content);
12
12
  let afterSanitized = this.sanitizeBlocks(dataAfterRemovingUnWantedBlocks);
13
- let taxonomy;
14
- if (this.content.taxonomy) {
15
- taxonomy = this.content.taxonomy;
16
- }
17
- else {
18
- taxonomy = null;
19
- }
20
13
  return {
21
14
  type: this.content.type,
22
15
  title: this.content.title,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "only_ever_generator",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "start": "npm run build && nodemon dist/index.js",
@@ -45,7 +45,7 @@ export class OnlyEverGenerator {
45
45
 
46
46
  },
47
47
  // parsedData.type == 'cards' ? this.typologyResponse = parsedData.taxonomy : this.typologyResponse = null;
48
- this.typologyResponse = parsedData.taxonomy
48
+ this.typologyResponse = generationContent.content.taxonomy
49
49
 
50
50
  this.expectedFields = generationContent.content.fields; //returnFields();
51
51
  this.promptForTypology = returnTypologyPrompt(generationContent.prompt.typology);
@@ -58,7 +58,7 @@ if(unparsedTestCards !== undefined && unparsedTestCards.length != 0) {
58
58
 
59
59
 
60
60
  return {
61
- status_code: status_code,
61
+ status_code: isGapFill? status_code : cardData.length> 0 ? status_code: 500,
62
62
  metadata: usage_data,
63
63
  type: type,
64
64
  missing_concepts: missing_concepts,
@@ -1,5 +1,6 @@
1
- // const promptString = `
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:
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:
3
4
 
4
5
  // 1. Title of the source
5
6
  // 2. Main headings
@@ -17,145 +18,161 @@
17
18
  // 4. Ensure all concepts and facts have at least one test card.
18
19
 
19
20
  // Please format your response in the following format.
20
- // json
21
- // "missing_concepts": ["concept1", "concept2", "concept3", "..."],
22
- // "missing_facts": ["fact1", "fact2", "fact3", "..."],
23
- // "test_cards": [
24
- // {
25
- // "type": "flash" | "mcq" | "cloze" | "match",
26
- // "card_content": { "front": "...", "back": "..." | "prompt": "...", "choices": [ ... ] | "prompt": "...", "options": [ ... ] | "right_choice 1": "...", "left_choice 1": "..." },
27
- // "card_reference": "heading",
28
- // "concepts": ["Concept1", "Concept2", "..."],
29
- // "facts": ["Fact1", "Fact2", "..."]
30
- // }
31
- // ]
32
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": "source_title#heading",
29
+ // "concepts": ["Concept1", "Concept2", "..."],
30
+ // "facts": ["Fact1", "Fact2", "..."],
31
+ // "bloom_level": <1-5>
32
+ // }
33
+ // ]
33
34
  // **Criteria**
35
+ // • Atleast one test card must be generated.
34
36
  // • Each test card must include at least one concept or fact.
37
+ // • Each test card must include bloom_level.
35
38
  // • Flashcards must not exceed 15% of the total number of cards.
36
39
  // • Each concept and fact must have at least one test card.
37
40
 
38
41
  // Further instructions are provided below.
39
- // Concepts are fundamental ideas that form the basis of knowledge in any discipline. They help organize and explain information, making it accessible and relatable.
40
-
41
- // You are provided with a list of identified concepts. Review this list and the content to determine if any concepts are missing.
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.
42
45
 
43
- // 1. **Definition of a Concept**: Concepts should be significant ideas within the content that are essential for understanding the main themes.
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.
44
47
  // 2. **Inclusion Criteria**: Include a concept only if it has not been previously included in the list provided to you.
45
48
 
46
49
  // List the concepts in the following JSON format:
47
-
48
- // json
49
50
  // {
50
- // "missing_concepts": ["concept1", "concept2", "concept3", "..."]
51
+ // "missing_concepts":
52
+ // [
53
+ // "concept1",
54
+ // "concept2",
55
+ // "concept3",
56
+ // "..."
57
+ // ]
51
58
  // }
52
-
53
- // Facts are objective statements supported by empirical evidence or observation, such as data on events, people, numbers, dates, or well-established ideas.
54
-
55
- // You are provided with a list of identified facts. Review this list and the content to determine if any facts are missing.
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.
56
62
 
57
63
  // 1. **Definition of a Fact**: Standalone information that is concrete and independently verifiable.
58
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.
59
65
 
60
66
  // Record the facts in the following JSON format:
61
-
62
- // json
63
67
  // {
64
- // "missing_facts": ["fact1", "fact2", "fact3", "..."]
68
+ // "missing_facts": ["fact1", "fact2", "fact3", "..."]
65
69
  // }
66
- // After you have the complete list of concepts and facts, including any missing ones you identified, proceed to generate test cards for each.
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.
67
78
 
68
- // 1. Clarity: Ensure the test content is clear and unambiguous.
69
- // 2. Specificity: Be specific about what you are asking. Avoid vague or overly broad questions or prompts.
70
- // 3. Simplicity: Use simple and direct language. Avoid complex sentences or jargon unless testing understanding of that jargon.
71
- // 4. Relevance: Ensure the test content is directly related to the key concepts or facts you want to test.
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).
72
85
 
73
86
  // Test cards must be one of the following types:
74
87
 
75
88
  // 1. Flashcards: Have a front and back.
76
- // 2. A flashcard consists of two sides: a front and a back. Both the front and back text content must not exceed more than 300 characters in length.
77
89
 
78
- // json schema for Flash Cards:
90
+ // json:
79
91
  // {
80
- // "type": "flash",
81
- // "card_content": {
82
- // "front": "<content for the front of the flashcard>",
83
- // "back": "<content for the back of the flashcard>"
84
- // },
85
- // "card_reference": "heading",
86
- // "concepts": ["Concept1", "Concept2", "..."],
87
- // "facts": ["Fact1", "Fact2", "..."]
92
+ // "type": "flash",
93
+ // "card_content": {
94
+ // "front": "<content for the front>",
95
+ // "back": "<content for the back>"
96
+ // },
97
+ // "card_reference": "source_title#heading",
98
+ // "concepts": ["Concept1", "Concept2", "..."],
99
+ // "facts": ["Fact1", "Fact2", "..."],
100
+ // "bloom_level": <1-5>
88
101
  // }
89
102
 
90
-
103
+ // - Each side must not exceed 300 characters.
91
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": "source_title#heading",
118
+ // "concepts": ["Concept1", "Concept2", "..."],
119
+ // "facts": ["Fact1", "Fact2", "..."],
120
+ // "bloom_level": <1-5>
121
+ // }
122
+
92
123
  // • Minimum choices required: 2
93
124
  // • Maximum choices allowed: 8
94
125
  // • Minimum correct choices required: 1
95
126
  // • Maximum character length for the prompt: 320
96
127
  // • Maximum character length for each choice: 42
97
128
 
98
- // json schema for mcqs
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
99
132
  // {
100
- // "type": "mcq",
101
- // "card_content": {
102
- // "prompt": "<question text>",
103
- // "choices": [
104
- // {"choice": "choice 1", "is_correct": true or false},
105
- // {"choice": "choice 2", "is_correct": true or false},
106
- // "... up to 8 choices"
107
- // ]
108
- // },
109
- // "card_reference": "heading",
110
- // "concepts": ["Concept1", "Concept2", "..."],
111
- // "facts": ["Fact1", "Fact2", "..."]
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": "source_title#heading",
145
+ // "concepts": ["Concept1", "Concept2", "..."],
146
+ // "facts": ["Fact1", "Fact2", "..."],
147
+ // "bloom_level": <1-5>
112
148
  // }
113
149
 
114
- // 3. Cloze:
115
- // Fill-in-the-blank style test card. Use double curly braces {{}} to indicate a cloze this is absolute necessagr
116
150
  // • Minimum choices required: 2
117
151
  // • Maximum choices allowed: 8
118
152
  // • Minimum correct choices required: 1
119
153
  // • Maximum character length for the prompt: 320
120
154
  // • Maximum character length for an individual cloze: 90
121
155
 
122
- // json schema for cloze
123
- // {
124
- // "type": "cloze",
125
- // "card_content": {
126
- // "text": "Accidentals in music denote {{c0:notes}} that do not belong to the {{c1:scale}} or {{c2:mode}} indicated by the key signature.",
127
- // "options": [
128
- // {"option": "notes", "cloze": "c0"},
129
- // {"option": "scale", "cloze": "c1"},
130
- // {"option": "mode", "cloze": "c2"},
131
- // {"option": "chords", "cloze": null},
132
- // "... up to 8 choices"
133
- // ]
134
- // },
135
- // "card_reference": "heading",
136
- // "concepts": ["Concept1", "Concept2", "..."],
137
- // "facts": ["Fact1", "Fact2", "..."]
138
- // }
139
-
140
-
141
-
142
156
  // 4. Match: Pairing items.
143
- // • Maximum character length for each item in a pair: 42
144
157
 
145
- // json schema for match
158
+ // json
146
159
  // {
147
- // "type": "match",
148
- // "card_content": {
149
- // "right_choice 1": "left_choice 1",
150
- // "right_choice 2": "left_choice 2",
151
- // "... up to 8 total pairs"
152
- // },
153
- // "card_reference": "heading",
154
- // "concepts": ["Concept1", "Concept2", "..."],
155
- // "facts": ["Fact1", "Fact2", "..."]
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": "source_title#heading",
167
+ // "concepts": ["Concept1", "Concept2", "..."],
168
+ // "facts": ["Fact1", "Fact2", "..."],
169
+ // "bloom_level": <1-5>
156
170
  // }
157
171
 
158
- // 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.
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: source_title#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.
159
176
 
160
177
  // Are there any concept or fact that don't have a test card yet? If yes, go back and create one.
161
178
 
@@ -163,16 +180,15 @@
163
180
 
164
181
  // Once you are done generating the test cards, review the full list of concepts and facts, including any missing ones you identified.
165
182
 
166
- // 1. Ensure every concept and fact has at least one test card (if not more).
167
- // 2. If any concept or fact is missing a test card, create one for it.
168
- // 3. Repeat this step until all concepts and facts are covered.
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.
169
186
 
170
- // 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.
171
- // `;
172
-
173
- const promptString : any = {
174
- role: `
175
- 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:
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
+ const promptString: string = `
191
+ 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:
176
192
 
177
193
  1. Title of the source
178
194
  2. Main headings
@@ -190,108 +206,101 @@ Follow these steps:
190
206
  4. Ensure all concepts and facts have at least one test card.
191
207
 
192
208
  Please format your response in the following format.
209
+ json
210
+ "missing_concepts": ["concept1", "concept2", "concept3", "..."],
211
+ "missing_facts": ["fact1", "fact2", "fact3", "..."],
212
+ "test_cards": [
213
+ {
214
+ "type": "flash" | "mcq" | "cloze" | "match",
215
+ "card_content": { "front": "...", "back": "..." | "prompt": "...", "choices": [ ... ] | "prompt": "...", "options": [ ... ] | "right_choice 1": "...", "left_choice 1": "..." },
216
+ "card_reference": "source_title#heading",
217
+ "concepts": ["Concept1", "Concept2", "..."],
218
+ "facts": ["Fact1", "Fact2", "..."]
219
+ }
220
+ ]
193
221
 
194
- "missing_concepts": ["concept1", "concept2", "concept3", "..."],
195
- "missing_facts": ["fact1", "fact2", "fact3", "..."],
196
- "test_cards": [
197
- {
198
- "type": "flash" | "mcq" | "cloze" | "match",
199
- "card_content": { "front": "...", "back": "..." | "prompt": "...", "choices": [ ... ] | "prompt": "...", "options": [ ... ] | "...": "...", "....": "..." },
200
- "card_reference": "source_title#heading",
201
- "concepts": ["Concept1", "Concept2", "..."],
202
- "facts": ["Fact1", "Fact2", "..."],
203
- "bloom_level": <1-5>
204
- }
205
- ]
206
222
  **Criteria**
207
- • Atleast one test card must be generated.
208
223
  • Each test card must include at least one concept or fact.
209
- • Each test card must include bloom_level.
210
224
  • Flashcards must not exceed 15% of the total number of cards.
211
225
  • Each concept and fact must have at least one test card.
212
226
 
213
227
  Further instructions are provided below.
214
- `,
215
- concepts : `
216
- You are provided with a list of identified concepts. Review this list and the content to determine if any concepts are missing.
228
+
229
+ You are provided with a list of identified concepts. Review this list and the content to determine if any concepts are missing.
217
230
 
218
231
  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.
219
232
  2. **Inclusion Criteria**: Include a concept only if it has not been previously included in the list provided to you.
220
233
 
221
234
  List the concepts in the following JSON format:
235
+
236
+ json
222
237
  {
223
- "missing_concepts":
224
- [
225
- "concept1",
226
- "concept2",
227
- "concept3",
228
- "..."
229
- ]
238
+ "missing_concepts":
239
+ [
240
+ "concept1",
241
+ "concept2",
242
+ "concept3",
243
+ "..."
244
+ ]
230
245
  }
231
- `,
232
- facts :`
233
246
  You are provided with a list of identified facts. Review this list and the content to determine if any facts are missing.
234
247
 
235
248
  1. **Definition of a Fact**: Standalone information that is concrete and independently verifiable.
236
249
  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.
237
250
 
238
251
  Record the facts in the following JSON format:
252
+ json
239
253
  {
240
- "missing_facts": ["fact1", "fact2", "fact3", "..."]
254
+ "missing_facts": ["fact1", "fact2", "fact3", "..."]
241
255
  }
242
- `,
243
- card_gen: `
244
256
  After you have the complete list of concepts and facts, including any missing ones you identified, proceed to generate test cards for each.
245
257
 
246
- 1. Clarity: Ensure the test content is clear and unambiguous.
247
- 2. Specificity: Be specific about what you are asking. Avoid vague or overly broad questions or prompts.
248
- 3. Simplicity: Use simple and direct language. Avoid complex sentences or jargon unless testing understanding of that jargon.
249
- 4. Relevance: Ensure the test content is directly related to the key concepts or facts you want to test.
258
+ 1. Clarity: Ensure the test content is clear and unambiguous.
259
+ 2. Specificity: Be specific about what you are asking. Avoid vague or overly broad questions or prompts.
260
+ 3. Simplicity: Use simple and direct language. Avoid complex sentences or jargon unless testing understanding of that jargon.
261
+ 4. Relevance: Ensure the test content is directly related to the key concepts or facts you want to test.
250
262
 
251
263
  Include the following property for each card:
252
264
 
253
265
  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.
254
266
 
255
- Make sure to include this field in each card.
256
267
  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).
257
268
 
258
269
  Test cards must be one of the following types:
259
270
 
260
271
  1. Flashcards: Have a front and back.
261
272
 
262
- json:
273
+ json
263
274
  {
264
- "type": "flash",
265
- "card_content": {
266
- "front": "<content for the front>",
267
- "back": "<content for the back>"
268
- },
269
- "card_reference": "source_title#heading",
270
- "concepts": ["Concept1", "Concept2", "..."],
271
- "facts": ["Fact1", "Fact2", "..."],
272
- "bloom_level": <1-5>
275
+ "type": "flash",
276
+ "card_content": {
277
+ "front": "<content for the front>",
278
+ "back": "<content for the back>"
279
+ },
280
+ "card_reference": "source_title#heading",
281
+ "concepts": ["Concept1", "Concept2", "..."],
282
+ "facts": ["Fact1", "Fact2", "..."],
283
+ "bloom_level": <1-5>
273
284
  }
274
-
275
285
  - Each side must not exceed 300 characters.
276
286
  2. Multiple Choice Questions (MCQ): Provide multiple choices to pick from. One or more should be correct.
277
287
 
278
- json:
288
+ json
279
289
  {
280
- "type": "mcq",
281
- "card_content": {
282
- "prompt": "<question text>",
283
- "choices": [
284
- {"choice": "choice 1", "is_correct": true or false},
285
- {"choice": "choice 2", "is_correct": true or false},
286
- "... up to 8 choices"
287
- ]
288
- },
289
- "card_reference": "source_title#heading",
290
- "concepts": ["Concept1", "Concept2", "..."],
291
- "facts": ["Fact1", "Fact2", "..."],
292
- "bloom_level": <1-5>
290
+ "type": "mcq",
291
+ "card_content": {
292
+ "prompt": "<question text>",
293
+ "choices": [
294
+ {"choice": "choice 1", "is_correct": true or false},
295
+ {"choice": "choice 2", "is_correct": true or false},
296
+ "... up to 8 choices"
297
+ ]
298
+ },
299
+ "card_reference": "source_title#heading",
300
+ "concepts": ["Concept1", "Concept2", "..."],
301
+ "facts": ["Fact1", "Fact2", "..."],
302
+ "bloom_level": <1-5>
293
303
  }
294
-
295
304
  • Minimum choices required: 2
296
305
  • Maximum choices allowed: 8
297
306
  • Minimum correct choices required: 1
@@ -302,23 +311,22 @@ json:
302
311
 
303
312
  json
304
313
  {
305
- "type": "cloze",
306
- "card_content": {
307
- "prompt": "Accidentals in music denote {{c0:notes}} that do not belong to the {{c1:scale}} or {{c2:mode}} indicated by the key signature.",
308
- "options": [
309
- {"option": "notes", "cloze": "c0"},
310
- {"option": "scale", "cloze": "c1"},
311
- {"option": "mode", "cloze": "c2"},
312
- {"option": "chords", "cloze": "null"},
313
- "... up to 8 choices"
314
- ]
315
- },
316
- "card_reference": "source_title#heading",
317
- "concepts": ["Concept1", "Concept2", "..."],
318
- "facts": ["Fact1", "Fact2", "..."],
319
- "bloom_level": <1-5>
314
+ "type": "cloze",
315
+ "card_content": {
316
+ "prompt": "Accidentals in music denote {{c0:notes}} that do not belong to the {{c1:scale}} or {{c2:mode}} indicated by the key signature.",
317
+ "options": [
318
+ {"option": "notes", "cloze": "c0"},
319
+ {"option": "scale", "cloze": "c1"},
320
+ {"option": "mode", "cloze": "c2"},
321
+ {"option": "chords", "cloze": "null"},
322
+ "... up to 8 choices"
323
+ ]
324
+ },
325
+ "card_reference": "source_title#heading",
326
+ "concepts": ["Concept1", "Concept2", "..."],
327
+ "facts": ["Fact1", "Fact2", "..."],
328
+ "bloom_level": <1-5>
320
329
  }
321
-
322
330
  • Minimum choices required: 2
323
331
  • Maximum choices allowed: 8
324
332
  • Minimum correct choices required: 1
@@ -326,47 +334,39 @@ json
326
334
  • Maximum character length for an individual cloze: 90
327
335
 
328
336
  4. Match: Pairing items.
329
-
330
337
  json
331
338
  {
332
- "type": "match",
333
- "card_content": {
334
- "left_choice 1": "right_choice 1",
335
- "left_choice 2": "right_choice 2",
336
- "... up to 8 total pairs"
337
- },
338
- "card_reference": "source_title#heading",
339
- "concepts": ["Concept1", "Concept2", "..."],
340
- "facts": ["Fact1", "Fact2", "..."],
341
- "bloom_level": <1-5>
339
+ "type": "match",
340
+ "card_content": {
341
+ "right_choice 1": "left_choice 1",
342
+ "right_choice 2": "left_choice 2",
343
+ "... up to 8 total pairs"
344
+ },
345
+ "card_reference": "source_title#heading",
346
+ "concepts": ["Concept1", "Concept2", "..."],
347
+ "facts": ["Fact1", "Fact2", "..."],
348
+ "bloom_level": <1-5>
342
349
  }
343
-
344
350
  • Maximum character length for each item in a pair: 42
345
- `,
346
- 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.`,
347
- 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.
351
+
352
+ 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.
353
+ 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.
348
354
 
349
355
  Are there any concept or fact that don't have a test card yet? If yes, go back and create one.
350
356
 
351
357
  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.
358
+ Generate atleast 10 cards.
352
359
 
353
- Once you are done generating the test cards, review the full list of concepts and facts, including any missing ones you identified.
354
-
355
- 1. Ensure every concept and fact has at least one test card (if not more).
356
- 2. If any concept or fact is missing a test card, create one for it.
357
- 3. Repeat this step until all concepts and facts are covered.
358
-
359
- 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.`
360
-
361
- }
362
-
360
+ `;
363
361
  export function returnCardGenPrompt(cardGenPrompt: any){
364
- let concatenatedString: string = '';
365
- for (let key in cardGenPrompt) {
366
- if (cardGenPrompt.hasOwnProperty(key)) {
367
- concatenatedString += cardGenPrompt[key];
368
- }
369
- }
370
- return concatenatedString;
362
+ return promptString;
371
363
  }
364
+ // let concatenatedString: string = '';
365
+ // for (let key in cardGenPrompt) {
366
+ // if (cardGenPrompt.hasOwnProperty(key)) {
367
+ // concatenatedString += cardGenPrompt[key];
368
+ // }
369
+ // }
370
+ // return concatenatedString;
371
+ // }
372
372
 
@@ -193,11 +193,5 @@ Format your output in JSON as follows:
193
193
  }
194
194
 
195
195
  export function returnTypologyPrompt(typologyPrompt: any){
196
- let concatenatedString: string = '';
197
- for (let key in typologyPrompt) {
198
- if (typologyPrompt.hasOwnProperty(key)) {
199
- concatenatedString += typologyPrompt[key];
200
- }
201
- }
202
- return concatenatedString;
196
+ return typologyPrompt;
203
197
  }