only_ever_generator 8.4.1 → 8.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/bootstrap/app.d.ts +1 -6
  2. package/dist/bootstrap/app.d.ts.map +1 -1
  3. package/dist/bootstrap/app.js +6 -11
  4. package/dist/bootstrap/app.js.map +1 -1
  5. package/dist/card_gen/generate_cards.d.ts +1 -2
  6. package/dist/card_gen/generate_cards.d.ts.map +1 -1
  7. package/dist/card_gen/generate_cards.js +3 -3
  8. package/dist/card_gen/generate_cards.js.map +1 -1
  9. package/dist/constants/default_generation_variables.d.ts +3 -0
  10. package/dist/constants/default_generation_variables.d.ts.map +1 -0
  11. package/dist/constants/default_generation_variables.js +580 -0
  12. package/dist/constants/default_generation_variables.js.map +1 -0
  13. package/dist/helper/schema_helper/build_card_schema.js +1 -1
  14. package/dist/helper/schema_helper/build_card_schema.js.map +1 -1
  15. package/dist/helper/schema_helper/build_concept_facts_schema.d.ts +1 -1
  16. package/dist/helper/schema_helper/build_concept_facts_schema.d.ts.map +1 -1
  17. package/dist/helper/schema_helper/build_concept_facts_schema.js +5 -20
  18. package/dist/helper/schema_helper/build_concept_facts_schema.js.map +1 -1
  19. package/dist/helper/schema_helper/build_summary_schema.d.ts +1 -1
  20. package/dist/helper/schema_helper/build_summary_schema.d.ts.map +1 -1
  21. package/dist/helper/schema_helper/build_summary_schema.js +7 -18
  22. package/dist/helper/schema_helper/build_summary_schema.js.map +1 -1
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +66 -62
  25. package/dist/index.js.map +1 -1
  26. package/dist/services/get_prompts.d.ts +7 -8
  27. package/dist/services/get_prompts.d.ts.map +1 -1
  28. package/dist/services/get_prompts.js +21 -69
  29. package/dist/services/get_prompts.js.map +1 -1
  30. package/dist/services/prompts_test.d.ts +10 -0
  31. package/dist/services/prompts_test.d.ts.map +1 -0
  32. package/dist/services/prompts_test.js +227 -0
  33. package/dist/services/prompts_test.js.map +1 -0
  34. package/dist/typology_gen/generate_concept_facts.d.ts +1 -2
  35. package/dist/typology_gen/generate_concept_facts.d.ts.map +1 -1
  36. package/dist/typology_gen/generate_concept_facts.js +7 -9
  37. package/dist/typology_gen/generate_concept_facts.js.map +1 -1
  38. package/dist/typology_gen/generate_typology.d.ts +1 -2
  39. package/dist/typology_gen/generate_typology.d.ts.map +1 -1
  40. package/dist/typology_gen/generate_typology.js +3 -3
  41. package/dist/typology_gen/generate_typology.js.map +1 -1
  42. package/dist/typology_gen/summarize.d.ts +1 -2
  43. package/dist/typology_gen/summarize.d.ts.map +1 -1
  44. package/dist/typology_gen/summarize.js +6 -9
  45. package/dist/typology_gen/summarize.js.map +1 -1
  46. package/dist/utils/test.d.ts +2 -0
  47. package/dist/utils/test.d.ts.map +1 -0
  48. package/dist/utils/test.js +5 -0
  49. package/dist/utils/test.js.map +1 -0
  50. package/package.json +1 -1
  51. package/src/bootstrap/app.ts +2 -19
  52. package/src/card_gen/generate_cards.ts +2 -4
  53. package/src/constants/default_generation_variables.ts +624 -0
  54. package/src/helper/schema_helper/build_card_schema.ts +1 -1
  55. package/src/helper/schema_helper/build_concept_facts_schema.ts +4 -18
  56. package/src/helper/schema_helper/build_summary_schema.ts +6 -17
  57. package/src/index.ts +65 -63
  58. package/src/services/get_prompts.ts +22 -74
  59. package/src/typology_gen/generate_concept_facts.ts +8 -11
  60. package/src/typology_gen/generate_typology.ts +2 -4
  61. package/src/typology_gen/summarize.ts +7 -10
