only_ever_generator 0.4.3 → 0.4.5

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.
@@ -41,21 +41,18 @@ class GenerateCards {
41
41
  });
42
42
  }
43
43
  parse(generatedData, isGapFill, headings) {
44
+ let usage_data = generatedData.metadata;
45
+ const status_code = generatedData.status_code;
44
46
  try {
45
47
  const cardData = [];
46
- let usage_data = generatedData.metadata;
47
- const status_code = generatedData.status_code;
48
- const missing_concepts = generatedData.generated_content.missing_concepts;
49
- const missing_facts = generatedData.generated_content.missing_facts;
50
48
  const unparsedTestCards = generatedData.generated_content.test_cards;
51
49
  const type = generatedData.type;
52
50
  if (unparsedTestCards !== undefined && unparsedTestCards.length != 0) {
53
51
  for (let elem of unparsedTestCards) {
54
- if (headings.includes(elem.card_reference)) {
55
- }
56
- else {
57
- elem.card_reference = '';
58
- }
52
+ // if(headings.includes(elem.card_reference)){
53
+ // }else{
54
+ // elem.card_reference = '';
55
+ // }
59
56
  if (elem.type == "flash") {
60
57
  cardData.push(this.parseFlashCard(elem));
61
58
  }
@@ -76,11 +73,11 @@ class GenerateCards {
76
73
  }
77
74
  }
78
75
  return {
79
- status_code: isGapFill ? status_code : cardData.length > 0 ? status_code : 500,
76
+ status_code: 500,
80
77
  metadata: usage_data,
81
78
  type: type,
82
- missing_concepts: missing_concepts,
83
- missing_facts: missing_facts,
79
+ missing_concepts: [],
80
+ missing_facts: [],
84
81
  cards_data: cardData,
85
82
  };
86
83
  }
@@ -88,11 +85,17 @@ class GenerateCards {
88
85
  new logger_1.ErrorLogger({
89
86
  "type": 'card_parsing',
90
87
  "data": e.message,
88
+ "response": generatedData,
91
89
  }).log();
92
90
  return {
93
91
  status_code: 500,
94
- type: 'card_gen',
92
+ metadata: usage_data,
93
+ type: generatedData.type,
95
94
  };
95
+ // return {
96
+ // status_code: 500,
97
+ // type: 'card_gen',
98
+ // }
96
99
  }
97
100
  }
98
101
  parseFlashCard(data) {
@@ -1,121 +1,112 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.returnCardGenPrompt = returnCardGenPrompt;
4
- const promptString = `
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:
4
+ const promptString = `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:
6
5
 
7
6
  1. Title of the source
8
7
  2. Main headings
9
8
  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
9
+ 4. The field of knowledge it belongs to
10
+ 5. Key concepts in the source and the relevant main heading it references.
11
+ 6. Important facts in the source and the relevant main heading it references.
14
12
 
15
- Follow these steps:
13
+ **Follow these steps:**
14
+ 1. Read the entire source, concepts and facts in the provide input.
15
+ 2. Generate test cards for concepts: Take each concept and re-read the text under the reference heading for that concept. Start by trying to create a card that is at the highest bloom level possible (5 being the highest). Then work your way down to the lower bloom levels. Generate as many cards as possible for each concept. Keep going through the list of concepts till you have completed all of them.
16
+ 3. Generate test cards for facts: Take each fact and re-read the text under the reference heading for that fact. Generate as many cards as possible to test that concept. Keep going through the list of concepts till you have completed all of them.
16
17
 
17
- 1. Analyze the content to identify any key concepts missing from the provided list.
18
- 2. Analyze the content to identify any important facts missing from the provided list.
19
- 3. Generate test cards for each concept and fact, tethered to either the entire source or specific headings.
20
- 4. Ensure all concepts and facts have at least one test card.
18
+ **Note:** Further detailed instructions on how to create the content for each test card type will be provided subsequently.
19
+
20
+ **Format your response in the following JSON format:**
21
21
 
22
- Please format your response in the following format.
23
22
  json
24
- "missing_concepts": ["concept1", "concept2", "concept3", "..."],
25
- "missing_facts": ["fact1", "fact2", "fact3", "..."],
23
+ {
26
24
  "test_cards": [
27
25
  {
28
- "type": "flash" | "mcq" | "cloze" | "match",
29
- "card_content": {schema for content is explained below in detail}
30
- "card_reference": "heading",
31
- "concepts": ["Concept1", "Concept2", "..."],
32
- "facts": ["Fact1", "Fact2", "..."]
26
+ "type": "mcq" | "cloze" | "match",
27
+ "card_content": "{content}",
28
+ "concepts": [
29
+ "concept1",
30
+ "concept2",
31
+ "..."
32
+ ],
33
+ "facts": [
34
+ "fact1",
35
+ "fact2",
36
+ "..."
37
+ ],
38
+ "bloom_level": 1 | 2 | 3 | 4 | 5
33
39
  }
34
40
  ]
41
+ }
35
42
 
36
- **Criteria**
37
- • Each test card must include at least one concept or fact.
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
43
 
41
- Further instructions are provided below.
44
+ **Criteria:**
42
45
 
43
- You are provided with a list of identified concepts. Review this list and the content to determine if any concepts are missing.
46
+ * Each test card must include at least one concept or fact.
47
+ * Each concept and fact must have at least one test card.
48
+ * The final output should include test cards that cover the first 5 levels of Bloom's Taxonomy.
44
49
 
45
- 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.
46
- 2. **Inclusion Criteria**: Include a concept only if it has not been previously included in the list provided to you.
50
+ **Further Instructions:**
47
51
 
48
- List the concepts in the following JSON format:
52
+ * Ensure variety in the types of test cards (MCQs, cloze tests, matching).
53
+ * Balance the distribution of Bloom's Taxonomy levels across the test cards.
54
+ * Provide clear and concise content for each test card, ensuring it is relevant to the concepts and facts identified.
55
+ * Use appropriate and engaging language to enhance learning and retention.
49
56
 
50
- json
51
- {
52
- "missing_concepts":
53
- [
54
- "concept1",
55
- "concept2",
56
- "concept3",
57
- "..."
58
- ]
59
- }
60
- You are provided with a list of identified facts. Review this list and the content to determine if any facts are missing.
57
+ This section provides detailed guidance on how to generate cards.
61
58
 
62
- 1. **Definition of a Fact**: Standalone information that is concrete and independently verifiable.
63
- 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
+ **Guidance on the card content**
64
60
 
65
- Record the facts in the following JSON format:
66
- json
67
- {
68
- "missing_facts": ["fact1", "fact2", "fact3", "..."]
69
- }
70
-
71
- After you have the complete list of concepts and facts, including any missing ones you identified, proceed to generate test cards for each.
72
-
73
- 1. Clarity: Ensure the test content is clear and unambiguous.
74
- 2. Specificity: Be specific about what you are asking. Avoid vague or overly broad questions or prompts.
75
- 3. Simplicity: Use simple and direct language. Avoid complex sentences or jargon unless testing understanding of that jargon.
76
- 4. Relevance: Ensure the test content is directly related to the key concepts or facts you want to test.
61
+ 1. Clarity: Ensure the test content is clear and unambiguous.
62
+ 2. Specificity: Be specific about what you are asking. Avoid vague or overly broad questions or prompts.
63
+ 3. Simplicity: Use simple and direct language. Avoid complex sentences or jargon unless testing understanding of that jargon.
64
+ 4. Relevance: Ensure the test content is related to the key concepts or facts you want to test.
77
65
 
78
- Include the following property for each card:
66
+ Include the following properties for each card:
79
67
 
80
- 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.
81
-
82
- 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).
68
+ 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 (Remembering) through 5 (Evaluating). Aim for a diverse range of cognitive challenges.
83
69
 
84
70
  Test cards must be one of the following types:
85
71
 
86
- 1. Flashcards: Have a front and back.
72
+ 1. Multiple Choice Questions (MCQ): Provide multiple choices to pick from. One or more should be correct.
87
73
 
88
- json:
89
- {
90
- "type": "flash",
91
- "card_content": {
92
- "front": "<content for the front>",
93
- "back": "<content for the back>"
94
- },
95
- "card_reference": "heading",
96
- "concepts": ["Concept1", "Concept2", "..."],
97
- "facts": ["Fact1", "Fact2", "..."],
98
- "bloom_level": <1-5>
99
- }
100
-
101
- - Each side must not exceed 300 characters.
102
- 2. Multiple Choice Questions (MCQ): Provide multiple choices to pick from. One or more should be correct.
103
-
104
- json:
74
+ json
105
75
  {
106
- "type": "mcq",
107
- "card_content": {
108
- "prompt": "<question text>",
109
- "choices": [
110
- {"choice": "choice 1", "is_correct": true or false},
111
- {"choice": "choice 2", "is_correct": true or false},
112
- "... up to 8 choices"
113
- ]
114
- },
115
- "card_reference": "heading",
116
- "concepts": ["Concept1", "Concept2", "..."],
117
- "facts": ["Fact1", "Fact2", "..."],
118
- "bloom_level": <1-5>
76
+ "type": "mcq",
77
+ "card_content": {
78
+ "prompt": "<question text>",
79
+ "choices": [
80
+ {"choice": "choice content", "is_correct": true or false},
81
+ {"choice": "choice content", "is_correct": true or false},
82
+ "... up to 8 choices"
83
+ ]
84
+ },
85
+ "concepts":
86
+ [
87
+ {
88
+ "concept_text": "concept1_content",
89
+ "reference": "source_title#main_heading"
90
+ },
91
+ {
92
+ "concept_text": "concept2_content",
93
+ "reference": "source_title#main_heading"
94
+ },
95
+ {...}
96
+ ],
97
+ "facts":
98
+ [
99
+ {
100
+ "factt_text": "fact1_content",
101
+ "reference": "source_title#main_heading"
102
+ },
103
+ {
104
+ "fact_text": "fact2_content",
105
+ "reference": "source_title#main_heading"
106
+ },
107
+ {...}
108
+ ],
109
+ "bloom_level": <1-5>
119
110
  }
120
111
 
121
112
  • Minimum choices required: 2
@@ -123,26 +114,48 @@ json:
123
114
  • Minimum correct choices required: 1
124
115
  • Maximum character length for the prompt: 320
125
116
  • Maximum character length for each choice: 42
117
+ • Do not add numbering to the choice content since these will be randomly sorted when displaying to the user
126
118
 
127
- 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.
119
+ 2. 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.
128
120
 
129
121
  json
130
122
  {
131
- "type": "cloze",
132
- "card_content": {
133
- "prompt": "Accidentals in music denote {{c0:notes}} that do not belong to the {{c1:scale}} or {{c2:mode}} indicated by the key signature.",
134
- "options": [
135
- {"option": "notes", "cloze": "c0"},
136
- {"option": "scale", "cloze": "c1"},
137
- {"option": "mode", "cloze": "c2"},
138
- {"option": "chords", "cloze": "null"},
139
- "... up to 8 choices"
140
- ]
141
- },
142
- "card_reference": "heading",
143
- "concepts": ["Concept1", "Concept2", "..."],
144
- "facts": ["Fact1", "Fact2", "..."],
145
- "bloom_level": <1-5>
123
+ "type": "cloze",
124
+ "card_content": {
125
+ "prompt": "Accidentals in music denote {{c0:notes}} that do not belong to the {{c1:scale}} or {{c2:mode}} indicated by the key signature.",
126
+ "options": [
127
+ {"option": "notes", "cloze": "c0"},
128
+ {"option": "scale", "cloze": "c1"},
129
+ {"option": "mode", "cloze": "c2"},
130
+ {"option": "chords", "cloze": "null"},
131
+ "... up to 8 choices"
132
+ ]
133
+ },
134
+ "concepts":
135
+ [
136
+ {
137
+ "concept_text": "concept1_content",
138
+ "reference": "source_title#main_heading"
139
+ },
140
+ {
141
+ "concept_text": "concept2_content",
142
+ "reference": "source_title#main_heading"
143
+ },
144
+ {...}
145
+ ],
146
+ "facts":
147
+ [
148
+ {
149
+ "factt_text": "fact1_content",
150
+ "reference": "source_title#main_heading"
151
+ },
152
+ {
153
+ "fact_text": "fact2_content",
154
+ "reference": "source_title#main_heading"
155
+ },
156
+ {...}
157
+ ],
158
+ "bloom_level": <1-5>
146
159
  }
147
160
 
148
161
  • Minimum choices required: 2
@@ -155,48 +168,73 @@ json
155
168
 
156
169
  json
157
170
  {
158
- "type": "match",
159
- "card_content": [
160
- {
161
- "left_item": "left choice",
162
- "right_item": [right item]
163
- },
164
- {
165
- "left_item":" left choice",
166
- "right_item": [right item]
167
- },
168
- {
169
- "left_item": "left choice",
170
- "right_item": [right item]
171
- },
172
- "... up to 8 total pairs"
173
- ],
174
- "card_reference": "heading",
175
- "concepts": ["Concept1", "Concept2", "..."],
176
- "facts": ["Fact1", "Fact2", "..."],
177
- "bloom_level": <1-5>
171
+ "type": "match",
172
+ "card_content": [
173
+ {
174
+ "left_item": "left choice",
175
+ "right_item": [right item]
176
+ },
177
+ {
178
+ "left_item":" left choice",
179
+ "right_item": [right item]
180
+ },
181
+ {
182
+ "left_item": "left choice",
183
+ "right_item": [right item]
184
+ },
185
+ "... up to 8 total pairs"
186
+ ],
187
+ "concepts":
188
+ [
189
+ {
190
+ "concept_text": "concept1_content",
191
+ "reference": "source_title#main_heading"
192
+ },
193
+ {
194
+ "concept_text": "concept2_content",
195
+ "reference": "source_title#main_heading"
196
+ },
197
+ {...}
198
+ ],
199
+ "facts":
200
+ [
201
+ {
202
+ "factt_text": "fact1_content",
203
+ "reference": "source_title#main_heading"
204
+ },
205
+ {
206
+ "fact_text": "fact2_content",
207
+ "reference": "source_title#main_heading"
208
+ },
209
+ {...}
210
+ ],
211
+ "bloom_level": <1-5>
178
212
  }
179
213
 
180
214
  • Maximum character length for each item in a pair: 42
181
-
182
215
 
183
- 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.
184
- 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.
216
+
217
+ ** Criteria **
218
+
219
+ 1. Ensure that you produce at least one if not more card for each concept and fact.
220
+ 2. For each concept and fact start by trying to create a card at the highest bloom level possible.
221
+ 3. Do not skip any concepts or facts, and be thorough in your coverage.
222
+ 4. Cards should span across different levels of Bloom’s Taxonomy, from level 1 (Remembering) to level 5 (Evaluating), but exclude level 6 (Creating)
223
+
224
+ Once you are done generating the test cards. Go back and evaulate the full list of concepts and facts provided as the input.
185
225
 
186
226
  Are there any concept or fact that don't have a test card yet? If yes, go back and create one.
187
227
 
188
228
  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.
189
- Generate atleast 10 cards.
190
229
 
230
+ Once you are done generating the test cards, review the full list of concepts and facts, including any missing ones you identified.
231
+
232
+ 1. Ensure every concept and fact has at least one test card (if not more).
233
+ 2. If any concept or fact is missing a test card, create one for it.
234
+ 3. Repeat this step until all concepts and facts are covered.
235
+
236
+ 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.
191
237
  `;
192
238
  function returnCardGenPrompt(cardGenPrompt) {
193
239
  return promptString;
194
240
  }
195
- // let concatenatedString: string = '';
196
- // for (let key in cardGenPrompt) {
197
- // if (cardGenPrompt.hasOwnProperty(key)) {
198
- // concatenatedString += cardGenPrompt[key];
199
- // }
200
- // }
201
- // return concatenatedString;
202
- // }
@@ -18,7 +18,7 @@ json
18
18
  [
19
19
  {
20
20
  "concept_text": "concept_content",
21
- "reference": "source_title#main_heading"
21
+ "reference": "main_heading"
22
22
  },
23
23
  {...}
24
24
  ],
@@ -26,7 +26,7 @@ json
26
26
  [
27
27
  {
28
28
  "fact_text": "fact_content",
29
- "reference": "source_title#main_heading"
29
+ "reference": "main_heading"
30
30
  },
31
31
  {...}
32
32
  ],
@@ -73,7 +73,7 @@ json
73
73
  [
74
74
  {
75
75
  "concept_text": "concept_content",
76
- "reference": "source_title#main_heading"
76
+ "reference": "main_heading"
77
77
  },
78
78
  {...}
79
79
  ]
@@ -91,7 +91,7 @@ json
91
91
  [
92
92
  {
93
93
  "fact_text": "fact_content",
94
- "reference": "source_title#main_heading"
94
+ "reference": "main_heading"
95
95
  },
96
96
  {...}
97
97
  ]
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.returnFields = returnFields;
4
4
  exports.returnSourceData = returnSourceData;
5
5
  exports.returnHeadings = returnHeadings;
6
+ exports.returnCardResponse = returnCardResponse;
6
7
  const sourceString = [
7
8
  {
8
9
  "block_type": "paragraph",
@@ -1258,54 +1259,86 @@ function returnFields() {
1258
1259
  }
1259
1260
  const sourceContent = {
1260
1261
  type: 'source',
1261
- title: 'Time zone',
1262
+ title: 'Sunni Islam',
1262
1263
  headings: headings,
1263
1264
  content: sourceString,
1264
1265
  fields: returnFields(),
1265
- "taxonomy": {
1266
+ taxonomy: {
1266
1267
  "fields": [
1267
1268
  {
1268
- "primary_field": "Reference & Indexing",
1269
+ "primary_field": "Humanities & Cultural Studies",
1269
1270
  "reconcile": false
1270
1271
  },
1271
1272
  {
1272
- "secondary_field": "History",
1273
- "reconcile": true
1273
+ "secondary_field": "Social Sciences & Global Studies",
1274
+ "reconcile": false
1274
1275
  },
1275
1276
  {
1276
- "tertiary_field": "Technology & Media Literacy",
1277
+ "tertiary_field": "Other",
1277
1278
  "reconcile": false
1278
1279
  }
1279
1280
  ],
1280
1281
  "concepts": [
1281
- "Latin alphabet",
1282
- "Phonetic alphabet",
1283
- "International Phonetic Alphabet",
1284
- "Voiced labiodental fricative",
1285
- "Orthography",
1286
- "Frequency in English language",
1287
- "Scrabble letter frequency",
1288
- "Pronunciation in different languages",
1289
- "Latin alphabet evolution",
1290
- "Ligatures and abbreviations in Latin",
1291
- "Periodic table element symbolism"
1282
+ {
1283
+ "concept_text": "Definition of Sunni Islam",
1284
+ "reference": "Sunni Islam#Terminology"
1285
+ },
1286
+ {
1287
+ "concept_text": "History of Sunni beliefs",
1288
+ "reference": "Sunni Islam#History"
1289
+ },
1290
+ {
1291
+ "concept_text": "Sunni jurisprudence and its sources",
1292
+ "reference": "Sunni Islam#Jurisprudence"
1293
+ },
1294
+ {
1295
+ "concept_text": "Principal articles of Sunni faith",
1296
+ "reference": "Sunni Islam#Pillars of iman"
1297
+ },
1298
+ {
1299
+ "concept_text": "Sunni organizations and institutions",
1300
+ "reference": "Sunni Islam#Sunni State institutions"
1301
+ },
1302
+ {
1303
+ "concept_text": "Identity as the 'saved sect'",
1304
+ "reference": "Sunni Islam#Self-image of the Sunnis"
1305
+ },
1306
+ {
1307
+ "concept_text": "Rivalry between Sunni theological schools",
1308
+ "reference": "Sunni Islam#Rivalry between Ashʿarīya and Salafīya and the 2016 Sunni conferences"
1309
+ }
1292
1310
  ],
1293
1311
  "facts": [
1294
- "V is the twenty-second letter in the Latin alphabet.",
1295
- "It is used in the modern English alphabet and the alphabets of other western European languages.",
1296
- "V comes from the Phoenician letter *waw* by way of U.",
1297
- "During the Late Middle Ages, the pointed form \"v\" was used at the beginning of a word, while a rounded form \"u\" was used in the middle or end, regardless of sound.",
1298
- "V is the sixth least frequently used letter in the English language, with a frequency of about 1% in words.",
1299
- "V is not used to form an English two-letter word in the British and Australian versions of Scrabble.",
1300
- "The letter V represents the voiced labiodental fricative in the International Phonetic Alphabet.",
1301
- "V is also used as a symbol for the chemical element vanadium on the periodic table.",
1302
- "Ligatures and abbreviations such as ℣ and Ꝟ were used for medieval scribal abbreviations."
1312
+ {
1313
+ "fact_text": "85-90% of Muslims are Sunni.",
1314
+ "reference": "Sunni Islam#Terminology"
1315
+ },
1316
+ {
1317
+ "fact_text": "The first four caliphs are Abu Bakr, Umar, Uthman, Ali.",
1318
+ "reference": "Sunni Islam#History"
1319
+ },
1320
+ {
1321
+ "fact_text": "Sunni Islam centers around four legal schools.",
1322
+ "reference": "Sunni Islam#Jurisprudence"
1323
+ },
1324
+ {
1325
+ "fact_text": "The six pillars of imān are key beliefs in Sunni Islam.",
1326
+ "reference": "Sunni Islam#Pillars of iman"
1327
+ },
1328
+ {
1329
+ "fact_text": "Azhar University is a leading Sunni institution.",
1330
+ "reference": "Sunni Islam#Sunni State institutions"
1331
+ },
1332
+ {
1333
+ "fact_text": "Sunnis view themselves as the saved sect.",
1334
+ "reference": "Sunni Islam#Self-image of the Sunnis"
1335
+ }
1303
1336
  ],
1304
1337
  "generate_cards": {
1305
1338
  "state": true,
1306
- "false_reason": ""
1339
+ "reason": ""
1307
1340
  }
1308
- },
1341
+ }
1309
1342
  };
1310
1343
  function returnSourceData() {
1311
1344
  return sourceContent;
@@ -1313,3 +1346,6 @@ function returnSourceData() {
1313
1346
  function returnHeadings() {
1314
1347
  return headings;
1315
1348
  }
1349
+ function returnCardResponse() {
1350
+ return JSON.parse(`{"status_code":200,"usage_data":{"prompt_tokens":23234,"completion_tokens":2796,"total_tokens":26030},"generated_content":{"test_cards":[{"type":"mcq","card_content":{"prompt":"Which term is used to refer to the largest branch of Islam, followed by 85-90% of Muslims worldwide?","choices":[{"choice":"Sunni Islam","is_correct":true},{"choice":"Shia Islam","is_correct":false},{"choice":"Kharijites","is_correct":false},{"choice":"Ibadi","is_correct":false}]},"concepts":[{"concept_text":"Definition of Sunni Islam","reference":"Sunni Islam#Terminology"}],"facts":[{"fact_text":"85-90% of Muslims are Sunni.","reference":"Sunni Islam#Terminology"}],"bloom_level":1},{"type":"mcq","card_content":{"prompt":"Who were the first four caliphs recognized by Sunnis?","choices":[{"choice":"Abu Bakr, Umar, Uthman, Ali","is_correct":true},{"choice":"Ali, Hasan, Husayn, Yazid","is_correct":false},{"choice":"Umar, Uthman, Muawiya, Yazid","is_correct":false},{"choice":"Hasan, Husayn, Abu Bakr, Umar","is_correct":false}]},"concepts":[{"concept_text":"History of Sunni beliefs","reference":"Sunni Islam#History"}],"facts":[{"fact_text":"The first four caliphs are Abu Bakr, Umar, Uthman, Ali.","reference":"Sunni Islam#History"}],"bloom_level":1},{"type":"cloze","card_content":{"prompt":"The six {{c0: pillars}} of imān are key beliefs in Sunni Islam.","options":[{"option":"pillars","cloze":"c0"},{"option":"caliphs","cloze":"null"},{"option":"sections","cloze":"null"},{"option":"rules","cloze":"null"}]},"concepts":[{"concept_text":"Principal articles of Sunni faith","reference":"Sunni Islam#Pillars of iman"}],"facts":[{"fact_text":"The six pillars of imān are key beliefs in Sunni Islam.","reference":"Sunni Islam#Pillars of iman"}],"bloom_level":1},{"type":"mcq","card_content":{"prompt":"Which institution is considered a leading Sunni university?","choices":[{"choice":"Azhar University","is_correct":true},{"choice":"Harvard University","is_correct":false},{"choice":"Oxford University","is_correct":false},{"choice":"Yale University","is_correct":false}]},"concepts":[{"concept_text":"Sunni organizations and institutions","reference":"Sunni Islam#Sunni State institutions"}],"facts":[{"fact_text":"Azhar University is a leading Sunni institution.","reference":"Sunni Islam#Sunni State institutions"}],"bloom_level":1},{"type":"mcq","card_content":{"prompt":"What is a fundamental self-image of Sunni Muslims concerning their religious identity?","choices":[{"choice":"They are the saved sect","is_correct":true},{"choice":"They are the oppressed sect","is_correct":false},{"choice":"They are the innovators","is_correct":false},{"choice":"They are the deviants","is_correct":false}]},"concepts":[{"concept_text":"Identity as the 'saved sect'","reference":"Sunni Islam#Self-image of the Sunnis"}],"facts":[{"fact_text":"Sunnis view themselves as the saved sect.","reference":"Sunni Islam#Self-image of the Sunnis"}],"bloom_level":1},{"type":"mcq","card_content":{"prompt":"What major rivalry exists within Sunni Islam?","choices":[{"choice":"Between Ashʿarīya and Salafīya","is_correct":true},{"choice":"Between Sufis and Wahhabis","is_correct":false},{"choice":"Between Hanafis and Malikis","is_correct":false},{"choice":"Between Shafi'is and Hanbalis","is_correct":false}]},"concepts":[{"concept_text":"Rivalry between Sunni theological schools","reference":"Sunni Islam#Rivalry between Ashʿarīya and Salafīya and the 2016 Sunni conferences"}],"facts":[],"bloom_level":1},{"type":"cloze","card_content":{"prompt":"Sunni Islam centers around four {{c0: legal schools}}.","options":[{"option":"legal schools","cloze":"c0"},{"option":"pillars of faith","cloze":"null"},{"option":"caliphs","cloze":"null"},{"option":"sects","cloze":"null"}]},"concepts":[{"concept_text":"Sunni jurisprudence and its sources","reference":"Sunni Islam#Jurisprudence"}],"facts":[{"fact_text":"Sunni Islam centers around four legal schools.","reference":"Sunni Islam#Jurisprudence"}],"bloom_level":1},{"type":"match","card_content":{"ash'ari":"Founded by Abu al-Hasan al-Ash'ari","maturidi":"Founded by Abu Mansur al-Maturidi","athari":"Strict textualism in interpreting Qur'an and sunnah"},"concepts":[{"concept_text":"Rivalry between Sunni theological schools","reference":"Sunni Islam#Rivalry between Ashʿarīya and Salafīya and the 2016 Sunni conferences"}],"facts":[],"bloom_level":2},{"type":"mcq","card_content":{"prompt":"Which of the following is NOT one of the six principal articles of faith in Sunni Islam?","choices":[{"choice":"Belief in the Prophets of God","is_correct":false},{"choice":"Belief in Angels","is_correct":false},{"choice":"Belief in Trinity","is_correct":true},{"choice":"Belief in Resurrection after Death","is_correct":false}]},"concepts":[{"concept_text":"Principal articles of Sunni faith","reference":"Sunni Islam#Pillars of iman"}],"facts":[],"bloom_level":2},{"type":"cloze","card_content":{"prompt":"A well-known Hadith says that the Muslim Umma will split into 73 sects, only one of which will be {{c0: saved}}.","options":[{"option":"saved","cloze":"c0"},{"option":"punished","cloze":"null"},{"option":"enriched","cloze":"null"},{"option":"condemned","cloze":"null"}]},"concepts":[{"concept_text":"Identity as the 'saved sect'","reference":"Sunni Islam#Self-image of the Sunnis"}],"facts":[],"bloom_level":2},{"type":"mcq","card_content":{"prompt":"What does 'jama' in the phrase 'ahl as-sunna wal-jama' signify?","choices":[{"choice":"Community","is_correct":true},{"choice":"Unity","is_correct":false},{"choice":"Faith","is_correct":false},{"choice":"Law","is_correct":false}]},"concepts":[{"concept_text":"Definition of Sunni Islam","reference":"Sunni Islam#Terminology"}],"facts":[],"bloom_level":1},{"type":"mcq","card_content":{"prompt":"Which of the following sources forms the basis for Sunni jurisprudence?","choices":[{"choice":"The Quran and Hadith","is_correct":true},{"choice":"Solely Quran","is_correct":false},{"choice":"Only the Hadith","is_correct":false},{"choice":"The Quran and Sira","is_correct":false}]},"concepts":[{"concept_text":"Sunni jurisprudence and its sources","reference":"Sunni Islam#Jurisprudence"}],"facts":[],"bloom_level":2},{"type":"cloze","card_content":{"prompt":"Sunni Muslims accept the {{c0: hadith}} collections of Bukhari and Muslim as the most authentic.","options":[{"option":"hadith","cloze":"c0"},{"option":"Qur'an","cloze":"null"},{"option":"tafsir","cloze":"null"},{"option":"fatwa","cloze":"null"}]},"concepts":[{"concept_text":"Sunni view of hadith","reference":"Sunni Islam#Sunni view of hadith"}],"facts":[],"bloom_level":1},{"type":"cloze","card_content":{"prompt":"Sunni jurisprudence is derived from the Quran, hadith, {{c0: juristic consensus}}, and analogical reasoning.","options":[{"option":"juristic consensus","cloze":"c0"},{"option":"personal opinion","cloze":"null"},{"option":"cultural practice","cloze":"null"},{"option":"political authority","cloze":"null"}]},"concepts":[{"concept_text":"Sunni jurisprudence and its sources","reference":"Sunni Islam#Jurisprudence"}],"facts":[],"bloom_level":3},{"type":"cloze","card_content":{"prompt":"One of the most important teaching institutions of Sunni Islam worldwide is the {{c0: Azhar}} in Egypt.","options":[{"option":"Azhar","cloze":"c0"},{"option":"Al-Haram","cloze":"null"},{"option":"Al-Aqsa","cloze":"null"},{"option":"Blue Mosque","cloze":"null"}]},"concepts":[{"concept_text":"Sunni organizations and institutions","reference":"Sunni Islam#Sunni State institutions"}],"facts":[{"fact_text":"Azhar University is a leading Sunni institution.","reference":"Sunni Islam#Sunni State institutions"}],"bloom_level":2}]},"generated_at":"2024-09-11T08:26:12.000Z"}`);
1351
+ }