only_ever_generator 8.4.6 → 8.4.7
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 +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -9
- 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
|
@@ -1,372 +1,372 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const responseData = {
|
|
3
|
-
flash_cards: [
|
|
4
|
-
{
|
|
5
|
-
question: "What is the primary function of the 'Electrolysis'?",
|
|
6
|
-
answer: "Electrolysis is the passing of a direct electric current through an electrolyte producing chemical reactions at the electrodes and decomposition of the materials.",
|
|
7
|
-
heading: "Overview",
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
question: "What did Michael Faraday discover while studying the process of electrolysis under Humphry Davy?",
|
|
11
|
-
answer: "Michael Faraday discovered two laws of electrolysis.",
|
|
12
|
-
heading: "History",
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
question: "What can electrolysis be used for in the manufacturing sector?",
|
|
16
|
-
answer: "Electrolysis can be used for electroplating and electrochemical machining.",
|
|
17
|
-
heading: "Manufacturing processes",
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
question: "In the context of electrolysis, what does the term 'Decomposition potential' refer to?",
|
|
21
|
-
answer: "Decomposition potential or decomposition voltage refers to the minimum voltage between anode and cathode of an electrolytic cell needed for electrolysis to occur.",
|
|
22
|
-
heading: "Decomposition potential",
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
mcqs: [
|
|
26
|
-
{
|
|
27
|
-
question: "What is the primary purpose of 'Electrometallurgy'?",
|
|
28
|
-
answers: [
|
|
29
|
-
{
|
|
30
|
-
answer: "Production of aluminium",
|
|
31
|
-
is_correct: true,
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
answer: "Chlorine production",
|
|
35
|
-
is_correct: false,
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
answer: "Purifying copper",
|
|
39
|
-
is_correct: false,
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
answer: "Rust removal",
|
|
43
|
-
is_correct: false,
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
answer: "Hydrogen production",
|
|
47
|
-
is_correct: false,
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
heading: "Industrial uses",
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
question: "What can electrolysis be used for in the context of batteries?",
|
|
54
|
-
answers: [
|
|
55
|
-
{
|
|
56
|
-
answer: "Spontaneous redox reactions",
|
|
57
|
-
is_correct: true,
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
answer: "Energy-releasing reactions",
|
|
61
|
-
is_correct: false,
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
answer: "Disinfectant production",
|
|
65
|
-
is_correct: false,
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
answer: "Fuel production",
|
|
69
|
-
is_correct: false,
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
answer: "Gas diffusion in reactors",
|
|
73
|
-
is_correct: false,
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
heading: "Related processes",
|
|
77
|
-
},
|
|
78
|
-
],
|
|
79
|
-
cloze_cards: [
|
|
80
|
-
{
|
|
81
|
-
question: "Electrolysis is the passing of a {{c0:direct electric current}} through an {{c1:electrolyte}} producing {{c2:chemical reactions}} at the {{c3:electrodes}} and {{c4:decomposition}} of the materials.",
|
|
82
|
-
options: [
|
|
83
|
-
{
|
|
84
|
-
option: "direct electric current",
|
|
85
|
-
cloze: "c0",
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
option: "electrolyte",
|
|
89
|
-
cloze: "c1",
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
option: "chemical reactions",
|
|
93
|
-
cloze: "c2",
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
option: "electrodes",
|
|
97
|
-
cloze: "c3",
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
option: "decomposition",
|
|
101
|
-
cloze: "c4",
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
option: "metallic objects",
|
|
105
|
-
cloze: null,
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
question: "In electrolysis, the decomposition potential or decomposition voltage refers to the minimum voltage between {{c0:anode}} and {{c1:cathode}} of an electrolytic cell needed for electrolysis to occur.",
|
|
111
|
-
options: [
|
|
112
|
-
{
|
|
113
|
-
option: "anode",
|
|
114
|
-
cloze: "c0",
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
option: "cathode",
|
|
118
|
-
cloze: "c1",
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
option: "electrolyte",
|
|
122
|
-
cloze: null,
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
option: "chemical reactions",
|
|
126
|
-
cloze: null,
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
option: "oxygen",
|
|
130
|
-
cloze: null,
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
option: "hydrogen",
|
|
134
|
-
cloze: null,
|
|
135
|
-
},
|
|
136
|
-
],
|
|
137
|
-
},
|
|
138
|
-
],
|
|
139
|
-
};
|
|
140
|
-
const sourceResp = {
|
|
141
|
-
status_code: 200,
|
|
142
|
-
usage_data: {
|
|
143
|
-
prompt_tokens: 9781,
|
|
144
|
-
completion_tokens: 1915,
|
|
145
|
-
total_tokens: 11696,
|
|
146
|
-
},
|
|
147
|
-
generated_content: {
|
|
148
|
-
missing_concepts: [
|
|
149
|
-
"Faraday's laws of electrolysis",
|
|
150
|
-
"Humphry Davy",
|
|
151
|
-
"Electrolytic cell",
|
|
152
|
-
"Decomposition potential",
|
|
153
|
-
"Oxidation",
|
|
154
|
-
"Reduction",
|
|
155
|
-
"Electrolysis of seawater",
|
|
156
|
-
"Electrometallurgy",
|
|
157
|
-
"Electroplating",
|
|
158
|
-
"Electrochemical machining",
|
|
159
|
-
"Electrochemistry",
|
|
160
|
-
"Electrocatalysis",
|
|
161
|
-
"Electrorefining",
|
|
162
|
-
"Electrolysis of carbon dioxide",
|
|
163
|
-
"Energy changes during electrolysis",
|
|
164
|
-
"Electrocrystallization",
|
|
165
|
-
"Electrolysis of Iron Ore",
|
|
166
|
-
],
|
|
167
|
-
missing_facts: [
|
|
168
|
-
"Michael Faraday introduced the term 'electrolysis' in 1834",
|
|
169
|
-
"The first demonstration of key electrolysis concepts was by William Nicholson and Anthony Carlisle in the early nineteenth century",
|
|
170
|
-
"Humphry Davy discovered several alkali and alkaline earth metals by electrolysis",
|
|
171
|
-
"Electrolysis played a key role in isolating and identifying new elements like lithium, chlorine, and fluorine",
|
|
172
|
-
"The Hall–Héroult process led to a significant drop in the price of aluminum",
|
|
173
|
-
"Hydrogen and oxygen are produced in a 2:1 ratio by the electrolysis of water",
|
|
174
|
-
"The electrolysis of seawater can result in the production of alkali hydroxides",
|
|
175
|
-
"Electrometallurgy is used in the production of various metals",
|
|
176
|
-
"Electroplating involves the deposition of a thin metal film onto a substrate material",
|
|
177
|
-
"Electrochemical machining is used for deburring or etching metal surfaces",
|
|
178
|
-
"Electrocatalysis involves the acceleration of electrochemical reactions",
|
|
179
|
-
"Electrorefining is used to obtain pure metals from impure ones",
|
|
180
|
-
"The electrolysis of carbon dioxide can produce methane, ethylene, or ethanol",
|
|
181
|
-
"Energy changes during electrolysis involve the addition of electrical energy, equal to the change in Gibbs free energy plus system losses",
|
|
182
|
-
"Electrocrystallization is a method for obtaining conductive crystals using electrolysis",
|
|
183
|
-
"Electrolysis of Iron Ore can eventually result in the reduction of emissions from steel production",
|
|
184
|
-
],
|
|
185
|
-
test_cards: [
|
|
186
|
-
{
|
|
187
|
-
type: "flash",
|
|
188
|
-
card_content: {
|
|
189
|
-
front: "Who introduced the term 'electrolysis' and in which year?",
|
|
190
|
-
back: "Michael Faraday introduced the term 'electrolysis' in 1834",
|
|
191
|
-
},
|
|
192
|
-
card_reference: "Electrolysis#Etymology",
|
|
193
|
-
concepts: [],
|
|
194
|
-
facts: ["Michael Faraday introduced the term 'electrolysis' in 1834"],
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
type: "flash",
|
|
198
|
-
card_content: {
|
|
199
|
-
front: "What was the significance of the Hall–Héroult process?",
|
|
200
|
-
back: "The Hall–Héroult process led to a significant drop in the price of aluminum",
|
|
201
|
-
},
|
|
202
|
-
card_reference: "Electrolysis#Industrial uses",
|
|
203
|
-
concepts: ["Hall–Héroult process"],
|
|
204
|
-
facts: [
|
|
205
|
-
"The Hall–Héroult process led to a significant drop in the price of aluminum",
|
|
206
|
-
],
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
type: "mcq",
|
|
210
|
-
card_content: {
|
|
211
|
-
prompt: "What does the electrolysis of water produce?",
|
|
212
|
-
choices: [
|
|
213
|
-
{
|
|
214
|
-
choice: "Oxygen and carbon dioxide",
|
|
215
|
-
is_correct: false,
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
choice: "Hydrogen and oxygen",
|
|
219
|
-
is_correct: true,
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
choice: "Nitrogen and helium",
|
|
223
|
-
is_correct: false,
|
|
224
|
-
},
|
|
225
|
-
],
|
|
226
|
-
},
|
|
227
|
-
card_reference: "Electrolysis#Process of electrolysis",
|
|
228
|
-
concepts: ["Electrometallurgy"],
|
|
229
|
-
facts: [
|
|
230
|
-
"Hydrogen and oxygen are produced in a 2:1 ratio by the electrolysis of water",
|
|
231
|
-
],
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
type: "cloze",
|
|
235
|
-
card_content: {
|
|
236
|
-
prompt: "Electrolysis is the passing of a direct electric current through an {{c0:electrolyte}} producing chemical reactions at the electrodes and decomposition of the materials.",
|
|
237
|
-
options: [
|
|
238
|
-
{
|
|
239
|
-
option: "electrolyte",
|
|
240
|
-
cloze: "c0",
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
option: "anode",
|
|
244
|
-
cloze: "null",
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
option: "cathode",
|
|
248
|
-
cloze: "null",
|
|
249
|
-
},
|
|
250
|
-
],
|
|
251
|
-
},
|
|
252
|
-
card_reference: "Electrolysis#Overview",
|
|
253
|
-
concepts: [],
|
|
254
|
-
facts: [],
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
type: "match",
|
|
258
|
-
card_content: {
|
|
259
|
-
"right_choice 1": "Electrometallurgy",
|
|
260
|
-
"right_choice 2": "Electroplating",
|
|
261
|
-
"right_choice 3": "Electrochemical machining",
|
|
262
|
-
"right_choice 4": "Electrochemistry",
|
|
263
|
-
"right_choice 5": "Electrocatalysis",
|
|
264
|
-
"right_choice 6": "Electrorefining",
|
|
265
|
-
"right_choice 7": "Electrolysis of carbon dioxide",
|
|
266
|
-
"right_choice 8": "Energy changes during electrolysis",
|
|
267
|
-
Electrometallurgy: "The process of producing metals using electricity",
|
|
268
|
-
Electroplating: "Deposition of thin metal film onto a substrate material",
|
|
269
|
-
"Electrochemical machining": "Deburring or etching metal surfaces",
|
|
270
|
-
Electrochemistry: "Study of the interchange of chemical and electrical energy",
|
|
271
|
-
Electrocatalysis: "Acceleration of electrochemical reactions",
|
|
272
|
-
Electrorefining: "Obtaining pure metals from impure ones",
|
|
273
|
-
},
|
|
274
|
-
card_reference: "Electrolysis#Industrial uses",
|
|
275
|
-
concepts: [
|
|
276
|
-
"Electrometallurgy",
|
|
277
|
-
"Electroplating",
|
|
278
|
-
"Electrochemical machining",
|
|
279
|
-
"Electrochemistry",
|
|
280
|
-
"Electrocatalysis",
|
|
281
|
-
"Electrorefining",
|
|
282
|
-
"Electrolysis of carbon dioxide",
|
|
283
|
-
"Energy changes during electrolysis",
|
|
284
|
-
],
|
|
285
|
-
facts: [
|
|
286
|
-
"Electrometallurgy is used in the production of various metals",
|
|
287
|
-
"Electroplating involves the deposition of a thin metal film onto a substrate material",
|
|
288
|
-
"Electrochemical machining is used for deburring or etching metal surfaces",
|
|
289
|
-
"Electrochemistry is the study of the interchange of chemical and electrical energy",
|
|
290
|
-
"Electrocatalysis involves the acceleration of electrochemical reactions",
|
|
291
|
-
"Electrorefining is used to obtain pure metals from impure ones",
|
|
292
|
-
"The electrolysis of carbon dioxide can produce methane, ethylene, or ethanol",
|
|
293
|
-
"Energy changes during electrolysis involve the addition of electrical energy, equal to the change in Gibbs free energy plus system losses",
|
|
294
|
-
],
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
type: "mcq",
|
|
298
|
-
card_content: {
|
|
299
|
-
prompt: "What is a key application of electrolysis?",
|
|
300
|
-
choices: [
|
|
301
|
-
{
|
|
302
|
-
choice: "Production of metal from ore",
|
|
303
|
-
is_correct: false,
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
choice: "Pulsing current results",
|
|
307
|
-
is_correct: false,
|
|
308
|
-
},
|
|
309
|
-
{
|
|
310
|
-
choice: "Generating electrical potential",
|
|
311
|
-
is_correct: false,
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
choice: "Production of chlorine and sodium hydroxide",
|
|
315
|
-
is_correct: true,
|
|
316
|
-
},
|
|
317
|
-
],
|
|
318
|
-
},
|
|
319
|
-
card_reference: "Electrolysis#Industrial uses",
|
|
320
|
-
concepts: ["Electrochemistry", "Electrocatalysis", "Electrorefining"],
|
|
321
|
-
facts: [
|
|
322
|
-
"Production of chlorine and sodium hydroxide, called the Chloralkali process",
|
|
323
|
-
],
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
type: "cloze",
|
|
327
|
-
card_content: {
|
|
328
|
-
prompt: "Oxidation of ions or neutral molecules occurs at the {{c0:anode}}. Reduction of ions or neutral molecules occurs at the {{c1:cathode}}.",
|
|
329
|
-
options: [
|
|
330
|
-
{
|
|
331
|
-
option: "anode",
|
|
332
|
-
cloze: "c0",
|
|
333
|
-
},
|
|
334
|
-
{
|
|
335
|
-
option: "cathode",
|
|
336
|
-
cloze: "c1",
|
|
337
|
-
},
|
|
338
|
-
{
|
|
339
|
-
option: "electrolyte",
|
|
340
|
-
cloze: "null",
|
|
341
|
-
},
|
|
342
|
-
],
|
|
343
|
-
},
|
|
344
|
-
card_reference: "Electrolysis#Oxidation and reduction at the electrodes",
|
|
345
|
-
concepts: ["Oxidation", "Reduction"],
|
|
346
|
-
facts: [],
|
|
347
|
-
},
|
|
348
|
-
{
|
|
349
|
-
type: "match",
|
|
350
|
-
card_content: {
|
|
351
|
-
"right_choice 1": "Electrolysis",
|
|
352
|
-
"right_choice 2": "Electrocrystallization",
|
|
353
|
-
"right_choice 3": "Electrolysis of Iron Ore",
|
|
354
|
-
"right_choice 4": "Electrolysis of seawater",
|
|
355
|
-
"right_choice 5": "Electrometallurgy",
|
|
356
|
-
},
|
|
357
|
-
card_reference: "Electrolysis#Research trends",
|
|
358
|
-
concepts: [
|
|
359
|
-
"Electrolysis",
|
|
360
|
-
"Electrocrystallization",
|
|
361
|
-
"Electrolysis of Iron Ore",
|
|
362
|
-
"Electrolysis of seawater",
|
|
363
|
-
"Electrometallurgy",
|
|
364
|
-
],
|
|
365
|
-
facts: [],
|
|
366
|
-
},
|
|
367
|
-
],
|
|
368
|
-
},
|
|
369
|
-
generated_at: 1718625081,
|
|
370
|
-
type: "card_gen",
|
|
371
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
const responseData = {
|
|
3
|
+
flash_cards: [
|
|
4
|
+
{
|
|
5
|
+
question: "What is the primary function of the 'Electrolysis'?",
|
|
6
|
+
answer: "Electrolysis is the passing of a direct electric current through an electrolyte producing chemical reactions at the electrodes and decomposition of the materials.",
|
|
7
|
+
heading: "Overview",
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
question: "What did Michael Faraday discover while studying the process of electrolysis under Humphry Davy?",
|
|
11
|
+
answer: "Michael Faraday discovered two laws of electrolysis.",
|
|
12
|
+
heading: "History",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
question: "What can electrolysis be used for in the manufacturing sector?",
|
|
16
|
+
answer: "Electrolysis can be used for electroplating and electrochemical machining.",
|
|
17
|
+
heading: "Manufacturing processes",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
question: "In the context of electrolysis, what does the term 'Decomposition potential' refer to?",
|
|
21
|
+
answer: "Decomposition potential or decomposition voltage refers to the minimum voltage between anode and cathode of an electrolytic cell needed for electrolysis to occur.",
|
|
22
|
+
heading: "Decomposition potential",
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
mcqs: [
|
|
26
|
+
{
|
|
27
|
+
question: "What is the primary purpose of 'Electrometallurgy'?",
|
|
28
|
+
answers: [
|
|
29
|
+
{
|
|
30
|
+
answer: "Production of aluminium",
|
|
31
|
+
is_correct: true,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
answer: "Chlorine production",
|
|
35
|
+
is_correct: false,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
answer: "Purifying copper",
|
|
39
|
+
is_correct: false,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
answer: "Rust removal",
|
|
43
|
+
is_correct: false,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
answer: "Hydrogen production",
|
|
47
|
+
is_correct: false,
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
heading: "Industrial uses",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
question: "What can electrolysis be used for in the context of batteries?",
|
|
54
|
+
answers: [
|
|
55
|
+
{
|
|
56
|
+
answer: "Spontaneous redox reactions",
|
|
57
|
+
is_correct: true,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
answer: "Energy-releasing reactions",
|
|
61
|
+
is_correct: false,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
answer: "Disinfectant production",
|
|
65
|
+
is_correct: false,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
answer: "Fuel production",
|
|
69
|
+
is_correct: false,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
answer: "Gas diffusion in reactors",
|
|
73
|
+
is_correct: false,
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
heading: "Related processes",
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
cloze_cards: [
|
|
80
|
+
{
|
|
81
|
+
question: "Electrolysis is the passing of a {{c0:direct electric current}} through an {{c1:electrolyte}} producing {{c2:chemical reactions}} at the {{c3:electrodes}} and {{c4:decomposition}} of the materials.",
|
|
82
|
+
options: [
|
|
83
|
+
{
|
|
84
|
+
option: "direct electric current",
|
|
85
|
+
cloze: "c0",
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
option: "electrolyte",
|
|
89
|
+
cloze: "c1",
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
option: "chemical reactions",
|
|
93
|
+
cloze: "c2",
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
option: "electrodes",
|
|
97
|
+
cloze: "c3",
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
option: "decomposition",
|
|
101
|
+
cloze: "c4",
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
option: "metallic objects",
|
|
105
|
+
cloze: null,
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
question: "In electrolysis, the decomposition potential or decomposition voltage refers to the minimum voltage between {{c0:anode}} and {{c1:cathode}} of an electrolytic cell needed for electrolysis to occur.",
|
|
111
|
+
options: [
|
|
112
|
+
{
|
|
113
|
+
option: "anode",
|
|
114
|
+
cloze: "c0",
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
option: "cathode",
|
|
118
|
+
cloze: "c1",
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
option: "electrolyte",
|
|
122
|
+
cloze: null,
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
option: "chemical reactions",
|
|
126
|
+
cloze: null,
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
option: "oxygen",
|
|
130
|
+
cloze: null,
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
option: "hydrogen",
|
|
134
|
+
cloze: null,
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
};
|
|
140
|
+
const sourceResp = {
|
|
141
|
+
status_code: 200,
|
|
142
|
+
usage_data: {
|
|
143
|
+
prompt_tokens: 9781,
|
|
144
|
+
completion_tokens: 1915,
|
|
145
|
+
total_tokens: 11696,
|
|
146
|
+
},
|
|
147
|
+
generated_content: {
|
|
148
|
+
missing_concepts: [
|
|
149
|
+
"Faraday's laws of electrolysis",
|
|
150
|
+
"Humphry Davy",
|
|
151
|
+
"Electrolytic cell",
|
|
152
|
+
"Decomposition potential",
|
|
153
|
+
"Oxidation",
|
|
154
|
+
"Reduction",
|
|
155
|
+
"Electrolysis of seawater",
|
|
156
|
+
"Electrometallurgy",
|
|
157
|
+
"Electroplating",
|
|
158
|
+
"Electrochemical machining",
|
|
159
|
+
"Electrochemistry",
|
|
160
|
+
"Electrocatalysis",
|
|
161
|
+
"Electrorefining",
|
|
162
|
+
"Electrolysis of carbon dioxide",
|
|
163
|
+
"Energy changes during electrolysis",
|
|
164
|
+
"Electrocrystallization",
|
|
165
|
+
"Electrolysis of Iron Ore",
|
|
166
|
+
],
|
|
167
|
+
missing_facts: [
|
|
168
|
+
"Michael Faraday introduced the term 'electrolysis' in 1834",
|
|
169
|
+
"The first demonstration of key electrolysis concepts was by William Nicholson and Anthony Carlisle in the early nineteenth century",
|
|
170
|
+
"Humphry Davy discovered several alkali and alkaline earth metals by electrolysis",
|
|
171
|
+
"Electrolysis played a key role in isolating and identifying new elements like lithium, chlorine, and fluorine",
|
|
172
|
+
"The Hall–Héroult process led to a significant drop in the price of aluminum",
|
|
173
|
+
"Hydrogen and oxygen are produced in a 2:1 ratio by the electrolysis of water",
|
|
174
|
+
"The electrolysis of seawater can result in the production of alkali hydroxides",
|
|
175
|
+
"Electrometallurgy is used in the production of various metals",
|
|
176
|
+
"Electroplating involves the deposition of a thin metal film onto a substrate material",
|
|
177
|
+
"Electrochemical machining is used for deburring or etching metal surfaces",
|
|
178
|
+
"Electrocatalysis involves the acceleration of electrochemical reactions",
|
|
179
|
+
"Electrorefining is used to obtain pure metals from impure ones",
|
|
180
|
+
"The electrolysis of carbon dioxide can produce methane, ethylene, or ethanol",
|
|
181
|
+
"Energy changes during electrolysis involve the addition of electrical energy, equal to the change in Gibbs free energy plus system losses",
|
|
182
|
+
"Electrocrystallization is a method for obtaining conductive crystals using electrolysis",
|
|
183
|
+
"Electrolysis of Iron Ore can eventually result in the reduction of emissions from steel production",
|
|
184
|
+
],
|
|
185
|
+
test_cards: [
|
|
186
|
+
{
|
|
187
|
+
type: "flash",
|
|
188
|
+
card_content: {
|
|
189
|
+
front: "Who introduced the term 'electrolysis' and in which year?",
|
|
190
|
+
back: "Michael Faraday introduced the term 'electrolysis' in 1834",
|
|
191
|
+
},
|
|
192
|
+
card_reference: "Electrolysis#Etymology",
|
|
193
|
+
concepts: [],
|
|
194
|
+
facts: ["Michael Faraday introduced the term 'electrolysis' in 1834"],
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
type: "flash",
|
|
198
|
+
card_content: {
|
|
199
|
+
front: "What was the significance of the Hall–Héroult process?",
|
|
200
|
+
back: "The Hall–Héroult process led to a significant drop in the price of aluminum",
|
|
201
|
+
},
|
|
202
|
+
card_reference: "Electrolysis#Industrial uses",
|
|
203
|
+
concepts: ["Hall–Héroult process"],
|
|
204
|
+
facts: [
|
|
205
|
+
"The Hall–Héroult process led to a significant drop in the price of aluminum",
|
|
206
|
+
],
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
type: "mcq",
|
|
210
|
+
card_content: {
|
|
211
|
+
prompt: "What does the electrolysis of water produce?",
|
|
212
|
+
choices: [
|
|
213
|
+
{
|
|
214
|
+
choice: "Oxygen and carbon dioxide",
|
|
215
|
+
is_correct: false,
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
choice: "Hydrogen and oxygen",
|
|
219
|
+
is_correct: true,
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
choice: "Nitrogen and helium",
|
|
223
|
+
is_correct: false,
|
|
224
|
+
},
|
|
225
|
+
],
|
|
226
|
+
},
|
|
227
|
+
card_reference: "Electrolysis#Process of electrolysis",
|
|
228
|
+
concepts: ["Electrometallurgy"],
|
|
229
|
+
facts: [
|
|
230
|
+
"Hydrogen and oxygen are produced in a 2:1 ratio by the electrolysis of water",
|
|
231
|
+
],
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
type: "cloze",
|
|
235
|
+
card_content: {
|
|
236
|
+
prompt: "Electrolysis is the passing of a direct electric current through an {{c0:electrolyte}} producing chemical reactions at the electrodes and decomposition of the materials.",
|
|
237
|
+
options: [
|
|
238
|
+
{
|
|
239
|
+
option: "electrolyte",
|
|
240
|
+
cloze: "c0",
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
option: "anode",
|
|
244
|
+
cloze: "null",
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
option: "cathode",
|
|
248
|
+
cloze: "null",
|
|
249
|
+
},
|
|
250
|
+
],
|
|
251
|
+
},
|
|
252
|
+
card_reference: "Electrolysis#Overview",
|
|
253
|
+
concepts: [],
|
|
254
|
+
facts: [],
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
type: "match",
|
|
258
|
+
card_content: {
|
|
259
|
+
"right_choice 1": "Electrometallurgy",
|
|
260
|
+
"right_choice 2": "Electroplating",
|
|
261
|
+
"right_choice 3": "Electrochemical machining",
|
|
262
|
+
"right_choice 4": "Electrochemistry",
|
|
263
|
+
"right_choice 5": "Electrocatalysis",
|
|
264
|
+
"right_choice 6": "Electrorefining",
|
|
265
|
+
"right_choice 7": "Electrolysis of carbon dioxide",
|
|
266
|
+
"right_choice 8": "Energy changes during electrolysis",
|
|
267
|
+
Electrometallurgy: "The process of producing metals using electricity",
|
|
268
|
+
Electroplating: "Deposition of thin metal film onto a substrate material",
|
|
269
|
+
"Electrochemical machining": "Deburring or etching metal surfaces",
|
|
270
|
+
Electrochemistry: "Study of the interchange of chemical and electrical energy",
|
|
271
|
+
Electrocatalysis: "Acceleration of electrochemical reactions",
|
|
272
|
+
Electrorefining: "Obtaining pure metals from impure ones",
|
|
273
|
+
},
|
|
274
|
+
card_reference: "Electrolysis#Industrial uses",
|
|
275
|
+
concepts: [
|
|
276
|
+
"Electrometallurgy",
|
|
277
|
+
"Electroplating",
|
|
278
|
+
"Electrochemical machining",
|
|
279
|
+
"Electrochemistry",
|
|
280
|
+
"Electrocatalysis",
|
|
281
|
+
"Electrorefining",
|
|
282
|
+
"Electrolysis of carbon dioxide",
|
|
283
|
+
"Energy changes during electrolysis",
|
|
284
|
+
],
|
|
285
|
+
facts: [
|
|
286
|
+
"Electrometallurgy is used in the production of various metals",
|
|
287
|
+
"Electroplating involves the deposition of a thin metal film onto a substrate material",
|
|
288
|
+
"Electrochemical machining is used for deburring or etching metal surfaces",
|
|
289
|
+
"Electrochemistry is the study of the interchange of chemical and electrical energy",
|
|
290
|
+
"Electrocatalysis involves the acceleration of electrochemical reactions",
|
|
291
|
+
"Electrorefining is used to obtain pure metals from impure ones",
|
|
292
|
+
"The electrolysis of carbon dioxide can produce methane, ethylene, or ethanol",
|
|
293
|
+
"Energy changes during electrolysis involve the addition of electrical energy, equal to the change in Gibbs free energy plus system losses",
|
|
294
|
+
],
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
type: "mcq",
|
|
298
|
+
card_content: {
|
|
299
|
+
prompt: "What is a key application of electrolysis?",
|
|
300
|
+
choices: [
|
|
301
|
+
{
|
|
302
|
+
choice: "Production of metal from ore",
|
|
303
|
+
is_correct: false,
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
choice: "Pulsing current results",
|
|
307
|
+
is_correct: false,
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
choice: "Generating electrical potential",
|
|
311
|
+
is_correct: false,
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
choice: "Production of chlorine and sodium hydroxide",
|
|
315
|
+
is_correct: true,
|
|
316
|
+
},
|
|
317
|
+
],
|
|
318
|
+
},
|
|
319
|
+
card_reference: "Electrolysis#Industrial uses",
|
|
320
|
+
concepts: ["Electrochemistry", "Electrocatalysis", "Electrorefining"],
|
|
321
|
+
facts: [
|
|
322
|
+
"Production of chlorine and sodium hydroxide, called the Chloralkali process",
|
|
323
|
+
],
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
type: "cloze",
|
|
327
|
+
card_content: {
|
|
328
|
+
prompt: "Oxidation of ions or neutral molecules occurs at the {{c0:anode}}. Reduction of ions or neutral molecules occurs at the {{c1:cathode}}.",
|
|
329
|
+
options: [
|
|
330
|
+
{
|
|
331
|
+
option: "anode",
|
|
332
|
+
cloze: "c0",
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
option: "cathode",
|
|
336
|
+
cloze: "c1",
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
option: "electrolyte",
|
|
340
|
+
cloze: "null",
|
|
341
|
+
},
|
|
342
|
+
],
|
|
343
|
+
},
|
|
344
|
+
card_reference: "Electrolysis#Oxidation and reduction at the electrodes",
|
|
345
|
+
concepts: ["Oxidation", "Reduction"],
|
|
346
|
+
facts: [],
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
type: "match",
|
|
350
|
+
card_content: {
|
|
351
|
+
"right_choice 1": "Electrolysis",
|
|
352
|
+
"right_choice 2": "Electrocrystallization",
|
|
353
|
+
"right_choice 3": "Electrolysis of Iron Ore",
|
|
354
|
+
"right_choice 4": "Electrolysis of seawater",
|
|
355
|
+
"right_choice 5": "Electrometallurgy",
|
|
356
|
+
},
|
|
357
|
+
card_reference: "Electrolysis#Research trends",
|
|
358
|
+
concepts: [
|
|
359
|
+
"Electrolysis",
|
|
360
|
+
"Electrocrystallization",
|
|
361
|
+
"Electrolysis of Iron Ore",
|
|
362
|
+
"Electrolysis of seawater",
|
|
363
|
+
"Electrometallurgy",
|
|
364
|
+
],
|
|
365
|
+
facts: [],
|
|
366
|
+
},
|
|
367
|
+
],
|
|
368
|
+
},
|
|
369
|
+
generated_at: 1718625081,
|
|
370
|
+
type: "card_gen",
|
|
371
|
+
};
|
|
372
372
|
//# sourceMappingURL=response_format_card.js.map
|