@@ -0,0 +1,580 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultGenerationVariables = void 0;
4
+ exports.defaultGenerationVariables = {
5
+ bloom_instructions: "# Bloom Level 1 — Remember (Recall & Recognition)\n\n**Definition:** Test the learner's ability to remember or recognize information exactly as it was presented. \n**Key focus:** Retrieval of specific facts, terms, or concepts without interpretation.\n\nYOU MUST CREATE CARDS TO TEST ALL PROVIDED CONCEPTS AND FACTS.\n\n### What to Do\n\n- Target one fact or concept at a time (or two closely linked ones). \n- Use wording close to the original source. \n- Cover all distinct provided concepts and facts before repeating. \n- Keep the cognitive demand at pure recall.\n\n### Common Task Types\n\n- Identify terms, dates, names, steps, or definitions. \n- Match terms to descriptions. \n- Recognize correct labels or locations. \n- Simple multiple-choice with direct recall.\n\n### Avoid\n\n- Asking for explanations, interpretations, or applications.\n",
6
+ output_schema: {
7
+ summary: {
8
+ name: "summary_cards",
9
+ strict: true,
10
+ schema: {
11
+ type: "object",
12
+ properties: {
13
+ summary_cards: {
14
+ type: "array",
15
+ description: "Overview card first, followed by takeaway cards in source flow.",
16
+ minItems: 1,
17
+ prefixItems: [
18
+ {
19
+ type: "object",
20
+ description: "Card 1 — Overview",
21
+ properties: {
22
+ title: {
23
+ type: "string",
24
+ description: "≤60 chars; proverb-like if safe, else 'Overview'.",
25
+ maxLength: 60,
26
+ },
27
+ text: {
28
+ type: "string",
29
+ description: "≤600 chars; whole-source takeaway; avoid procedural detail unless central.",
30
+ maxLength: 600,
31
+ pattern: "\\[\\[[^\\[\\]|]+ \\| [^\\[\\]|]+\\]\\]",
32
+ },
33
+ reference: {
34
+ type: "string",
35
+ description: "Must be empty for the first card.",
36
+ const: "",
37
+ },
38
+ },
39
+ required: ["title", "text", "reference"],
40
+ additionalProperties: false,
41
+ },
42
+ ],
43
+ items: {
44
+ type: "object",
45
+ description: "Cards 2–N — Takeaways",
46
+ properties: {
47
+ title: {
48
+ type: "string",
49
+ description: "≤60 chars; short phrase highlighting the point.",
50
+ maxLength: 60,
51
+ },
52
+ text: {
53
+ type: "string",
54
+ description: "≤600 chars; essential takeaways; active voice; minimal jargon.",
55
+ maxLength: 600,
56
+ pattern: "\\[\\[[^\\[\\]|]+ \\| [^\\[\\]|]+\\]\\]",
57
+ },
58
+ reference: {
59
+ type: "string",
60
+ description: "A {{heading_type}} label for where this takeaway begins. Populate enum dynamically at runtime.",
61
+ enum: [],
62
+ },
63
+ },
64
+ required: ["title", "text", "reference"],
65
+ additionalProperties: false,
66
+ },
67
+ },
68
+ },
69
+ required: ["summary_cards"],
70
+ additionalProperties: false,
71
+ },
72
+ },
73
+ concepts_facts: {
74
+ name: "concept_fact_gen_schema",
75
+ strict: true,
76
+ schema: {
77
+ type: "object",
78
+ properties: {
79
+ concepts_facts: {
80
+ type: "array",
81
+ minItems: 1,
82
+ items: {
83
+ type: "object",
84
+ properties: {
85
+ text: {
86
+ type: "string",
87
+ maxLength: 320,
88
+ description: "Noun phrase or declarative fact (max. 320 chars).",
89
+ },
90
+ type: {
91
+ type: "string",
92
+ enum: ["concept", "fact"],
93
+ description: "concept vs fact.",
94
+ },
95
+ reference: {
96
+ type: "string",
97
+ enum: [],
98
+ description: "Exact heading or empty string.",
99
+ },
100
+ },
101
+ required: ["text", "type", "reference"],
102
+ additionalProperties: false,
103
+ },
104
+ },
105
+ },
106
+ required: ["concepts_facts"],
107
+ additionalProperties: false,
108
+ },
109
+ },
110
+ classification: {
111
+ name: "source_classification_and_summary",
112
+ strict: true,
113
+ schema: {
114
+ type: "object",
115
+ properties: {
116
+ learn_value: {
117
+ type: "object",
118
+ properties: {
119
+ value: {
120
+ type: "integer",
121
+ description: "The percentage likelihood that this source could be an important part of a high-quality educational curriculum in a university, school, college, or online learning catalog.",
122
+ min: 0,
123
+ max: 100,
124
+ },
125
+ curriculum: {
126
+ type: "array",
127
+ description: "Zero to three high-quality curriculum titles this source could fit into. Use title-style capitalization; exclude punctuation and trailing modifiers. Return [] if none apply.",
128
+ items: {
129
+ type: "string",
130
+ maxLength: 90,
131
+ },
132
+ minItems: 0,
133
+ maxItems: 3,
134
+ },
135
+ reason: {
136
+ type: "string",
137
+ description: "Concise justification (≤320 chars) for why the source was given a particular value.",
138
+ maxLength: 320,
139
+ },
140
+ bloom_levels: {
141
+ type: "array",
142
+ description: "List of applicable Bloom levels (1–5).",
143
+ items: {
144
+ type: "integer",
145
+ enum: [1, 2, 3, 4, 5],
146
+ },
147
+ },
148
+ bloom_levels_reason: {
149
+ type: "string",
150
+ description: "Explanation (≤320 chars) for the selected Bloom levels.",
151
+ maxLength: 320,
152
+ },
153
+ },
154
+ required: [
155
+ "value",
156
+ "reason",
157
+ "curriculum",
158
+ "bloom_levels",
159
+ "bloom_levels_reason",
160
+ ],
161
+ additionalProperties: false,
162
+ },
163
+ field: {
164
+ type: "array",
165
+ description: "One to three fields of knowledge this content relates to.",
166
+ items: {
167
+ type: "string",
168
+ enum: [
169
+ "Sciences",
170
+ "Technology & Engineering",
171
+ "Humanities & Cultural Studies",
172
+ "Social Sciences & Global Studies",
173
+ "Business & Management",
174
+ "Health & Medicine",
175
+ "Environmental Studies & Earth Sciences",
176
+ "Education, Learning & Personal Development",
177
+ "Creative & Performing Arts",
178
+ "Law, Governance & Ethics",
179
+ "Recreation, Lifestyle & Practical Skills",
180
+ "Technology & Media Literacy",
181
+ "Philosophy & Critical Thinking",
182
+ "Space & Astronomical Sciences",
183
+ "Agriculture & Food Sciences",
184
+ "Trades & Craftsmanship",
185
+ "Reference & Indexing",
186
+ "Other",
187
+ ],
188
+ },
189
+ minItems: 1,
190
+ maxItems: 3,
191
+ },
192
+ summary_cards: {
193
+ type: "array",
194
+ description: "Concise summary cards (0–15) that walk through key learning points from the source.",
195
+ maxItems: 15,
196
+ items: {
197
+ type: "object",
198
+ properties: {
199
+ title: {
200
+ type: "string",
201
+ description: "Card title (≤60 chars).",
202
+ maxLength: 60,
203
+ },
204
+ text: {
205
+ type: "string",
206
+ description: "Summary text (≤320 chars).",
207
+ maxLength: 320,
208
+ },
209
+ reference: {
210
+ type: "string",
211
+ description: "A {{heading_type}} or empty string; enum populated dynamically at runtime.",
212
+ enum: [],
213
+ },
214
+ },
215
+ required: ["title", "text", "reference"],
216
+ additionalProperties: false,
217
+ },
218
+ },
219
+ },
220
+ required: ["learn_value", "field", "summary_cards"],
221
+ additionalProperties: false,
222
+ },
223
+ },
224
+ },
225
+ cards: {
226
+ flash: {
227
+ instructions: '# Flash Cards\n\nFlashcards teach through active recall paired with concise, illuminating context. Each card has:\n\n- A front that sparks curiosity and forces recall\n- A back that makes the answer click and deepens understanding\n\n## Requirements\n\n### Front Content\n\n- Use plain text (≤90 chars., concise)\n- Use inline LaTex math or code when necessary\n- One clear, **self-contained** curiosity-driven cue\n- No partial pronouns ("this", "they", "it") without clear referents\n- Avoid yes/no questions, overly generic prompts, or factoids without purpose\n\n### Back Content\n\n- Use markdown (≤600 chars., illustrative and readable)\n- Always begin with the direct answer and follow that with a memorable explanation that illustrates why it matters or how it works\n- **Never begin the back content with a heading.** The first line must always be narrative text (with links when appropriate) that provides the answer to the front cue.\n- Use the editing principles in the book On Writing Well (by William Zinsser) as your guide.\n- **Add links inline** using: [[visible phrase or term | Wikipedia canonical title]]\n - Aim for **3-5 meaningful links** naturally integrated into each card text. Note that the reader will only see the visible phrase or term and not the canonical title.\n - **Prioritize readability**: Weave the visible text into the content. No appended lists at the end.\n - Treat each card as independent; repeat links across cards if natural.\n - Link-syntax rules (must all pass):\n - Balanced brackets: exactly [[left | right]] with a single pipe with the visible phrase or term ALWAYS on the left side and the Wikipedia canonical title ALWAYS on the right.\n - Keep trailing punctuation outside the closing `]]`.\n - Visible text must use natural casing: do not Title Case common nouns mid-sentence. At sentence start, capitalize per grammar; use Title Case only for proper nouns/titles.\n - For the Wikipedia canonical title ([[... | right]] of the link)\n - Use English Wikipedia canonical page titles; avoid invented pages.\n - Use the **target** article for redirects (e.g., "Flint and steel" → "Fire striker").\n - Link examples:\n - Understanding [[how vaccines train the immune system | Vaccination]] can reduce anxiety for people receiving their [[first dose | Vaccination schedule]].\n - A [[black hole | Black hole]] forms when a massive [[star | Star]] collapses under its own [[gravity | Gravity]], creating a region where even [[light | Light]] cannot escape.\n - New research in [[neuroscience | Neuroscience]] suggests that sleep plays a key role in shaping [[how we store long-term memories | Long-term memory]], especially after periods of intense [[learning | Learning]].\n- Use short paragraphs, bullets, bolded key terms etc. for readability\n- Consider LaTeX math and fenced code (inline and block) when necessary.\n\n## Quality Bar\n\nGreat cards feel like tiny, delightful "aha" moments.\n\n- One central idea\n- Concrete context supporting that idea\n- Wikipedia links are woven into the content as natural jump-off points for deeper exploration.\n- Memorable phrasing or structure that aims to delight the user\n\n## Pre-Return Verification Checklist\n\n- Front is plain text (inline LaTex math or code is allowed), self-contained and ≤ 90 chars.\n- Back is markdown and ≤ 600 chars.\n- Back first line is narrative text (does not start with #, *, -, 1., or a code fence).\n- Ensure all links follow [[visible phrase or term | Wikipedia Canonical Title]]\n- All links pass the syntax and style rules\n- No meta language ("Answer:", "This card…").\n- One central idea; 1–2 short paragraphs; bullets if they improve clarity.\n',
228
+ examples: '## Examples of Bloom Level 1 Flashcards\n\n```json\n[\n {\n "type": "flash",\n "card_content": {\n "front": "What is the core principle of the **Zeroth Law of Thermodynamics**?",\n "back": "If two systems are each in [[thermal equilibrium | Thermal equilibrium]] with a third, they are in thermal equilibrium with each other. This establishes **[[temperature | Temperature]]** as a fundamental property for measurement, forming the basis for how [[thermometers | Thermometer]] work. \\n\\nThough fundamental, it was named the \'zeroth law\' long after the first three laws of [[thermodynamics | Thermodynamics]] were widely recognized."\n },\n "concepts": [],\n "explanation": "The Zeroth Law establishes thermal equilibrium\'s transitive property, laying the foundation for temperature measurement.",\n "facts": [\n "The Zeroth Law states that if two systems are in thermal equilibrium with a third, they are in equilibrium with each other"\n ],\n "bloom_alignment": "This card requires recalling a basic definition, aligning with Bloom\'s Level 1 (Remember)."\n },\n {\n "type": "flash",\n "card_content": {\n "front": "How are **Folsom points** distinguished from earlier Clovis points?",\n "back": "[[Folsom points | Folsom point]] are generally smaller and more refined than [[Clovis points | Clovis point]]. A key characteristic of Folsom points is the presence of a distinct **flute**, or a central groove, which was created by removing a long, thin flake of stone from each side of the point.\\n\\nThese [[projectile points | Projectile point]] are associated with the hunting of an extinct form of [[giant bison | Bison antiquus]]."\n },\n "explanation": "Folsom culture is explicitly identified by archaeologists as coming after Clovis and by its trademark fluted projectile points.",\n "concepts": [\n "Folsom culture succeeded Clovis and is distinguished by its fluted projectile points"\n ],\n "facts": [\n "Folsom points are smaller and more refined than Clovis points"\n ],\n "bloom_alignment": "Learner simply recalls the name of the culture from a stated characteristic—pure remembering (Bloom 1)."\n },\n {\n "type": "flash",\n "card_content": {\n "front": "In Python, what keyword allows a function to produce a sequence of values lazily?",\n "back": "The `yield` keyword transforms a [[function | Function (computer programming)]] into a **[[generator | Generator (computer programming)]]**. Instead of running to completion like a normal function, a generator function pauses its execution each time it `yields` a value, and resumes from that point when the next value is requested. This allows for the creation of iterators that don\'t store all their values in memory at once, which is highly efficient for large datasets.\\n\\n```python\\ndef countdown(n):\\n while n > 0:\\n yield n\\n n -= 1\\n\\n# Using the generator\\nfor i in countdown(5):\\n print(i)\\n```"\n },\n "explanation": "The yield keyword pauses the function and returns a value, enabling the lazy behavior unique to generators.",\n "concepts": [\n "In Python, generator functions use the yield keyword to produce sequences lazily"\n ],\n "facts": [\n "Generators in Python are defined using the def keyword and yield statements"\n ],\n "bloom_alignment": "The card asks for direct recall of the specific keyword mentioned in the concept (Bloom 1)."\n },\n {\n "type": "flash",\n "card_content": {\n "front": "What is a neutral spine and why is it important for posture?",\n "back": "A [[neutral spine| Spinal posture]] refers to the natural \'S\' curve of the back, where the [[vertebrae | Spinal column]] and [[discs | Intervertebral disc]] are under the least amount of stress. Maintaining this posture is crucial because it **distributes weight evenly**, reducing the risk of strain, injury, and chronic pain. A neutral spine can be maintained in various positions, including standing, sitting, and lifting, by engaging [[core muscles | Core (anatomy)]] and aligning the head, shoulders, and hips."\n },\n "explanation": "Holding a neutral spine keeps the back\'s natural curves aligned, easing muscular load.",\n "concepts": [\n "A neutral spine preserves the natural S-curve of the back and reduces muscle strain"\n ],\n "facts": [],\n "bloom_alignment": "The learner recalls a single term exactly as presented—remembering level (Bloom 1)."\n },\n {\n "type": "flash",\n "card_content": {\n "front": "What was the controversial doctrine of the Order of the Nehors in the Book of Mormon?",\n "back": "The central teaching of the [[Order of Nehor | Nehor]] was **[[universal salvation | Universalism]]**. They believed that all people would be saved, regardless of their actions, a doctrine that directly contradicted the mainstream [[Nephite | Nephites]] belief that [[salvation | Salvation in Christianity]] required repentance and obedience to God\'s laws.\\nThis teaching was considered a form of priestcraft because its proponents sought personal gain and popularity."\n },\n "explanation": "The Nehors taught universal salvation, a stance explicitly labeled heretical in the text.",\n "concepts": [\n "The Order of the Nehors promoted universal salvation, contradicting Nephite doctrine"\n ],\n "facts": [\n "The Nehors\' universalist doctrine rejected the need for repentance"\n ],\n "bloom_alignment": "Simply asks for the name of the group, a direct fact recall task appropriate for Bloom 1."\n }\n]\n```\n',
229
+ schema: {
230
+ name: "card_gen_schema",
231
+ strict: true,
232
+ description: "Schema for generating cards that test the provided concepts and facts.",
233
+ schema: {
234
+ type: "object",
235
+ properties: {
236
+ test_cards: {
237
+ type: "array",
238
+ items: {
239
+ type: "object",
240
+ properties: {
241
+ type: {
242
+ type: "string",
243
+ enum: [],
244
+ },
245
+ card_content: {
246
+ anyOf: [
247
+ {
248
+ type: "object",
249
+ description: "Flashcard content with a front and a back. Markdown is supported, including fenced code blocks, inline code, and LaTeX math syntax.",
250
+ properties: {
251
+ front: {
252
+ type: "string",
253
+ maxLength: 90,
254
+ description: "Content for the front of the card. Can use plain text, Markdown formatting, fenced code blocks, inline code, and LaTeX math.",
255
+ },
256
+ back: {
257
+ type: "string",
258
+ maxLength: 600,
259
+ description: "Content for the back of the card. Use markdown formatting, Wiki-style links [[visible phrase or term | Wikipedia Canonical Title]], fenced code blocks, inline code, and LaTeX math. Memorable phrasing or structure that aims to delight the user.",
260
+ },
261
+ },
262
+ required: ["front", "back"],
263
+ additionalProperties: false,
264
+ },
265
+ ],
266
+ },
267
+ concepts: {
268
+ type: "array",
269
+ items: {
270
+ type: "string",
271
+ enum: [],
272
+ },
273
+ },
274
+ facts: {
275
+ type: "array",
276
+ items: {
277
+ type: "string",
278
+ enum: [],
279
+ },
280
+ },
281
+ bloom_alignment: {
282
+ type: "string",
283
+ maxLength: 240,
284
+ description: "Explain why this card fits the bloom level you were asked to create.",
285
+ },
286
+ },
287
+ required: [
288
+ "type",
289
+ "card_content",
290
+ "concepts",
291
+ "facts",
292
+ "bloom_alignment",
293
+ ],
294
+ additionalProperties: false,
295
+ },
296
+ },
297
+ },
298
+ required: ["test_cards"],
299
+ additionalProperties: false,
300
+ },
301
+ },
302
+ },
303
+ mcq: {
304
+ instructions: "# Multiple Choice (MCQ) Cards\n\nGenerate a question with 2–6 answer options, 1–4 of which are correct. \n\n## Design guidance\n\n- **Target the intended Bloom level** — write a question that reflects the desired cognitive skill (e.g., recall, comprehension, application, analysis) using the provided concepts/facts.\n- **Write plausible distractors** — incorrect choices should be believable, but clearly wrong if the learner understands the material.\n- **Balance difficulty** — avoid trick questions, but don't make it answerable by elimination alone.\n- **Be precise** — remove ambiguity; avoid overlapping answers or ones that could both be argued correct.\n- **Vary formats** — you can ask for definitions, examples, applications, comparisons, or causes/effects, depending on the Bloom level.\n- **Cover breadth** — aim to represent as many relevant concepts/facts as possible without making the question too broad.\n\n## Quality checks before finalizing\n\n- The question maps directly to the provided concepts/facts.\n- All correct answers are fully correct; all incorrect answers are fully incorrect.\n- Wording is clear and concise, plain text only (≤60 chars); no numbering or lettering is added to choices.",
305
+ examples: '## Examples of Level 1 MCQ cards\n\n```json\n[\n {\n "type": "mcq",\n "card_content": {\n "prompt": "Which law of thermodynamics provides a formal definition of temperature?",\n "choices": [\n { "choice": "Zeroth Law", "is_correct": true },\n { "choice": "First Law", "is_correct": false },\n { "choice": "Second Law", "is_correct": false },\n { "choice": "Third Law", "is_correct": false }\n ]\n },\n "explanation": "The Zeroth Law states that if two systems are each in thermal equilibrium with a third, they are in equilibrium with each other. This principle is the basis for temperature measurement.",\n "concepts": [\n "The Zeroth Law of Thermodynamics defines the concept of thermal equilibrium"\n ],\n "facts": [\n "The Zeroth Law of Thermodynamics provides the basis for the concept of temperature"\n ],\n "bloom_alignment": "Level 1 (Remember): The learner needs to recall a specific fact—which law corresponds to a specific concept."\n },\n {\n "type": "mcq",\n "card_content": {\n "prompt": "Which Paleo-Indian culture is known for its small, finely-made fluted points?",\n "choices": [\n { "choice": "Folsom", "is_correct": true },\n { "choice": "Clovis", "is_correct": false },\n { "choice": "Dalton", "is_correct": false },\n { "choice": "Plano", "is_correct": false },\n { "choice": "Archaic", "is_correct": false }\n ]\n },\n "explanation": "The Folsom culture is recognized for its distinctive Folsom points, which are generally smaller and more refined than the earlier Clovis points.",\n "concepts": [\n "Folsom culture is distinguished by its characteristic fluted projectile points"\n ],\n "facts": [\n "Folsom points are typically smaller and more refined than Clovis points"\n ],\n "bloom_alignment": "Level 1 (Remember): This question asks for the recall of a specific cultural name from a list of options."\n },\n {\n "type": "mcq",\n "card_content": {\n "prompt": "What Python keyword is used inside a function to produce values lazily?",\n "choices": [\n { "choice": "yield", "is_correct": true },\n { "choice": "return", "is_correct": false },\n { "choice": "generate", "is_correct": false }\n ]\n },\n "explanation": "The \'yield\' keyword turns a function into a generator, allowing it to pause execution and resume later, producing one value at a time.",\n "concepts": [\n "In Python, generator functions use the yield keyword to produce sequences lazily"\n ],\n "facts": [\n "The presence of the \'yield\' keyword in a function definition makes it a generator function"\n ],\n "bloom_alignment": "Level 1 (Remember): The learner simply needs to recall the specific keyword from a small set of choices."\n },\n {\n "type": "mcq",\n "card_content": {\n "prompt": "Who wrote an 1831 critique describing the Book of Mormon as a response to Protestant debates?",\n "choices": [\n { "choice": "Alexander Campbell", "is_correct": true },\n { "choice": "Joseph Smith", "is_correct": false },\n { "choice": "Sidney Rigdon", "is_correct": false },\n { "choice": "Martin Harris", "is_correct": false }\n ]\n },\n "explanation": "Alexander Campbell, a leader in the Restoration Movement, wrote \'Delusions,\' one of the earliest and most notable critiques of the Book of Mormon.",\n "concepts": [\n "Alexander Campbell was an early and prominent critic of the Book of Mormon"\n ],\n "facts": [\n "Alexander Campbell published his critique of the Book of Mormon in 1831"\n ],\n "bloom_alignment": "Level 1 (Remember): This question requires the straightforward recall of a name associated with a specific historical document."\n },\n {\n "type": "mcq",\n "card_content": {\n "prompt": "What posture best supports the spine\'s natural curves for ideal alignment?",\n "choices": [\n { "choice": "Neutral Pelvis", "is_correct": true },\n { "choice": "Anterior Pelvic Tilt", "is_correct": false },\n { "choice": "Posterior Pelvic Tilt", "is_correct": false }\n ]\n },\n "explanation": "A neutral pelvic position is the biomechanically ideal posture, providing a stable base for the spine and reducing strain, unlike tilted positions.",\n "concepts": [\n "A neutral pelvis is a foundational concept in posture and biomechanics"\n ],\n "facts": [\n "In a neutral pelvis, key bony landmarks of the hips are in vertical alignment"\n ],\n "bloom_alignment": "Level 1 (Remember): The learner must recall the specific term for the correct anatomical position."\n }\n]\n```\n',
306
+ schema: {
307
+ name: "card_gen_schema",
308
+ strict: true,
309
+ description: "Schema for generating cards that test the provided concepts and facts.",
310
+ schema: {
311
+ type: "object",
312
+ properties: {
313
+ test_cards: {
314
+ type: "array",
315
+ items: {
316
+ type: "object",
317
+ properties: {
318
+ type: {
319
+ type: "string",
320
+ enum: [],
321
+ },
322
+ card_content: {
323
+ anyOf: [
324
+ {
325
+ type: "object",
326
+ description: "Multiple-choice question content. Provide a clear prompt and 2–6 choices, with 1–3 correct. Plain text only; do not number choices because the UI shuffles them.",
327
+ properties: {
328
+ prompt: {
329
+ type: "string",
330
+ maxLength: 320,
331
+ description: "The question text (plain text, ≤320 chars). Be unambiguous; avoid clues like repeated suffixes.",
332
+ },
333
+ choices: {
334
+ type: "array",
335
+ description: "2–6 answer options. Exactly 1–3 should be correct. Plain text only; no leading numbering/letters.",
336
+ minItems: 2,
337
+ maxItems: 6,
338
+ items: {
339
+ type: "object",
340
+ description: "A single answer option.",
341
+ properties: {
342
+ choice: {
343
+ type: "string",
344
+ maxLength: 60,
345
+ description: "Choice text (plain text, ≤60 chars). Do not add numbering or letters; the UI randomizes order.",
346
+ },
347
+ is_correct: {
348
+ type: "boolean",
349
+ description: "True if this choice is correct; otherwise false.",
350
+ },
351
+ },
352
+ required: ["choice", "is_correct"],
353
+ additionalProperties: false,
354
+ },
355
+ },
356
+ },
357
+ required: ["prompt", "choices"],
358
+ additionalProperties: false,
359
+ },
360
+ ],
361
+ },
362
+ concepts: {
363
+ type: "array",
364
+ items: {
365
+ type: "string",
366
+ enum: [],
367
+ },
368
+ },
369
+ facts: {
370
+ type: "array",
371
+ items: {
372
+ type: "string",
373
+ enum: [],
374
+ },
375
+ },
376
+ bloom_alignment: {
377
+ type: "string",
378
+ maxLength: 240,
379
+ description: "Explain why this card fits the bloom level you were asked to create.",
380
+ },
381
+ },
382
+ required: [
383
+ "type",
384
+ "card_content",
385
+ "concepts",
386
+ "facts",
387
+ "bloom_alignment",
388
+ ],
389
+ additionalProperties: false,
390
+ },
391
+ },
392
+ },
393
+ required: ["test_cards"],
394
+ additionalProperties: false,
395
+ },
396
+ },
397
+ },
398
+ match: {
399
+ instructions: '# Match Cards\n\nProvide item pairs.\n\n- **Only plain text is allowed** for match cards.\n\n**Goal**: Create high-signal item pairs that test the provided concepts/facts, not trivia.\n\n## Selection rules\n\n- Prefer pairs that reveal relationships (definition↔term, property↔object, cause↔effect, example↔category, step↔purpose).\n\n## Difficulty & clarity\n\n- Favor unambiguous wording; no synonyms that collapse to the same answer.\n- Keep language simple; avoid idioms, abbreviations, and culture-specific references.\n\n## Quality checks (before output)\n\n- Each pair maps to at least one provided concept or fact.\n- No pair can be matched correctly by shallow pattern cues (e.g., same suffix).\n- Left/right items are balanced in specificity (avoid "broad vs hyper-specific" mismatches)\n- Each item is ≤60 chars.\n',
400
+ examples: '## Examples of Bloom Level 1 Match Cards\n\n```json\n[\n {\n "type": "match",\n "card_content": [\n { "left_item": "Clovis culture", "right_item": "Earliest widespread Paleo-Indian culture" },\n { "left_item": "Folsom culture", "right_item": "Smaller fluted points" },\n { "left_item": "Clovis sites", "right_item": "Often include mammoth remains" },\n { "left_item": "Clovis decline", "right_item": "Linked to climate shifts & megafauna extinction" }\n ],\n "explanation": "Match each Paleo-Indian culture term to its key attribute: the Clovis culture was one of the earliest widespread Paleo-Indian cultures; the Folsom culture is distinguished by smaller fluted projectile points; Clovis sites often contain mammoth remains; and the Clovis culture\'s decline is linked to climate shifts and megafauna extinction.",\n "concepts": [\n "The Clovis culture is one of the earliest widespread Paleo-Indian cultures in North America",\n "Folsom culture succeeded Clovis and is distinguished by its fluted projectile points",\n "Clovis sites often include mammoth remains, suggesting large game hunting",\n "The decline of the Clovis culture is linked to climate shifts and megafauna extinction"\n ],\n "facts": [],\n "bloom_alignment": "Level 1 – recall of defining descriptors."\n },\n {\n "type": "match",\n "card_content": [\n { "left_item": "Order of the Nehors", "right_item": "Promoted universal salvation" },\n { "left_item": "Alma the Younger", "right_item": "Denounced the Nehors" },\n { "left_item": "Alexander Campbell", "right_item": "Published a critique of the Book of Mormon" },\n { "left_item": "Book of Mormon", "right_item": "Emphasized the need for repentance" }\n ],\n "explanation": "Pairs recall key beliefs and responses: the Order of the Nehors promoted universal salvation, Alma the Younger denounced the Nehors, Alexander Campbell published a critique of the Book of Mormon in 1831, and the Book of Mormon teaches the need for repentance.",\n "concepts": [\n "The Order of the Nehors promoted universal salvation, contradicting Nephite doctrine",\n "Alma the Younger denounced the Nehors and reformed Nephite religious institutions",\n "Alexander Campbell criticized the Book of Mormon as an attempt to resolve Protestant debates",\n "The Book of Mormon frequently addresses apostasy and the role of personal repentance"\n ],\n "facts": [\n "Alexander Campbell published his critique of the Book of Mormon in 1831",\n "The Nehors\' universalist doctrine rejected the need for repentance"\n ],\n "bloom_alignment": "Level 1 – straightforward recall of key details."\n },\n {\n "type": "match",\n "card_content": [\n { "left_item": "yield keyword", "right_item": "Pauses execution, returns next value" },\n { "left_item": "StopIteration", "right_item": "Signals the end of a generator\'s sequence" },\n { "left_item": "next()", "right_item": "Resumes a generator\'s execution" },\n { "left_item": "generator expression", "right_item": "Use lazy evaluation like list comprehensions" }\n ],\n "explanation": "Connect each Python generator term to its basic function: `yield` pauses execution and returns the next value; `StopIteration` signals that a generator is finished; `next()` resumes the generator\'s execution; and a generator expression is a lazy list comprehension.",\n "concepts": [\n "In Python, generator functions use the yield keyword to produce sequences lazily",\n "Python generators maintain state across calls, making them memory-efficient",\n "Generator expressions in Python are similar to list comprehensions but use lazy evaluation",\n "The StopIteration exception in Python signals the end of a generator\'s sequence"\n ],\n "facts": [\n "Generators in Python are defined using the def keyword and yield statements",\n "A generator in Python can be iterated using next() until StopIteration is raised",\n "Generator functions pause execution at yield and resume on next() call"\n ],\n "bloom_alignment": "Level 1 – basic term-definition matching."\n },\n {\n "type": "match",\n "card_content": [\n { "left_item": "Zeroth Law", "right_item": "If A = B and B = C, then A = C" },\n { "left_item": "First Law", "right_item": "Energy is conserved" },\n { "left_item": "Second Law", "right_item": "Entropy always increases" },\n { "left_item": "Equilibrium", "right_item": "Balanced state, no net change" }\n ],\n "explanation": "Match each thermodynamic law or concept with its fundamental principle: the Zeroth Law defines thermal equilibrium (if A = B and B = C, then A = C); the First Law is conservation of energy; the Second Law states that entropy always increases; and equilibrium refers to a balanced state with no net change.",\n "concepts": [\n "The Zeroth Law of Thermodynamics defines the concept of thermal equilibrium",\n "Entropy quantifies disorder or energy dispersal within a thermodynamic system",\n "The First Law states that energy cannot be created or destroyed, only transformed",\n "The Second Law states that the total entropy of an isolated system never decreases",\n "Thermodynamic equilibrium is achieved when macroscopic flows of energy cease"\n ],\n "facts": [\n "The First Law is a restatement of energy conservation"\n ],\n "bloom_alignment": "Level 1 – direct recall of definitions."\n }\n]\n```',
401
+ schema: {
402
+ name: "card_gen_schema",
403
+ strict: true,
404
+ description: "Schema for generating cards that test the provided concepts and facts.",
405
+ schema: {
406
+ type: "object",
407
+ properties: {
408
+ test_cards: {
409
+ type: "array",
410
+ items: {
411
+ type: "object",
412
+ properties: {
413
+ type: {
414
+ type: "string",
415
+ enum: [],
416
+ },
417
+ card_content: {
418
+ anyOf: [
419
+ {
420
+ type: "array",
421
+ description: "2-4 match pairs. Plain text only.",
422
+ minItems: 2,
423
+ maxItems: 4,
424
+ items: {
425
+ type: "object",
426
+ description: "A match pair linking one left-side text item to one right-side text item.",
427
+ properties: {
428
+ left_item: {
429
+ type: "string",
430
+ maxLength: 60,
431
+ description: "Left-side label (plain text, ≤60 chars).",
432
+ },
433
+ right_item: {
434
+ type: "string",
435
+ maxLength: 60,
436
+ description: "Right-side label (plain text, ≤60 chars).",
437
+ },
438
+ },
439
+ required: ["left_item", "right_item"],
440
+ additionalProperties: false,
441
+ },
442
+ },
443
+ ],
444
+ },
445
+ concepts: {
446
+ type: "array",
447
+ items: {
448
+ type: "string",
449
+ enum: [],
450
+ },
451
+ },
452
+ facts: {
453
+ type: "array",
454
+ items: {
455
+ type: "string",
456
+ enum: [],
457
+ },
458
+ },
459
+ bloom_alignment: {
460
+ type: "string",
461
+ maxLength: 240,
462
+ description: "Explain why this card fits the bloom level you were asked to create.",
463
+ },
464
+ },
465
+ required: [
466
+ "type",
467
+ "card_content",
468
+ "concepts",
469
+ "facts",
470
+ "bloom_alignment",
471
+ ],
472
+ additionalProperties: false,
473
+ },
474
+ },
475
+ },
476
+ required: ["test_cards"],
477
+ additionalProperties: false,
478
+ },
479
+ },
480
+ },
481
+ cloze: {
482
+ instructions: "# Cloze Cards\n\nA test card where one or more parts of the text are masked for the learner to fill in, with correct answers provided and plausible distractors alongside them.\n\n## Design guidance\n\n- **Mark clozes clearly** — enclose each correct answer in {{double curly braces}} in the prompt.\n- **Ensure correctness** — each correct option must exactly match a cloze in the prompt.\n- **Write plausible distractors** — make incorrect options close enough in meaning, context, or category that they require careful thought; avoid irrelevant or joke answers.\n- **Balance difficulty** — avoid trick clozes or ones that can be solved without understanding the material.\n- **Vary the focus** — clozes can target definitions, examples, applications, causes/effects, or relationships depending on the Bloom level.\n\n## Quality checks before finalizing\n\n- The prompt contains 1–4 clozes, each one or more words (≤90 characters total).\n- Correct + incorrect options together do not exceed 8.\n- All incorrect options are related enough to be believable.\n- Wording is clear, plain text only, ≤320 characters for the prompt.\n",
483
+ examples: '## Examples of Bloom Level 1 Cloze Cards\n\n```json\n[\n {\n "type": "cloze",\n "card_content": {\n "prompt": "Archaeologists identify one of the earliest widespread Paleo-Indian groups in North America as the {{Clovis culture}}.",\n "correct_options": ["Clovis culture"],\n "incorrect_options": [\n "Folsom culture",\n "Hopewell tradition",\n "Mississippian culture"\n ]\n },\n "explanation": "Clovis is the earliest well-documented Paleo-Indian tradition; later cultures like Folsom or Hopewell appear afterward.",\n "concepts": [\n "The Clovis culture is one of the earliest widespread Paleo-Indian cultures in North America"\n ],\n "facts": [],\n "bloom_alignment": "Level 1 (Remember): the learner simply recalls the term \'Clovis culture\' without needing to interpret or apply it."\n },\n {\n "type": "cloze",\n "card_content": {\n "prompt": "Smaller, more refined fluted points that appear after the Clovis horizon are characteristic of the {{Folsom culture}}.",\n "correct_options": ["Folsom culture"],\n "incorrect_options": [\n "Clovis culture",\n "Solutrean industry",\n "Oldowan tradition"\n ]\n },\n "explanation": "Folsom follows Clovis and is known for its finely fluted projectile points, unlike the larger Clovis forms.",\n "concepts": [\n "Folsom culture succeeded Clovis and is distinguished by its fluted projectile points"\n ],\n "facts": ["Folsom points are smaller and more refined than Clovis points"],\n "bloom_alignment": "Level 1 (Remember): the task is pure recognition of the name \'Folsom culture\', requiring no higher-order thinking."\n },\n {\n "type": "cloze",\n "card_content": {\n "prompt": "In Python, a function becomes a generator when it contains the {{yield}} keyword.",\n "correct_options": ["yield"],\n "incorrect_options": ["return", "lambda", "pass", "break"]\n },\n "explanation": "Only \'yield\' turns the function into a generator that pauses and resumes; the other keywords serve different purposes.",\n "concepts": [\n "In Python, generator functions use the yield keyword to produce sequences lazily"\n ],\n "facts": [\n "Generators in Python are defined using the def keyword and yield statements"\n ],\n "bloom_alignment": "Level 1 (Remember): asks the learner to recall the specific keyword \'yield\', a straightforward fact."\n },\n {\n "type": "cloze",\n "card_content": {\n "prompt": "The {{Zeroth Law}} of Thermodynamics establishes the foundation for the concept of temperature.",\n "correct_options": ["Zeroth Law"],\n "incorrect_options": ["First Law", "Second Law", "Third Law"]\n },\n "explanation": "The Zeroth Law underpins temperature measurement by defining thermal equilibrium relationships.",\n "concepts": [\n "The Zeroth Law of Thermodynamics defines the concept of thermal equilibrium"\n ],\n "facts": [\n "The Zeroth Law states that if two systems are in thermal equilibrium with a third, they are in equilibrium with each other"\n ],\n "bloom_alignment": "Level 1 (Remember): a basic fact recall asking for the specific law name, with no deeper analysis required."\n },\n {\n "type": "cloze",\n "card_content": {\n "prompt": "In eukaryotic cells, {{transcription}} occurs in the nucleus, while translation takes place at the ribosomes.",\n "correct_options": ["transcription"],\n "incorrect_options": ["translation", "replication", "translocation"]\n },\n "explanation": "Transcription occurs in the nucleus; ribosomes handle translation, while mitochondria chiefly generate ATP.",\n "concepts": [],\n "facts": ["Transcription takes place in the nucleus in eukaryotic cells"],\n "bloom_alignment": "Level 1 (Remember): requires basic recall of where transcription occurs in the cell, a foundational fact."\n }\n]\n```\n',
484
+ schema: {
485
+ name: "card_gen_schema",
486
+ strict: true,
487
+ description: "Schema for generating cards that test the provided concepts and facts.",
488
+ schema: {
489
+ type: "object",
490
+ properties: {
491
+ test_cards: {
492
+ type: "array",
493
+ items: {
494
+ type: "object",
495
+ properties: {
496
+ type: {
497
+ type: "string",
498
+ enum: [],
499
+ },
500
+ card_content: {
501
+ anyOf: [
502
+ {
503
+ type: "object",
504
+ description: "Cloze card content. The prompt must contain 1–3 clozes in the format {{cloze_text}}. Correct and incorrect options should be plausible and test comprehension, not just spotting absurd answers.",
505
+ properties: {
506
+ prompt: {
507
+ type: "string",
508
+ maxLength: 320,
509
+ pattern: ".*{{.+?}}.*",
510
+ description: "The question text with 1–3 clozes marked as {{cloze_text}}. Each cloze must contain one or more words (≤90 chars).",
511
+ },
512
+ correct_options: {
513
+ type: "array",
514
+ minItems: 1,
515
+ maxItems: 3,
516
+ description: "The correct answers, exactly matching the {{cloze_text}} segments in the prompt. Each must be ≤90 characters. The total number of correct and incorrect options combined must not exceed 6.",
517
+ items: {
518
+ type: "string",
519
+ maxLength: 90,
520
+ },
521
+ },
522
+ incorrect_options: {
523
+ type: "array",
524
+ minItems: 1,
525
+ maxItems: 4,
526
+ description: "Plausible distractors — related enough to require careful thought, but incorrect. Avoid unrelated or joke answers. Each must be ≤90 characters. The total number of correct and incorrect options combined must not exceed 6.",
527
+ items: {
528
+ type: "string",
529
+ maxLength: 90,
530
+ },
531
+ },
532
+ },
533
+ required: [
534
+ "prompt",
535
+ "correct_options",
536
+ "incorrect_options",
537
+ ],
538
+ additionalProperties: false,
539
+ },
540
+ ],
541
+ },
542
+ concepts: {
543
+ type: "array",
544
+ items: {
545
+ type: "string",
546
+ enum: [],
547
+ },
548
+ },
549
+ facts: {
550
+ type: "array",
551
+ items: {
552
+ type: "string",
553
+ enum: [],
554
+ },
555
+ },
556
+ bloom_alignment: {
557
+ type: "string",
558
+ maxLength: 240,
559
+ description: "Explain why this card fits the bloom level you were asked to create.",
560
+ },
561
+ },
562
+ required: [
563
+ "type",
564
+ "card_content",
565
+ "concepts",
566
+ "facts",
567
+ "bloom_alignment",
568
+ ],
569
+ additionalProperties: false,
570
+ },
571
+ },
572
+ },
573
+ required: ["test_cards"],
574
+ additionalProperties: false,
575
+ },
576
+ },
577
+ },
578
+ },
579
+ };
580
+ //# sourceMappingURL=default_generation_variables.js.map