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.
@@ -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 = parsedData.taxonomy;
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);
@@ -71,7 +71,7 @@ class GenerateCards {
71
71
  }
72
72
  }
73
73
  return {
74
- status_code: status_code,
74
+ status_code: isGapFill ? status_code : cardData.length > 0 ? status_code : 500,
75
75
  metadata: usage_data,
76
76
  type: type,
77
77
  missing_concepts: missing_concepts,
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
- // const promptString = `
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:
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
- // json
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": [ ... ] | "right_choice 1": "...", "left_choice 1": "..." },
26
- // "card_reference": "heading",
27
- // "concepts": ["Concept1", "Concept2", "..."],
28
- // "facts": ["Fact1", "Fact2", "..."]
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
- // Concepts are fundamental ideas that form the basis of knowledge in any discipline. They help organize and explain information, making it accessible and relatable.
37
- // You are provided with a list of identified concepts. Review this list and the content to determine if any concepts are missing.
38
- // 1. **Definition of a Concept**: Concepts should be significant ideas within the content that are essential for understanding the main themes.
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
- // "missing_concepts": ["concept1", "concept2", "concept3", "..."]
46
+ // "missing_concepts":
47
+ // [
48
+ // "concept1",
49
+ // "concept2",
50
+ // "concept3",
51
+ // "..."
52
+ // ]
44
53
  // }
45
- // Facts are objective statements supported by empirical evidence or observation, such as data on events, people, numbers, dates, or well-established ideas.
46
- // You are provided with a list of identified facts. Review this list and the content to determine if any facts are missing.
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
- // "missing_facts": ["fact1", "fact2", "fact3", "..."]
61
+ // "missing_facts": ["fact1", "fact2", "fact3", "..."]
53
62
  // }
54
- // After you have the complete list of concepts and facts, including any missing ones you identified, proceed to generate test cards for each.
55
- // 1. Clarity: Ensure the test content is clear and unambiguous.
56
- // 2. Specificity: Be specific about what you are asking. Avoid vague or overly broad questions or prompts.
57
- // 3. Simplicity: Use simple and direct language. Avoid complex sentences or jargon unless testing understanding of that jargon.
58
- // 4. Relevance: Ensure the test content is directly related to the key concepts or facts you want to test.
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
- // 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.
62
- // json schema for Flash Cards:
76
+ // json:
63
77
  // {
64
- // "type": "flash",
65
- // "card_content": {
66
- // "front": "<content for the front of the flashcard>",
67
- // "back": "<content for the back of the flashcard>"
68
- // },
69
- // "card_reference": "heading",
70
- // "concepts": ["Concept1", "Concept2", "..."],
71
- // "facts": ["Fact1", "Fact2", "..."]
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
- // json schema for mcqs
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
- // "type": "mcq",
82
- // "card_content": {
83
- // "prompt": "<question text>",
84
- // "choices": [
85
- // {"choice": "choice 1", "is_correct": true or false},
86
- // {"choice": "choice 2", "is_correct": true or false},
87
- // "... up to 8 choices"
88
- // ]
89
- // },
90
- // "card_reference": "heading",
91
- // "concepts": ["Concept1", "Concept2", "..."],
92
- // "facts": ["Fact1", "Fact2", "..."]
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
- // • Maximum character length for each item in a pair: 42
120
- // json schema for match
136
+ // json
121
137
  // {
122
- // "type": "match",
123
- // "card_content": {
124
- // "right_choice 1": "left_choice 1",
125
- // "right_choice 2": "left_choice 2",
126
- // "... up to 8 total pairs"
127
- // },
128
- // "card_reference": "heading",
129
- // "concepts": ["Concept1", "Concept2", "..."],
130
- // "facts": ["Fact1", "Fact2", "..."]
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
- // 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.
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
- // 1. Ensure every concept and fact has at least one test card (if not more).
137
- // 2. If any concept or fact is missing a test card, create one for it.
138
- // 3. Repeat this step until all concepts and facts are covered.
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
- role: `
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
- concepts: `
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
- "missing_concepts":
192
- [
193
- "concept1",
194
- "concept2",
195
- "concept3",
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
- "missing_facts": ["fact1", "fact2", "fact3", "..."]
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
- 1. Clarity: Ensure the test content is clear and unambiguous.
215
- 2. Specificity: Be specific about what you are asking. Avoid vague or overly broad questions or prompts.
216
- 3. Simplicity: Use simple and direct language. Avoid complex sentences or jargon unless testing understanding of that jargon.
217
- 4. Relevance: Ensure the test content is directly related to the key concepts or facts you want to test.
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
- "type": "flash",
233
- "card_content": {
234
- "front": "<content for the front>",
235
- "back": "<content for the back>"
236
- },
237
- "card_reference": "source_title#heading",
238
- "concepts": ["Concept1", "Concept2", "..."],
239
- "facts": ["Fact1", "Fact2", "..."],
240
- "bloom_level": <1-5>
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
- "type": "mcq",
249
- "card_content": {
250
- "prompt": "<question text>",
251
- "choices": [
252
- {"choice": "choice 1", "is_correct": true or false},
253
- {"choice": "choice 2", "is_correct": true or false},
254
- "... up to 8 choices"
255
- ]
256
- },
257
- "card_reference": "source_title#heading",
258
- "concepts": ["Concept1", "Concept2", "..."],
259
- "facts": ["Fact1", "Fact2", "..."],
260
- "bloom_level": <1-5>
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
- "type": "cloze",
274
- "card_content": {
275
- "prompt": "Accidentals in music denote {{c0:notes}} that do not belong to the {{c1:scale}} or {{c2:mode}} indicated by the key signature.",
276
- "options": [
277
- {"option": "notes", "cloze": "c0"},
278
- {"option": "scale", "cloze": "c1"},
279
- {"option": "mode", "cloze": "c2"},
280
- {"option": "chords", "cloze": "null"},
281
- "... up to 8 choices"
282
- ]
283
- },
284
- "card_reference": "source_title#heading",
285
- "concepts": ["Concept1", "Concept2", "..."],
286
- "facts": ["Fact1", "Fact2", "..."],
287
- "bloom_level": <1-5>
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
- "type": "match",
301
- "card_content": {
302
- "left_choice 1": "right_choice 1",
303
- "left_choice 2": "right_choice 2",
304
- "... up to 8 total pairs"
305
- },
306
- "card_reference": "source_title#heading",
307
- "concepts": ["Concept1", "Concept2", "..."],
308
- "facts": ["Fact1", "Fact2", "..."],
309
- "bloom_level": <1-5>
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
- 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.`,
315
- 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.
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
- Once you are done generating the test cards, review the full list of concepts and facts, including any missing ones you identified.
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
- let concatenatedString = '';
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
- let concatenatedString = '';
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;