only_ever_generator 8.4.6 → 8.4.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 +6 -3
- package/dist/bootstrap/app.d.ts.map +1 -1
- package/dist/bootstrap/app.js +11 -17
- package/dist/bootstrap/app.js.map +1 -1
- package/dist/card_gen/generate_cards.d.ts +2 -3
- package/dist/card_gen/generate_cards.d.ts.map +1 -1
- package/dist/card_gen/generate_cards.js +22 -15
- package/dist/card_gen/generate_cards.js.map +1 -1
- package/dist/constants/prompt_data.d.ts +4 -4
- package/dist/constants/prompt_data.js +302 -302
- package/dist/constants/prompts/card_gen_prompt.js +160 -160
- package/dist/constants/prompts/typology_prompt.js +131 -131
- package/dist/constants/source_data.d.ts +171 -171
- package/dist/constants/source_data.js +973 -973
- package/dist/embedding_generation/local_consolidation.js +104 -104
- package/dist/helper/build_concept_facts_schema.d.ts +42 -42
- package/dist/helper/build_concept_facts_schema.js +44 -44
- package/dist/helper/qdrant_db_methods.d.ts.map +1 -1
- package/dist/helper/schema_helper/build_card_schema.d.ts +1 -9
- package/dist/helper/schema_helper/build_card_schema.d.ts.map +1 -1
- package/dist/helper/schema_helper/build_card_schema.js +47 -50
- package/dist/helper/schema_helper/build_card_schema.js.map +1 -1
- package/dist/helper/schema_helper/build_concept_facts_schema.d.ts +1 -1
- package/dist/helper/schema_helper/build_concept_facts_schema.d.ts.map +1 -1
- package/dist/helper/schema_helper/build_concept_facts_schema.js +20 -5
- package/dist/helper/schema_helper/build_concept_facts_schema.js.map +1 -1
- package/dist/helper/schema_helper/build_summary_schema.d.ts +1 -1
- package/dist/helper/schema_helper/build_summary_schema.d.ts.map +1 -1
- package/dist/helper/schema_helper/build_summary_schema.js +18 -7
- package/dist/helper/schema_helper/build_summary_schema.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/parse/response_format_card.d.ts +176 -176
- package/dist/parse/response_format_card.js +371 -371
- package/dist/parse/response_format_typology.d.ts +1 -1
- package/dist/parse/response_format_typology.js +46 -46
- package/dist/services/get_prompts.d.ts +8 -7
- package/dist/services/get_prompts.d.ts.map +1 -1
- package/dist/services/get_prompts.js +69 -21
- package/dist/services/get_prompts.js.map +1 -1
- package/dist/typology_gen/generate_concept_facts.d.ts +2 -3
- package/dist/typology_gen/generate_concept_facts.d.ts.map +1 -1
- package/dist/typology_gen/generate_concept_facts.js +25 -15
- package/dist/typology_gen/generate_concept_facts.js.map +1 -1
- package/dist/typology_gen/generate_typology.d.ts +2 -1
- package/dist/typology_gen/generate_typology.d.ts.map +1 -1
- package/dist/typology_gen/generate_typology.js +24 -13
- package/dist/typology_gen/generate_typology.js.map +1 -1
- package/dist/typology_gen/summarize.d.ts +2 -3
- package/dist/typology_gen/summarize.d.ts.map +1 -1
- package/dist/typology_gen/summarize.js +24 -13
- package/dist/typology_gen/summarize.js.map +1 -1
- package/package.json +39 -38
- package/src/bootstrap/app.ts +418 -416
- package/src/card_gen/generate_cards.ts +347 -345
- package/src/config.ts +11 -11
- package/src/constants/api_constants.ts +7 -7
- package/src/constants/prompts/card_gen_prompt.ts +164 -164
- package/src/constants/prompts/typology_prompt.ts +139 -139
- package/src/embedding_generation/consolidation/global_consolidation.ts +96 -96
- package/src/embedding_generation/consolidation/local_consolidation.ts +141 -141
- package/src/embedding_generation/consolidation/write_consolidated_data.ts +98 -98
- package/src/embedding_generation/generate_embeddings.ts +42 -42
- package/src/embedding_generation/parse_embedding_response.ts +31 -31
- package/src/enums/card_type_enum.ts +6 -6
- package/src/gap_fill/calculate_gap_fill.ts +50 -50
- package/src/helper/get_id_from_title.ts +33 -33
- package/src/helper/mongo_helper.ts +29 -29
- package/src/helper/openai_helper.ts +20 -20
- package/src/helper/qdrant_db_methods.ts +77 -77
- package/src/helper/schema_helper/build_card_schema.ts +74 -98
- package/src/helper/schema_helper/build_classify_summarize_schema.ts +43 -43
- package/src/helper/schema_helper/build_concept_facts_schema.ts +45 -31
- package/src/helper/schema_helper/build_summary_schema.ts +43 -32
- package/src/index.ts +71 -73
- package/src/logger.ts +65 -65
- package/src/parse/parse_card/parse_cloze_card.ts +146 -146
- package/src/parse/parse_card/parse_flash_cards.ts +42 -42
- package/src/parse/parse_card/parse_match_card.ts +104 -104
- package/src/parse/parse_card/parse_mcq_card.ts +114 -114
- package/src/parse/parse_card_response.ts +197 -197
- package/src/parse/parse_source_content.ts +212 -212
- package/src/services/get_prompts.ts +164 -112
- package/src/services/open_ai_service.ts +89 -89
- package/src/services/qdrant_service.ts +10 -10
- package/src/types/base_param_type.ts +13 -13
- package/src/types/mongo_concept_fact_type.ts +12 -12
- package/src/types/parsed_card_type.ts +39 -39
- package/src/types/raw_card_response_types/generated_card_response_type.ts +59 -59
- package/src/types/source_taxonomy_type.ts +24 -24
- package/src/typology-parsed-response.ts +1932 -1932
- package/src/typology_gen/generate_concept_facts.ts +180 -169
- package/src/typology_gen/generate_typology.ts +203 -189
- package/src/typology_gen/summarize.ts +176 -164
- package/src/utils/distributed_quote_restoration.ts +80 -80
- package/src/utils/generate_args.ts +29 -29
- package/src/utils/parse_openai_response.ts +19 -19
- package/src/utils/sanitize_strings.ts +65 -65
- package/tsconfig.json +16 -16
- package/dist/constants/default_generation_variables.d.ts +0 -3
- package/dist/constants/default_generation_variables.d.ts.map +0 -1
- package/dist/constants/default_generation_variables.js +0 -580
- package/dist/constants/default_generation_variables.js.map +0 -1
- package/dist/services/prompts_test.d.ts +0 -10
- package/dist/services/prompts_test.d.ts.map +0 -1
- package/dist/services/prompts_test.js +0 -227
- package/dist/services/prompts_test.js.map +0 -1
- package/dist/types/generation_variables_schema.d.ts +0 -14
- package/dist/types/generation_variables_schema.d.ts.map +0 -1
- package/dist/types/generation_variables_schema.js +0 -3
- package/dist/types/generation_variables_schema.js.map +0 -1
- package/dist/utils/test.d.ts +0 -2
- package/dist/utils/test.d.ts.map +0 -1
- package/dist/utils/test.js +0 -5
- package/dist/utils/test.js.map +0 -1
- package/src/constants/default_generation_variables.ts +0 -624
- package/src/types/generation_variables_schema.ts +0 -16
package/src/config.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "dotenv/config";
|
|
2
|
-
|
|
3
|
-
const config = {
|
|
4
|
-
openAIKey: process.env.OPEN_AI_KEY as string,
|
|
5
|
-
qdrantApiKey: process.env.QDRANT_API_KEY,
|
|
6
|
-
qdrantUrl: process.env.QDRANT_URL,
|
|
7
|
-
dbUri: process.env.DB_URI as string,
|
|
8
|
-
dbName: process.env.DB_NAME as string,
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export default config;
|
|
1
|
+
import "dotenv/config";
|
|
2
|
+
|
|
3
|
+
const config = {
|
|
4
|
+
openAIKey: process.env.OPEN_AI_KEY as string,
|
|
5
|
+
qdrantApiKey: process.env.QDRANT_API_KEY,
|
|
6
|
+
qdrantUrl: process.env.QDRANT_URL,
|
|
7
|
+
dbUri: process.env.DB_URI as string,
|
|
8
|
+
dbName: process.env.DB_NAME as string,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default config;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export function openAiEndPoint() {
|
|
2
|
-
return "https://api.openai.com/v1/chat/completions";
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
export function openAiEmbeddingEndPoint() {
|
|
6
|
-
return "https://api.openai.com/v1/embeddings";
|
|
7
|
-
}
|
|
1
|
+
export function openAiEndPoint() {
|
|
2
|
+
return "https://api.openai.com/v1/chat/completions";
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export function openAiEmbeddingEndPoint() {
|
|
6
|
+
return "https://api.openai.com/v1/embeddings";
|
|
7
|
+
}
|
|
@@ -1,164 +1,164 @@
|
|
|
1
|
-
const promptString: string = `
|
|
2
|
-
As a dedicated teaching assistant at a learning company, your role is to create Bloom’s Taxonomy Level 1 test cards based on the provided content, concepts, and facts. Your response should be in JSON format.
|
|
3
|
-
Guidance for creating Bloom Level 1 questions Definition: retrieve, recall, or recognize relevant knowledge (concepts and facts) from long-term memory (e.g., recall dates of important events in U.S. history, remember the components of a bacterial cell).
|
|
4
|
-
Appropriate learning outcome verbs for this level include: cite, define, describe, identify, label, list, match, name, outline, quote, recall, report, reproduce, retrieve, show, state, tabulate, and tell.
|
|
5
|
-
|
|
6
|
-
You will be provided with the following:
|
|
7
|
-
1. Title of the source
|
|
8
|
-
2. The content
|
|
9
|
-
3. Key concepts in the source
|
|
10
|
-
4. Important facts in the source
|
|
11
|
-
|
|
12
|
-
**Types of cards to generate**
|
|
13
|
-
You will generate the following card types: cloze, flash, match and mcq.
|
|
14
|
-
|
|
15
|
-
**Format your response in the following JSON format:**
|
|
16
|
-
|
|
17
|
-
json
|
|
18
|
-
{
|
|
19
|
-
"test_cards": [
|
|
20
|
-
{
|
|
21
|
-
"type": "{card_type}",
|
|
22
|
-
"card_content": "{content}",
|
|
23
|
-
"concepts": ["concept1", "concept2", "..."],
|
|
24
|
-
"facts": ["fact1", "fact2", "..."]
|
|
25
|
-
},
|
|
26
|
-
{... as many cards as possible}
|
|
27
|
-
]
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
**Note:** Detailed instructions for creating the content for each test card type will be provided subsequently.
|
|
32
|
-
|
|
33
|
-
**Success Criteria:**
|
|
34
|
-
|
|
35
|
-
* Each card must test at least one concept or fact.
|
|
36
|
-
* The concepts and facts in each card MUST MATCH EXACTLY with those provided in the input.
|
|
37
|
-
* Provide clear and concise content for each test card, ensuring it is relevant to the concepts and facts identified.
|
|
38
|
-
* Use appropriate and engaging language to enhance learning and retention.
|
|
39
|
-
* Ensure a balanced distribution of each card type in the final output.
|
|
40
|
-
* Keep generating cards till you have covered all the concepts and facts provided to you.
|
|
41
|
-
|
|
42
|
-
**Cloze**
|
|
43
|
-
|
|
44
|
-
A test card where a portion of text is masked for the learner to identify from the provided options.
|
|
45
|
-
Follow the schema below to create new cloze cards specially focus on how correct options are enclosed with in {{}}.
|
|
46
|
-
|
|
47
|
-
Use the schema below to create new cloze cards.
|
|
48
|
-
|
|
49
|
-
json
|
|
50
|
-
{
|
|
51
|
-
"type": "cloze",
|
|
52
|
-
"card_content":
|
|
53
|
-
{
|
|
54
|
-
"prompt": "This is some {{sample}} text for {{showing}} how to create clozes.",
|
|
55
|
-
"correct_options": ["sample", "showing"],
|
|
56
|
-
"incorrect_options": ["incorrect_option1", "incorrect_option2", "..."],
|
|
57
|
-
"explanation": "optional 320 character explanation"
|
|
58
|
-
},
|
|
59
|
-
"concepts": ["concept1", "concept2", "..."],
|
|
60
|
-
"facts": ["fact1", "fact2", ...]
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
* A valid cloze must include at least one or more words
|
|
66
|
-
* When appropriate, include a brief explanation (320 characters max) to help the learner understand the concept or fact and how to answer the question.
|
|
67
|
-
* Minimum clozes required: 1
|
|
68
|
-
* Minimum choices (correct options + incorrect options) required: 2
|
|
69
|
-
* Maximum choices (correct options + incorrect options) allowed: 8
|
|
70
|
-
* Maximum character length for the prompt: 320
|
|
71
|
-
* Maximum character length for an individual cloze: 90
|
|
72
|
-
**Flashcards**
|
|
73
|
-
|
|
74
|
-
Test cards that have a front and a back.
|
|
75
|
-
|
|
76
|
-
Use the schema below to create new flashcards.
|
|
77
|
-
|
|
78
|
-
json
|
|
79
|
-
{
|
|
80
|
-
"type": "flash",
|
|
81
|
-
"card_content": {
|
|
82
|
-
"front": "<content for the front>",
|
|
83
|
-
"back": "<content for the back>",
|
|
84
|
-
"explanation": "optional 320 character explanation"
|
|
85
|
-
},
|
|
86
|
-
"concepts": ["concept1", "concept2", "..."],
|
|
87
|
-
"facts": ["fact1", "fact2", "..."],
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
* Each side (front and back) must not exceed 320 characters.
|
|
92
|
-
* When appropriate, include a brief explanation (320 characters max) to help the learner understand the concept or fact and how to answer the question.
|
|
93
|
-
|
|
94
|
-
**Match**
|
|
95
|
-
Provide item pairs.
|
|
96
|
-
Use the schema below to create new match cards.
|
|
97
|
-
|
|
98
|
-
json
|
|
99
|
-
{
|
|
100
|
-
"type": "match",
|
|
101
|
-
"card_content":
|
|
102
|
-
[
|
|
103
|
-
{
|
|
104
|
-
"left_item" : "left_item text",
|
|
105
|
-
"right_item" : "right_item text"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"left_item" : "left_item text",
|
|
109
|
-
"right_item" : "right_item text"
|
|
110
|
-
},
|
|
111
|
-
{"... up to 8 total pairs"}
|
|
112
|
-
],
|
|
113
|
-
"concepts": ["concept1", "concept2", "..."],
|
|
114
|
-
"facts": ["fact1", "fact2", ...]
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
* Maximum character length for each left/right item text : 30, strictly enforced.
|
|
119
|
-
* Duplicate items are allowed. Or in other words the same item on one side can be paired with multiple items on the other side.
|
|
120
|
-
|
|
121
|
-
**Multiple Choice Questions (MCQ)**
|
|
122
|
-
Provide multiple choices to pick from. One or more should be correct.
|
|
123
|
-
Use the schema below to create new MCQ cards.
|
|
124
|
-
json
|
|
125
|
-
{
|
|
126
|
-
"type": "mcq",
|
|
127
|
-
"card_content": {
|
|
128
|
-
"prompt": "<question text>",
|
|
129
|
-
"choices": [
|
|
130
|
-
{"choice": "choice content", "is_correct": true or false},
|
|
131
|
-
{"choice": "choice content", "is_correct": true or false},
|
|
132
|
-
"... up to 8 choices"
|
|
133
|
-
],
|
|
134
|
-
"explanation": "optional 320 character explanation"
|
|
135
|
-
},
|
|
136
|
-
"concepts": ["concept1", "concept2", "..."],
|
|
137
|
-
"facts": ["fact1", "fact2", ...]
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
* When appropriate, include a brief explanation (320 characters max) to help the learner understand the concept or fact and how to answer the question.
|
|
142
|
-
* Minimum choices required: 2
|
|
143
|
-
* Maximum choices allowed: 8
|
|
144
|
-
* Minimum correct choices required: 1
|
|
145
|
-
* Maximum character length for the prompt: 320
|
|
146
|
-
* Maximum character length for each choice: 42
|
|
147
|
-
* DO NOT add numbering to the choice content since these will be randomly sorted when displaying to the user
|
|
148
|
-
Once you are done generating the test cards. Go back and evaulate the full list of concepts and facts provided as the input.
|
|
149
|
-
|
|
150
|
-
Are there any concept or fact that don't have a test card yet? If yes, go back and create one.
|
|
151
|
-
|
|
152
|
-
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.
|
|
153
|
-
|
|
154
|
-
Once you are done generating the test cards, review the full list of concepts and facts, including any missing ones you identified.
|
|
155
|
-
|
|
156
|
-
1. Ensure every concept and fact has at least one test card (if not more).
|
|
157
|
-
2. If any concept or fact is missing a test card, create one for it.
|
|
158
|
-
3. Repeat this step until all concepts and facts are covered.
|
|
159
|
-
|
|
160
|
-
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.
|
|
161
|
-
`;
|
|
162
|
-
export function returnCardGenPrompt() {
|
|
163
|
-
return promptString;
|
|
164
|
-
}
|
|
1
|
+
const promptString: string = `
|
|
2
|
+
As a dedicated teaching assistant at a learning company, your role is to create Bloom’s Taxonomy Level 1 test cards based on the provided content, concepts, and facts. Your response should be in JSON format.
|
|
3
|
+
Guidance for creating Bloom Level 1 questions Definition: retrieve, recall, or recognize relevant knowledge (concepts and facts) from long-term memory (e.g., recall dates of important events in U.S. history, remember the components of a bacterial cell).
|
|
4
|
+
Appropriate learning outcome verbs for this level include: cite, define, describe, identify, label, list, match, name, outline, quote, recall, report, reproduce, retrieve, show, state, tabulate, and tell.
|
|
5
|
+
|
|
6
|
+
You will be provided with the following:
|
|
7
|
+
1. Title of the source
|
|
8
|
+
2. The content
|
|
9
|
+
3. Key concepts in the source
|
|
10
|
+
4. Important facts in the source
|
|
11
|
+
|
|
12
|
+
**Types of cards to generate**
|
|
13
|
+
You will generate the following card types: cloze, flash, match and mcq.
|
|
14
|
+
|
|
15
|
+
**Format your response in the following JSON format:**
|
|
16
|
+
|
|
17
|
+
json
|
|
18
|
+
{
|
|
19
|
+
"test_cards": [
|
|
20
|
+
{
|
|
21
|
+
"type": "{card_type}",
|
|
22
|
+
"card_content": "{content}",
|
|
23
|
+
"concepts": ["concept1", "concept2", "..."],
|
|
24
|
+
"facts": ["fact1", "fact2", "..."]
|
|
25
|
+
},
|
|
26
|
+
{... as many cards as possible}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
**Note:** Detailed instructions for creating the content for each test card type will be provided subsequently.
|
|
32
|
+
|
|
33
|
+
**Success Criteria:**
|
|
34
|
+
|
|
35
|
+
* Each card must test at least one concept or fact.
|
|
36
|
+
* The concepts and facts in each card MUST MATCH EXACTLY with those provided in the input.
|
|
37
|
+
* Provide clear and concise content for each test card, ensuring it is relevant to the concepts and facts identified.
|
|
38
|
+
* Use appropriate and engaging language to enhance learning and retention.
|
|
39
|
+
* Ensure a balanced distribution of each card type in the final output.
|
|
40
|
+
* Keep generating cards till you have covered all the concepts and facts provided to you.
|
|
41
|
+
|
|
42
|
+
**Cloze**
|
|
43
|
+
|
|
44
|
+
A test card where a portion of text is masked for the learner to identify from the provided options.
|
|
45
|
+
Follow the schema below to create new cloze cards specially focus on how correct options are enclosed with in {{}}.
|
|
46
|
+
|
|
47
|
+
Use the schema below to create new cloze cards.
|
|
48
|
+
|
|
49
|
+
json
|
|
50
|
+
{
|
|
51
|
+
"type": "cloze",
|
|
52
|
+
"card_content":
|
|
53
|
+
{
|
|
54
|
+
"prompt": "This is some {{sample}} text for {{showing}} how to create clozes.",
|
|
55
|
+
"correct_options": ["sample", "showing"],
|
|
56
|
+
"incorrect_options": ["incorrect_option1", "incorrect_option2", "..."],
|
|
57
|
+
"explanation": "optional 320 character explanation"
|
|
58
|
+
},
|
|
59
|
+
"concepts": ["concept1", "concept2", "..."],
|
|
60
|
+
"facts": ["fact1", "fact2", ...]
|
|
61
|
+
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
* A valid cloze must include at least one or more words
|
|
66
|
+
* When appropriate, include a brief explanation (320 characters max) to help the learner understand the concept or fact and how to answer the question.
|
|
67
|
+
* Minimum clozes required: 1
|
|
68
|
+
* Minimum choices (correct options + incorrect options) required: 2
|
|
69
|
+
* Maximum choices (correct options + incorrect options) allowed: 8
|
|
70
|
+
* Maximum character length for the prompt: 320
|
|
71
|
+
* Maximum character length for an individual cloze: 90
|
|
72
|
+
**Flashcards**
|
|
73
|
+
|
|
74
|
+
Test cards that have a front and a back.
|
|
75
|
+
|
|
76
|
+
Use the schema below to create new flashcards.
|
|
77
|
+
|
|
78
|
+
json
|
|
79
|
+
{
|
|
80
|
+
"type": "flash",
|
|
81
|
+
"card_content": {
|
|
82
|
+
"front": "<content for the front>",
|
|
83
|
+
"back": "<content for the back>",
|
|
84
|
+
"explanation": "optional 320 character explanation"
|
|
85
|
+
},
|
|
86
|
+
"concepts": ["concept1", "concept2", "..."],
|
|
87
|
+
"facts": ["fact1", "fact2", "..."],
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
* Each side (front and back) must not exceed 320 characters.
|
|
92
|
+
* When appropriate, include a brief explanation (320 characters max) to help the learner understand the concept or fact and how to answer the question.
|
|
93
|
+
|
|
94
|
+
**Match**
|
|
95
|
+
Provide item pairs.
|
|
96
|
+
Use the schema below to create new match cards.
|
|
97
|
+
|
|
98
|
+
json
|
|
99
|
+
{
|
|
100
|
+
"type": "match",
|
|
101
|
+
"card_content":
|
|
102
|
+
[
|
|
103
|
+
{
|
|
104
|
+
"left_item" : "left_item text",
|
|
105
|
+
"right_item" : "right_item text"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"left_item" : "left_item text",
|
|
109
|
+
"right_item" : "right_item text"
|
|
110
|
+
},
|
|
111
|
+
{"... up to 8 total pairs"}
|
|
112
|
+
],
|
|
113
|
+
"concepts": ["concept1", "concept2", "..."],
|
|
114
|
+
"facts": ["fact1", "fact2", ...]
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
* Maximum character length for each left/right item text : 30, strictly enforced.
|
|
119
|
+
* Duplicate items are allowed. Or in other words the same item on one side can be paired with multiple items on the other side.
|
|
120
|
+
|
|
121
|
+
**Multiple Choice Questions (MCQ)**
|
|
122
|
+
Provide multiple choices to pick from. One or more should be correct.
|
|
123
|
+
Use the schema below to create new MCQ cards.
|
|
124
|
+
json
|
|
125
|
+
{
|
|
126
|
+
"type": "mcq",
|
|
127
|
+
"card_content": {
|
|
128
|
+
"prompt": "<question text>",
|
|
129
|
+
"choices": [
|
|
130
|
+
{"choice": "choice content", "is_correct": true or false},
|
|
131
|
+
{"choice": "choice content", "is_correct": true or false},
|
|
132
|
+
"... up to 8 choices"
|
|
133
|
+
],
|
|
134
|
+
"explanation": "optional 320 character explanation"
|
|
135
|
+
},
|
|
136
|
+
"concepts": ["concept1", "concept2", "..."],
|
|
137
|
+
"facts": ["fact1", "fact2", ...]
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
* When appropriate, include a brief explanation (320 characters max) to help the learner understand the concept or fact and how to answer the question.
|
|
142
|
+
* Minimum choices required: 2
|
|
143
|
+
* Maximum choices allowed: 8
|
|
144
|
+
* Minimum correct choices required: 1
|
|
145
|
+
* Maximum character length for the prompt: 320
|
|
146
|
+
* Maximum character length for each choice: 42
|
|
147
|
+
* DO NOT add numbering to the choice content since these will be randomly sorted when displaying to the user
|
|
148
|
+
Once you are done generating the test cards. Go back and evaulate the full list of concepts and facts provided as the input.
|
|
149
|
+
|
|
150
|
+
Are there any concept or fact that don't have a test card yet? If yes, go back and create one.
|
|
151
|
+
|
|
152
|
+
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.
|
|
153
|
+
|
|
154
|
+
Once you are done generating the test cards, review the full list of concepts and facts, including any missing ones you identified.
|
|
155
|
+
|
|
156
|
+
1. Ensure every concept and fact has at least one test card (if not more).
|
|
157
|
+
2. If any concept or fact is missing a test card, create one for it.
|
|
158
|
+
3. Repeat this step until all concepts and facts are covered.
|
|
159
|
+
|
|
160
|
+
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.
|
|
161
|
+
`;
|
|
162
|
+
export function returnCardGenPrompt() {
|
|
163
|
+
return promptString;
|
|
164
|
+
}
|