only_ever_generator 3.0.6 → 3.0.8
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.d.ts +1 -1
- package/dist/bootstrap/app.d.ts.map +1 -1
- package/dist/bootstrap/app.js +16 -16
- package/dist/bootstrap/app.js.map +1 -1
- package/dist/card_gen/generate_cards.d.ts.map +1 -1
- package/dist/card_gen/generate_cards.js +6 -1
- package/dist/card_gen/generate_cards.js.map +1 -1
- package/dist/index.js +232 -236
- package/dist/index.js.map +1 -1
- package/dist/typology_gen/generate_concept_facts.d.ts.map +1 -1
- package/dist/typology_gen/generate_concept_facts.js +12 -1
- package/dist/typology_gen/generate_concept_facts.js.map +1 -1
- package/dist/typology_gen/generate_typology.d.ts.map +1 -1
- package/dist/typology_gen/generate_typology.js +6 -1
- package/dist/typology_gen/generate_typology.js.map +1 -1
- package/package.json +1 -1
- package/src/bootstrap/app.ts +17 -6
- package/src/card_gen/generate_cards.ts +6 -1
- package/src/index.ts +235 -236
- package/src/typology_gen/generate_concept_facts.ts +12 -1
- package/src/typology_gen/generate_typology.ts +6 -1
|
@@ -36,7 +36,12 @@ class GenerateTypology {
|
|
|
36
36
|
heading_type: this.type == "video" ? "timecode" : "h1 heading",
|
|
37
37
|
},
|
|
38
38
|
},
|
|
39
|
-
input:
|
|
39
|
+
input: [
|
|
40
|
+
{
|
|
41
|
+
role: "user",
|
|
42
|
+
content: [{ type: "input_text", text: this.content }],
|
|
43
|
+
},
|
|
44
|
+
],
|
|
40
45
|
store: false,
|
|
41
46
|
text: {
|
|
42
47
|
format: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate_typology.js","sourceRoot":"","sources":["../../src/typology_gen/generate_typology.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,2DAAkE;AAClE,sCAAwC;AAGxC,6GAAkG;AAElG,MAAa,gBAAgB;IAM3B,YACE,aAA4B,EAC5B,IAAY,EACZ,OAAe,EACf,eAA8B,EAC9B,mBAA2B;QATtB,SAAI,GAAW,EAAE,CAAC;QAClB,YAAO,GAAW,EAAE,CAAC;QAU1B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,cAAc,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,IAAY,EAAE,EAAE,CACzD,IAAI,CAAC,WAAW,EAAE,CACnB,CAAC;QACF,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;IACjD,CAAC;IACK,QAAQ;;;YACZ,IAAI,CAAC;gBACH,2BAA2B;gBAC3B,MAAM,YAAY,GAAG,IAAI,4BAAY,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;gBAElE,MAAM,cAAc,GAAQ,MAAM,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;oBACrE,MAAM,EAAE;wBACN,EAAE,EAAE,IAAI,CAAC,mBAAmB;wBAC5B,SAAS,EAAE;4BACT,YAAY,EAAE,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY;yBAC/D;qBACF;oBACD,KAAK,EAAE,IAAI,CAAC,OAAO;
|
|
1
|
+
{"version":3,"file":"generate_typology.js","sourceRoot":"","sources":["../../src/typology_gen/generate_typology.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,2DAAkE;AAClE,sCAAwC;AAGxC,6GAAkG;AAElG,MAAa,gBAAgB;IAM3B,YACE,aAA4B,EAC5B,IAAY,EACZ,OAAe,EACf,eAA8B,EAC9B,mBAA2B;QATtB,SAAI,GAAW,EAAE,CAAC;QAClB,YAAO,GAAW,EAAE,CAAC;QAU1B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAA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AAC,gBAAgB,CAAC,KAAK,CAAC;YAE/C,cAAc,EAAE,gBAAgB,CAAC,WAAW;YAC5C,aAAa,EAAE,gBAAgB,CAAC,aAAa;YAC7C,2BAA2B;SAC5B,CAAC;IACJ,CAAC;IAED,WAAW,CAAC,MAAqB;QAC/B,MAAM,SAAS,GAAG,CAAC,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;QACzE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;YAC9C,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI;YACxB,SAAS,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;SAC7D,CAAC,CAAC,CAAC;IACN,CAAC;IAEK,sBAAsB,CAAC,YAAiB;;YAC5C,YAAY,CAAC,QAAQ,CAAC,MAAM,GAAG,QAAQ,CAAC;YAExC,OAAO;gBACL,WAAW,EAAE,YAAY,CAAC,WAAW;gBACrC,QAAQ,EAAE,YAAY,CAAC,QAAQ;aAChC,CAAC;QACJ,CAAC;KAAA;CACF;AAnHD,4CAmHC"}
|
package/package.json
CHANGED
package/src/bootstrap/app.ts
CHANGED
|
@@ -107,7 +107,9 @@ export class OnlyEverGenerator {
|
|
|
107
107
|
|
|
108
108
|
if (this.typologyResponse?.status_code == 200) {
|
|
109
109
|
console.log("Concept facts generating");
|
|
110
|
-
const response = await this.generateConceptFacts(
|
|
110
|
+
const response = await this.generateConceptFacts(
|
|
111
|
+
this.typologyResponse
|
|
112
|
+
);
|
|
111
113
|
this.typologyResponse.concepts_facts = response.concepts_facts;
|
|
112
114
|
console.log("Concept facts generated");
|
|
113
115
|
console.log(this.typologyResponse);
|
|
@@ -195,15 +197,18 @@ export class OnlyEverGenerator {
|
|
|
195
197
|
}
|
|
196
198
|
|
|
197
199
|
async generateTypology() {
|
|
200
|
+
const type = this.parsedContent?.type ?? "text";
|
|
198
201
|
const content = {
|
|
199
202
|
title: this.parsedContent?.title,
|
|
200
|
-
|
|
203
|
+
...(type === "text"
|
|
204
|
+
? { h1_headings: this.parsedContent?.headings ?? [] }
|
|
205
|
+
: { timecodes: this.parsedContent?.headings ?? [] }),
|
|
201
206
|
content: this.parsedContent?.content,
|
|
202
207
|
};
|
|
203
208
|
try {
|
|
204
209
|
let response = await new GenerateTypology(
|
|
205
210
|
this.openAiService,
|
|
206
|
-
|
|
211
|
+
type,
|
|
207
212
|
JSON.stringify(content),
|
|
208
213
|
this.expectedFields,
|
|
209
214
|
this.promptIdForTypology
|
|
@@ -214,16 +219,22 @@ export class OnlyEverGenerator {
|
|
|
214
219
|
}
|
|
215
220
|
}
|
|
216
221
|
|
|
217
|
-
async generateConceptFacts() {
|
|
222
|
+
async generateConceptFacts(typologyResponse: any) {
|
|
223
|
+
const type = this.parsedContent?.type ?? "text";
|
|
218
224
|
const content = {
|
|
219
225
|
title: this.parsedContent?.title ?? "",
|
|
220
|
-
|
|
226
|
+
...(type === "text"
|
|
227
|
+
? { h1_headings: this.parsedContent?.headings ?? [] }
|
|
228
|
+
: { timecodes: this.parsedContent?.headings ?? [] }),
|
|
221
229
|
content: this.parsedContent?.content ?? [],
|
|
230
|
+
...(typologyResponse && typeof typologyResponse === "object"
|
|
231
|
+
? typologyResponse
|
|
232
|
+
: {}),
|
|
222
233
|
};
|
|
223
234
|
let response = await new GenerateConceptFacts(
|
|
224
235
|
this.openAiService,
|
|
225
236
|
content,
|
|
226
|
-
|
|
237
|
+
type,
|
|
227
238
|
this.promptIdForConceptFacts
|
|
228
239
|
).generate();
|
|
229
240
|
return response;
|
package/src/index.ts
CHANGED
|
@@ -936,67 +936,68 @@ export { OnlyEverGenerator };
|
|
|
936
936
|
// "Notable awards and honors",
|
|
937
937
|
// "References",
|
|
938
938
|
// ],
|
|
939
|
-
// taxonomy: {
|
|
940
|
-
//
|
|
941
|
-
//
|
|
942
|
-
//
|
|
943
|
-
//
|
|
944
|
-
//
|
|
945
|
-
//
|
|
946
|
-
//
|
|
947
|
-
//
|
|
948
|
-
//
|
|
949
|
-
//
|
|
950
|
-
//
|
|
951
|
-
//
|
|
952
|
-
//
|
|
953
|
-
//
|
|
954
|
-
//
|
|
955
|
-
//
|
|
956
|
-
//
|
|
957
|
-
//
|
|
958
|
-
//
|
|
959
|
-
//
|
|
960
|
-
//
|
|
961
|
-
//
|
|
962
|
-
//
|
|
963
|
-
//
|
|
964
|
-
//
|
|
965
|
-
//
|
|
966
|
-
//
|
|
967
|
-
//
|
|
968
|
-
//
|
|
969
|
-
//
|
|
970
|
-
//
|
|
971
|
-
//
|
|
972
|
-
//
|
|
973
|
-
//
|
|
974
|
-
//
|
|
975
|
-
//
|
|
976
|
-
//
|
|
977
|
-
//
|
|
978
|
-
//
|
|
979
|
-
//
|
|
980
|
-
//
|
|
981
|
-
//
|
|
982
|
-
//
|
|
983
|
-
//
|
|
984
|
-
//
|
|
985
|
-
//
|
|
986
|
-
//
|
|
987
|
-
//
|
|
988
|
-
//
|
|
989
|
-
//
|
|
990
|
-
//
|
|
991
|
-
//
|
|
939
|
+
// // taxonomy: {
|
|
940
|
+
// // concepts_facts: [
|
|
941
|
+
// // {
|
|
942
|
+
// // text: "C19orf47 gene encodes Chromosome 19 open reading frame 47 protein",
|
|
943
|
+
// // type: "concept",
|
|
944
|
+
// // reference: "",
|
|
945
|
+
// // },
|
|
946
|
+
// // {
|
|
947
|
+
// // text: "Gene locus described by cytogenetic band and genomic coordinates",
|
|
948
|
+
// // type: "concept",
|
|
949
|
+
// // reference: "Gene",
|
|
950
|
+
// // },
|
|
951
|
+
// // {
|
|
952
|
+
// // text: "Alternative splicing generates multiple mRNA isoforms from one gene",
|
|
953
|
+
// // type: "concept",
|
|
954
|
+
// // reference: "mRNA",
|
|
955
|
+
// // },
|
|
956
|
+
// // {
|
|
957
|
+
// // text: "Protein domains and post-translational modifications regulate function",
|
|
958
|
+
// // type: "concept",
|
|
959
|
+
// // reference: "Protein",
|
|
960
|
+
// // },
|
|
961
|
+
// // {
|
|
962
|
+
// // text: "Subcellular localization directs protein activity in nucleoplasm and nucleus",
|
|
963
|
+
// // type: "concept",
|
|
964
|
+
// // reference: "Protein",
|
|
965
|
+
// // },
|
|
966
|
+
// // {
|
|
967
|
+
// // text: "Orthologous genes across diverse taxa indicate evolutionary conservation",
|
|
968
|
+
// // type: "concept",
|
|
969
|
+
// // reference: "Homology",
|
|
970
|
+
// // },
|
|
971
|
+
// // {
|
|
972
|
+
// // text: "Low tissue-specific expression can influence phenotypic impact of variants",
|
|
973
|
+
// // type: "concept",
|
|
974
|
+
// // reference: "Clinical Significance",
|
|
975
|
+
// // },
|
|
976
|
+
// // {
|
|
977
|
+
// // text: "Isoform 1 precursor transcript of C19orf47 contains 8 exons",
|
|
978
|
+
// // type: "fact",
|
|
979
|
+
// // reference: "Gene",
|
|
980
|
+
// // },
|
|
981
|
+
// // {
|
|
982
|
+
// // text: "Orthologs of C19orf47 exist in mammals, reptiles, amphibians, fish, insects, and plants",
|
|
983
|
+
// // type: "fact",
|
|
984
|
+
// // reference: "Homology",
|
|
985
|
+
// // },
|
|
986
|
+
// // {
|
|
987
|
+
// // text: "A C19orf47 variant was noted in one family with dystonia but TUBB4A mutation was causative",
|
|
988
|
+
// // type: "fact",
|
|
989
|
+
// // reference: "Clinical Significance",
|
|
990
|
+
// // },
|
|
991
|
+
// // ],
|
|
992
992
|
|
|
993
|
-
//
|
|
993
|
+
// // fields: ["Sciences", "Health & Medicine"],
|
|
994
|
+
|
|
995
|
+
// // generate_cards: {
|
|
996
|
+
// // state: true,
|
|
997
|
+
// // reason: "",
|
|
998
|
+
// // },
|
|
999
|
+
// // },
|
|
994
1000
|
|
|
995
|
-
// generate_cards: {
|
|
996
|
-
// state: true,
|
|
997
|
-
// reason: "",
|
|
998
|
-
// },
|
|
999
|
-
// },
|
|
1000
1001
|
// content: content.content,
|
|
1001
1002
|
// fields: [
|
|
1002
1003
|
// "Sciences",
|
|
@@ -1008,197 +1009,195 @@ export { OnlyEverGenerator };
|
|
|
1008
1009
|
// },
|
|
1009
1010
|
// };
|
|
1010
1011
|
|
|
1011
|
-
// const bloomInstructions = `
|
|
1012
|
-
// ## Guidance for creating Bloom Level 1 questions
|
|
1012
|
+
// // const bloomInstructions = `
|
|
1013
|
+
// // ## Guidance for creating Bloom Level 1 questions
|
|
1013
1014
|
|
|
1014
|
-
// Bloom Level 1 questions focus on recall and recognition of specific facts, terms, definitions, or concepts as they were originally presented. These questions do not ask learners to explain, interpret, or apply ideas—just to retrieve them.
|
|
1015
|
+
// // Bloom Level 1 questions focus on recall and recognition of specific facts, terms, definitions, or concepts as they were originally presented. These questions do not ask learners to explain, interpret, or apply ideas—just to retrieve them.
|
|
1015
1016
|
|
|
1016
|
-
// Note that these are **structured test cards**, not open-ended tasks.
|
|
1017
|
+
// // Note that these are **structured test cards**, not open-ended tasks.
|
|
1017
1018
|
|
|
1018
|
-
// ### What to Do
|
|
1019
|
+
// // ### What to Do
|
|
1019
1020
|
|
|
1020
|
-
// - Write questions that target a single fact or concept (or two closely linked ones).
|
|
1021
|
-
// - Use phrasing that closely mirrors the original presentation.
|
|
1022
|
-
// - Prioritize coverage across the set rather than going deep into any one idea.
|
|
1023
|
-
// - Avoid asking learners to explain, compare, or infer.
|
|
1021
|
+
// // - Write questions that target a single fact or concept (or two closely linked ones).
|
|
1022
|
+
// // - Use phrasing that closely mirrors the original presentation.
|
|
1023
|
+
// // - Prioritize coverage across the set rather than going deep into any one idea.
|
|
1024
|
+
// // - Avoid asking learners to explain, compare, or infer.
|
|
1024
1025
|
|
|
1025
|
-
// ### Common Task Types
|
|
1026
|
+
// // ### Common Task Types
|
|
1026
1027
|
|
|
1027
|
-
// - Recall specific terms, dates, names, steps, or definitions
|
|
1028
|
-
// - Match terms to their descriptions
|
|
1029
|
-
// - Identify correct options in multiple-choice format
|
|
1030
|
-
// - Recognize correct labels or locations in a list or image
|
|
1028
|
+
// // - Recall specific terms, dates, names, steps, or definitions
|
|
1029
|
+
// // - Match terms to their descriptions
|
|
1030
|
+
// // - Identify correct options in multiple-choice format
|
|
1031
|
+
// // - Recognize correct labels or locations in a list or image
|
|
1031
1032
|
|
|
1032
|
-
// ## Success Criteria
|
|
1033
|
+
// // ## Success Criteria
|
|
1033
1034
|
|
|
1034
|
-
// Create cards **until you have referenced ALL distinct concepts and facts** provided to you.
|
|
1035
|
-
// `;
|
|
1036
|
-
// const cardInstructions = `
|
|
1037
|
-
// # Multiple Choice Questions (MCQ) Cards
|
|
1035
|
+
// // Create cards **until you have referenced ALL distinct concepts and facts** provided to you.
|
|
1036
|
+
// // `;
|
|
1038
1037
|
|
|
1039
|
-
//
|
|
1038
|
+
// // const cardInstructions = `
|
|
1039
|
+
// // # Multiple Choice Questions (MCQ) Cards
|
|
1040
1040
|
|
|
1041
|
-
//
|
|
1041
|
+
// // Provide multiple choices to pick from. One or more should be correct.
|
|
1042
1042
|
|
|
1043
|
-
//
|
|
1043
|
+
// // ## Content Guidelines For mcq cards**
|
|
1044
1044
|
|
|
1045
|
-
//
|
|
1045
|
+
// // **Only plain text is allowed** for mcq cards.
|
|
1046
1046
|
|
|
1047
|
-
//
|
|
1048
|
-
// json
|
|
1049
|
-
// {
|
|
1050
|
-
// "type": "mcq",
|
|
1051
|
-
// "card_content": {
|
|
1052
|
-
// "prompt": "<question text>",
|
|
1053
|
-
// "choices": [
|
|
1054
|
-
// {"choice": "choice content", "is_correct": true or false},
|
|
1055
|
-
// {"choice": "choice content", "is_correct": true or false},
|
|
1056
|
-
// "... up to 8 choices"
|
|
1057
|
-
// ],
|
|
1058
|
-
// "explanation": "Clarify the concepts and facts in this card to the help the user understand the answer(s). Avoid meta-comments (e.g., “this card checks recall”). Keep it conversational, clear and concise. Don't repeat the answers verbatim. Stay within 320 characters. Include only if it adds real value or context."
|
|
1059
|
-
// },
|
|
1060
|
-
// "concepts": ["concept1", "concept2", "..."],
|
|
1061
|
-
// "facts": ["fact1", "fact2", "..."],
|
|
1062
|
-
// "bloom_alignment": "Explain why this card fits the bloom level you were asked to create (max. 240 chars)"
|
|
1063
|
-
// }
|
|
1047
|
+
// // ## Schema
|
|
1064
1048
|
|
|
1065
|
-
//
|
|
1049
|
+
// // Use the schema below to create new MCQ cards.
|
|
1050
|
+
// // json
|
|
1051
|
+
// // {
|
|
1052
|
+
// // "type": "mcq",
|
|
1053
|
+
// // "card_content": {
|
|
1054
|
+
// // "prompt": "<question text>",
|
|
1055
|
+
// // "choices": [
|
|
1056
|
+
// // {"choice": "choice content", "is_correct": true or false},
|
|
1057
|
+
// // {"choice": "choice content", "is_correct": true or false},
|
|
1058
|
+
// // "... up to 8 choices"
|
|
1059
|
+
// // ],
|
|
1060
|
+
// // "explanation": "Clarify the concepts and facts in this card to the help the user understand the answer(s). Avoid meta-comments (e.g., “this card checks recall”). Keep it conversational, clear and concise. Don't repeat the answers verbatim. Stay within 320 characters. Include only if it adds real value or context."
|
|
1061
|
+
// // },
|
|
1062
|
+
// // "concepts": ["concept1", "concept2", "..."],
|
|
1063
|
+
// // "facts": ["fact1", "fact2", "..."],
|
|
1064
|
+
// // "bloom_alignment": "Explain why this card fits the bloom level you were asked to create (max. 240 chars)"
|
|
1065
|
+
// // }
|
|
1066
1066
|
|
|
1067
|
-
//
|
|
1068
|
-
// - Minimum choices required: 2
|
|
1069
|
-
// - Maximum choices allowed (correct + incorrect): 8
|
|
1070
|
-
// - Minimum correct choices required: 1
|
|
1071
|
-
// - Maximum correct choices: 4
|
|
1072
|
-
// - Maximum character length for the prompt: 320
|
|
1073
|
-
// - Maximum character length for each choice: 42
|
|
1074
|
-
// - DO NOT add numbering to the choice content since these will be randomly sorted when displaying to the user
|
|
1075
|
-
// `;
|
|
1076
|
-
// const cardExamples = `
|
|
1077
|
-
// ## Examples of Level 1 MCQ cards
|
|
1067
|
+
// // ## Requirements
|
|
1078
1068
|
|
|
1079
|
-
//
|
|
1080
|
-
//
|
|
1081
|
-
//
|
|
1082
|
-
//
|
|
1083
|
-
//
|
|
1084
|
-
//
|
|
1085
|
-
//
|
|
1086
|
-
//
|
|
1087
|
-
//
|
|
1088
|
-
//
|
|
1089
|
-
//
|
|
1090
|
-
// ],
|
|
1091
|
-
// "explanation": "Folsom culture comes after Clovis and is identified by refined fluted points distinct from earlier Clovis tools."
|
|
1092
|
-
// },
|
|
1093
|
-
// "concepts": [
|
|
1094
|
-
// "Folsom culture succeeded Clovis and is distinguished by its fluted projectile points"
|
|
1095
|
-
// ],
|
|
1096
|
-
// "facts": [
|
|
1097
|
-
// "Folsom points are smaller and more refined than Clovis points"
|
|
1098
|
-
// ],
|
|
1099
|
-
// "bloom_alignment": "Level 1—learners merely recall the name of the culture; no higher-order thinking is required."
|
|
1100
|
-
// },
|
|
1101
|
-
// {
|
|
1102
|
-
// "type": "mcq",
|
|
1103
|
-
// "card_content": {
|
|
1104
|
-
// "prompt": "Who published an 1831 critique describing the Book of Mormon as an attempt to resolve Protestant debates?",
|
|
1105
|
-
// "choices": [
|
|
1106
|
-
// { "choice": "Alexander Campbell", "is_correct": true },
|
|
1107
|
-
// { "choice": "Joseph Smith", "is_correct": false },
|
|
1108
|
-
// { "choice": "E. D. Howe", "is_correct": false },
|
|
1109
|
-
// { "choice": "Charles Finney", "is_correct": false }
|
|
1110
|
-
// ],
|
|
1111
|
-
// "explanation": "Alexander Campbell’s 1831 pamphlet was one of the earliest printed critiques of the Book of Mormon."
|
|
1112
|
-
// },
|
|
1113
|
-
// "concepts": [
|
|
1114
|
-
// "Alexander Campbell criticized the Book of Mormon as an attempt to resolve Protestant debates"
|
|
1115
|
-
// ],
|
|
1116
|
-
// "facts": [
|
|
1117
|
-
// "Alexander Campbell published his critique of the Book of Mormon in 1831"
|
|
1118
|
-
// ],
|
|
1119
|
-
// "bloom_alignment": "Level 1—asks for straightforward recall of who authored the 1831 critique."
|
|
1120
|
-
// },
|
|
1121
|
-
// {
|
|
1122
|
-
// "type": "mcq",
|
|
1123
|
-
// "card_content": {
|
|
1124
|
-
// "prompt": "Which keyword is required inside a Python generator function to produce values lazily?",
|
|
1125
|
-
// "choices": [
|
|
1126
|
-
// { "choice": "yield", "is_correct": true },
|
|
1127
|
-
// { "choice": "return", "is_correct": false },
|
|
1128
|
-
// { "choice": "await", "is_correct": false },
|
|
1129
|
-
// { "choice": "pass", "is_correct": false }
|
|
1130
|
-
// ],
|
|
1131
|
-
// "explanation": "The yield keyword turns a regular function into a generator, pausing and resuming execution between values."
|
|
1132
|
-
// },
|
|
1133
|
-
// "concepts": [
|
|
1134
|
-
// "In Python, generator functions use the yield keyword to produce sequences lazily"
|
|
1135
|
-
// ],
|
|
1136
|
-
// "facts": [
|
|
1137
|
-
// "Generators in Python are defined using the def keyword and yield statements"
|
|
1138
|
-
// ],
|
|
1139
|
-
// "bloom_alignment": "Level 1—learners only need to recognize the specific keyword, a pure recall task."
|
|
1140
|
-
// },
|
|
1141
|
-
// {
|
|
1142
|
-
// "type": "mcq",
|
|
1143
|
-
// "card_content": {
|
|
1144
|
-
// "prompt": "Adopting what pelvis posture helps prevent spinal curvature imbalances?",
|
|
1145
|
-
// "choices": [
|
|
1146
|
-
// { "choice": "Neutral pelvis posture", "is_correct": true },
|
|
1147
|
-
// { "choice": "Anterior pelvic tilt", "is_correct": false },
|
|
1148
|
-
// { "choice": "Posterior pelvic tilt", "is_correct": false },
|
|
1149
|
-
// { "choice": "Kyphotic posture", "is_correct": false }
|
|
1150
|
-
// ],
|
|
1151
|
-
// "explanation": "Keeping the pelvis neutral supports the spine’s natural S-curve, reducing undue strain."
|
|
1152
|
-
// },
|
|
1153
|
-
// "concepts": [
|
|
1154
|
-
// "Adopting a neutral pelvis posture helps prevent spinal curvature imbalances"
|
|
1155
|
-
// ],
|
|
1156
|
-
// "facts": [
|
|
1157
|
-
// "A neutral pelvis posture can be achieved by aligning the ASIS and PSIS bones"
|
|
1158
|
-
// ],
|
|
1159
|
-
// "bloom_alignment": "Level 1—requires simple recall of the posture term without analysis."
|
|
1160
|
-
// },
|
|
1161
|
-
// {
|
|
1162
|
-
// "type": "mcq",
|
|
1163
|
-
// "card_content": {
|
|
1164
|
-
// "prompt": "Which law of thermodynamics states that if two systems are each in thermal equilibrium with a third, they are in equilibrium with each other?",
|
|
1165
|
-
// "choices": [
|
|
1166
|
-
// { "choice": "Zeroth Law of Thermodynamics", "is_correct": true },
|
|
1167
|
-
// { "choice": "First Law of Thermodynamics", "is_correct": false },
|
|
1168
|
-
// { "choice": "Second Law of Thermodynamics", "is_correct": false },
|
|
1169
|
-
// { "choice": "Third Law of Thermodynamics", "is_correct": false }
|
|
1170
|
-
// ],
|
|
1171
|
-
// "explanation": "This statement defines the Zeroth Law, forming the basis for the temperature concept used by thermometers."
|
|
1172
|
-
// },
|
|
1173
|
-
// "concepts": [
|
|
1174
|
-
// "The Zeroth Law of Thermodynamics defines the concept of thermal equilibrium"
|
|
1175
|
-
// ],
|
|
1176
|
-
// "facts": [
|
|
1177
|
-
// "The Zeroth Law states that if two systems are in thermal equilibrium with a third, they are in equilibrium with each other"
|
|
1178
|
-
// ],
|
|
1179
|
-
// "bloom_alignment": "Level 1—asks learners to recall which law matches a given statement."
|
|
1180
|
-
// }
|
|
1181
|
-
// ]
|
|
1069
|
+
// // - When appropriate, include a brief explanation (320 characters max). An explanation is optional and should only be included if it can help the learner understand the concept(s) or fact(s) being tested. It SHOULD NOT be used to explain anything other than the concepts and facts being tested. Feel free to use your personal knowledge where appropriate when crafting it.
|
|
1070
|
+
// // - Minimum choices required: 2
|
|
1071
|
+
// // - Maximum choices allowed (correct + incorrect): 8
|
|
1072
|
+
// // - Minimum correct choices required: 1
|
|
1073
|
+
// // - Maximum correct choices: 4
|
|
1074
|
+
// // - Maximum character length for the prompt: 320
|
|
1075
|
+
// // - Maximum character length for each choice: 42
|
|
1076
|
+
// // - DO NOT add numbering to the choice content since these will be randomly sorted when displaying to the user
|
|
1077
|
+
// // `;
|
|
1078
|
+
// // const cardExamples = `
|
|
1079
|
+
// // ## Examples of Level 1 MCQ cards
|
|
1182
1080
|
|
|
1183
|
-
//
|
|
1184
|
-
//
|
|
1185
|
-
//
|
|
1186
|
-
//
|
|
1187
|
-
// "
|
|
1188
|
-
//
|
|
1189
|
-
//
|
|
1190
|
-
//
|
|
1191
|
-
//
|
|
1192
|
-
//
|
|
1193
|
-
//
|
|
1194
|
-
//
|
|
1195
|
-
//
|
|
1196
|
-
// },
|
|
1197
|
-
//
|
|
1198
|
-
//
|
|
1199
|
-
//
|
|
1200
|
-
//
|
|
1201
|
-
//
|
|
1202
|
-
//
|
|
1203
|
-
//
|
|
1204
|
-
//
|
|
1081
|
+
// // json
|
|
1082
|
+
// // [
|
|
1083
|
+
// // {
|
|
1084
|
+
// // "type": "mcq",
|
|
1085
|
+
// // "card_content": {
|
|
1086
|
+
// // "prompt": "Which Paleo-Indian culture succeeded the Clovis culture?",
|
|
1087
|
+
// // "choices": [
|
|
1088
|
+
// // { "choice": "Folsom", "is_correct": true },
|
|
1089
|
+
// // { "choice": "Clovis", "is_correct": false },
|
|
1090
|
+
// // { "choice": "Dalton", "is_correct": false },
|
|
1091
|
+
// // { "choice": "Plano", "is_correct": false }
|
|
1092
|
+
// // ],
|
|
1093
|
+
// // "explanation": "Folsom culture comes after Clovis and is identified by refined fluted points distinct from earlier Clovis tools."
|
|
1094
|
+
// // },
|
|
1095
|
+
// // "concepts": [
|
|
1096
|
+
// // "Folsom culture succeeded Clovis and is distinguished by its fluted projectile points"
|
|
1097
|
+
// // ],
|
|
1098
|
+
// // "facts": [
|
|
1099
|
+
// // "Folsom points are smaller and more refined than Clovis points"
|
|
1100
|
+
// // ],
|
|
1101
|
+
// // "bloom_alignment": "Level 1—learners merely recall the name of the culture; no higher-order thinking is required."
|
|
1102
|
+
// // },
|
|
1103
|
+
// // {
|
|
1104
|
+
// // "type": "mcq",
|
|
1105
|
+
// // "card_content": {
|
|
1106
|
+
// // "prompt": "Who published an 1831 critique describing the Book of Mormon as an attempt to resolve Protestant debates?",
|
|
1107
|
+
// // "choices": [
|
|
1108
|
+
// // { "choice": "Alexander Campbell", "is_correct": true },
|
|
1109
|
+
// // { "choice": "Joseph Smith", "is_correct": false },
|
|
1110
|
+
// // { "choice": "E. D. Howe", "is_correct": false },
|
|
1111
|
+
// // { "choice": "Charles Finney", "is_correct": false }
|
|
1112
|
+
// // ],
|
|
1113
|
+
// // "explanation": "Alexander Campbell’s 1831 pamphlet was one of the earliest printed critiques of the Book of Mormon."
|
|
1114
|
+
// // },
|
|
1115
|
+
// // "concepts": [
|
|
1116
|
+
// // "Alexander Campbell criticized the Book of Mormon as an attempt to resolve Protestant debates"
|
|
1117
|
+
// // ],
|
|
1118
|
+
// // "facts": [
|
|
1119
|
+
// // "Alexander Campbell published his critique of the Book of Mormon in 1831"
|
|
1120
|
+
// // ],
|
|
1121
|
+
// // "bloom_alignment": "Level 1—asks for straightforward recall of who authored the 1831 critique."
|
|
1122
|
+
// // },
|
|
1123
|
+
// // {
|
|
1124
|
+
// // "type": "mcq",
|
|
1125
|
+
// // "card_content": {
|
|
1126
|
+
// // "prompt": "Which keyword is required inside a Python generator function to produce values lazily?",
|
|
1127
|
+
// // "choices": [
|
|
1128
|
+
// // { "choice": "yield", "is_correct": true },
|
|
1129
|
+
// // { "choice": "return", "is_correct": false },
|
|
1130
|
+
// // { "choice": "await", "is_correct": false },
|
|
1131
|
+
// // { "choice": "pass", "is_correct": false }
|
|
1132
|
+
// // ],
|
|
1133
|
+
// // "explanation": "The yield keyword turns a regular function into a generator, pausing and resuming execution between values."
|
|
1134
|
+
// // },
|
|
1135
|
+
// // "concepts": [
|
|
1136
|
+
// // "In Python, generator functions use the yield keyword to produce sequences lazily"
|
|
1137
|
+
// // ],
|
|
1138
|
+
// // "facts": [
|
|
1139
|
+
// // "Generators in Python are defined using the def keyword and yield statements"
|
|
1140
|
+
// // ],
|
|
1141
|
+
// // "bloom_alignment": "Level 1—learners only need to recognize the specific keyword, a pure recall task."
|
|
1142
|
+
// // },
|
|
1143
|
+
// // {
|
|
1144
|
+
// // "type": "mcq",
|
|
1145
|
+
// // "card_content": {
|
|
1146
|
+
// // "prompt": "Adopting what pelvis posture helps prevent spinal curvature imbalances?",
|
|
1147
|
+
// // "choices": [
|
|
1148
|
+
// // { "choice": "Neutral pelvis posture", "is_correct": true },
|
|
1149
|
+
// // { "choice": "Anterior pelvic tilt", "is_correct": false },
|
|
1150
|
+
// // { "choice": "Posterior pelvic tilt", "is_correct": false },
|
|
1151
|
+
// // { "choice": "Kyphotic posture", "is_correct": false }
|
|
1152
|
+
// // ],
|
|
1153
|
+
// // "explanation": "Keeping the pelvis neutral supports the spine’s natural S-curve, reducing undue strain."
|
|
1154
|
+
// // },
|
|
1155
|
+
// // "concepts": [
|
|
1156
|
+
// // "Adopting a neutral pelvis posture helps prevent spinal curvature imbalances"
|
|
1157
|
+
// // ],
|
|
1158
|
+
// // "facts": [
|
|
1159
|
+
// // "A neutral pelvis posture can be achieved by aligning the ASIS and PSIS bones"
|
|
1160
|
+
// // ],
|
|
1161
|
+
// // "bloom_alignment": "Level 1—requires simple recall of the posture term without analysis."
|
|
1162
|
+
// // },
|
|
1163
|
+
// // {
|
|
1164
|
+
// // "type": "mcq",
|
|
1165
|
+
// // "card_content": {
|
|
1166
|
+
// // "prompt": "Which law of thermodynamics states that if two systems are each in thermal equilibrium with a third, they are in equilibrium with each other?",
|
|
1167
|
+
// // "choices": [
|
|
1168
|
+
// // { "choice": "Zeroth Law of Thermodynamics", "is_correct": true },
|
|
1169
|
+
// // { "choice": "First Law of Thermodynamics", "is_correct": false },
|
|
1170
|
+
// // { "choice": "Second Law of Thermodynamics", "is_correct": false },
|
|
1171
|
+
// // { "choice": "Third Law of Thermodynamics", "is_correct": false }
|
|
1172
|
+
// // ],
|
|
1173
|
+
// // "explanation": "This statement defines the Zeroth Law, forming the basis for the temperature concept used by thermometers."
|
|
1174
|
+
// // },
|
|
1175
|
+
// // "concepts": [
|
|
1176
|
+
// // "The Zeroth Law of Thermodynamics defines the concept of thermal equilibrium"
|
|
1177
|
+
// // ],
|
|
1178
|
+
// // "facts": [
|
|
1179
|
+
// // "The Zeroth Law states that if two systems are in thermal equilibrium with a third, they are in equilibrium with each other"
|
|
1180
|
+
// // ],
|
|
1181
|
+
// // "bloom_alignment": "Level 1—asks learners to recall which law matches a given statement."
|
|
1182
|
+
// // }
|
|
1183
|
+
// // ]
|
|
1184
|
+
|
|
1185
|
+
// // `;
|
|
1186
|
+
|
|
1187
|
+
// // console.log("Initializing OnlyEverGenerator");
|
|
1188
|
+
// // const onlyEverGenerator = new OnlyEverGenerator(
|
|
1189
|
+
// // process.env.OPEN_AI_KEY as string,
|
|
1190
|
+
// // "o4-mini",
|
|
1191
|
+
// // generationContent,
|
|
1192
|
+
// // "pmpt_687a8872d1c8819088a9cdc97dcb688b0893663621695594",
|
|
1193
|
+
// // "pmpt_687aa547f99c8193b99467ca53630c2607f5a8caf451e7e8",
|
|
1194
|
+
// // "pmpt_687aa547f99c8193b99467ca53630c2607f5a8caf451e7e8",
|
|
1195
|
+
// // {
|
|
1196
|
+
// // bloom_instructions: "",
|
|
1197
|
+
// // card_instructions: "",
|
|
1198
|
+
// // card_examples: "",
|
|
1199
|
+
// // }
|
|
1200
|
+
// // );
|
|
1201
|
+
// // const response = await onlyEverGenerator.generate(true, false);
|
|
1202
|
+
// // console.log(response);
|
|
1203
|
+
// // })();
|