-
Notifications
You must be signed in to change notification settings - Fork 55
/
app_lo_generator.py
432 lines (370 loc) · 41.3 KB
/
app_lo_generator.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
PUBLISHED = True
APP_URL = "https://lo-generator.streamlit.app"
APP_IMAGE = "lo_builder_flat.webp"
APP_TITLE = "Learning Objectives Builder"
APP_INTRO = """This micro-app allows you to generate learning objectives or validate alignment for existing learning objectives. It is meant as an experiment to explore how adoption, efficiency, and shareability of generative AI is affected when you wrap lightweight, hyper-personalized wrappers around it. Wrappers like this can take a few hours to build, which fast enough to justify building different micro-apps for different use cases. They also ideally codify good practices (in this case, instructional design practices) into AI prompting.
"""
APP_HOW_IT_WORKS = """
1. Fill in the details of the assessment.
2. Choose the language model.
3. Configure the prompt and additional options.
4. Generate Learning Objectives.
"""
LONG_TEXT = str("""Consumer behaviour is the study of individuals, groups, or organisations and all the activities associated with the purchase, use and disposal of goods and services. Consumer behaviour consists of how the consumer's emotions, attitudes, and preferences affect buying behaviour. Consumer behaviour emerged in the 1940–1950s as a distinct sub-discipline of marketing, but has become an interdisciplinary social science that blends elements from psychology, sociology, social anthropology, anthropology, ethnography, ethnology, marketing, and economics (especially behavioural economics).
The study of consumer behaviour formally investigates individual qualities such as demographics, personality lifestyles, and behavioural variables (such as usage rates, usage occasion, loyalty, brand advocacy, and willingness to provide referrals), in an attempt to understand people's wants and consumption patterns. Consumer behaviour also investigates on the influences on the consumer, from social groups such as family, friends, sports, and reference groups, to society in general (brand-influencers, opinion leaders).
Because consumer behaviour is hard to predict, marketers and researchers employ ethnography, consumer neuroscience, and machine learning[1] and use customer relationship management (CRM) databases for analysis of customer patterns. The extensive data produced by these databases enables detailed examination of behavioural factors that contribute to customer re-purchase intentions, consumer retention, loyalty, and other behavioural intentions such as the willingness to provide positive referrals, become brand advocates, or engage in customer citizenship activities. Databases also assist in market segmentation, especially behavioural segmentation such as developing loyalty segments, which can be used to develop tightly targeted customised marketing strategies on a one-to-one basis.
Origins of consumer behaviour
Main article: History of marketing § History of marketing thought
In the 1940s and 1950s, marketing was dominated by the so-called classical schools of thought which were highly descriptive and relied heavily on case study approaches with only occasional use of interview methods. At the end of the 1950s, two important reports criticised marketing for its lack of methodological rigor, especially the failure to adopt mathematically-oriented behavioural science research methods.[2] The stage was set for marketing to become more inter-disciplinary by adopting a consumer-behaviourist perspective.
From the 1950s, marketing began to shift its reliance away from economics and towards other disciplines, notably the behavioural sciences, including sociology, anthropology, and clinical psychology. This resulted in a new emphasis on the customer as a unit of analysis. As a result, new substantive knowledge was added to the marketing discipline – including such ideas as opinion leadership, reference groups, and brand loyalty. Market segmentation, especially demographic segmentation based on socioeconomic status (SES) index and household life-cycle, also became fashionable. With the addition of consumer behaviour, the marketing discipline exhibited increasing scientific sophistication with respect to theory development and testing procedures.[3]
In its early years, consumer behaviour was heavily influenced by motivation research, which had increased the understanding of customers, and had been used extensively by consultants in the advertising industry and also within the discipline of psychology in the 1920s, 1930s, and 1940s. By the 1950s, marketing began to adopt techniques used by motivation researchers including depth interviews, projective techniques, thematic apperception tests, and a range of qualitative and quantitative research methods.[4] More recently, scholars have added a new set of tools including ethnography, photo-elicitation techniques, and phenomenological interviewing.[5] In addition to these, contemporary research has delved further into the complexities of consumer behavior, incorporating innovative approaches such as neuroimaging studies and big data analytics. These modern tools provide deeper insights into subconscious consumer motivations and decision-making processes.[6]Today, consumer behaviour (or CB as it is affectionately known) is regarded as an important sub-discipline within marketing and is included as a unit of study in almost all undergraduate marketing programs.
Definition and explanation
Consumer behaviour entails "all activities associated with the purchase, use and disposal of goods and services, including the consumer's emotional, mental and behavioural responses that precede or follow these activities."[7] The term consumer can refer to individual consumers as well as organisational consumers, and more specifically, "an end user, and not necessarily a purchaser, in the distribution chain of a good or service."[8] Consumer behaviour is concerned with:[9]
purchase activities: the purchase of goods or services; how consumers acquire products and services, and all the activities leading up to a purchase decision, including information search, evaluating goods and services, and payment methods including the purchase experience
use or consumption activities: concerns the who, where, when, and how of consumption and the usage experience, including the symbolic associations and the way that goods are distributed within families or consumption units
disposal activities: concerns the way that consumers dispose of products and packaging; may also include reselling activities such as eBay and second-hand markets
Consumer responses may be:[10]
emotional (or affective) responses: refer to emotions such as feelings or moods,
mental (or cognitive) responses: refer to the consumer's thought processes, their
behavioural (or conative) responses: refer to the consumer's observable responses in relation to the purchase and disposal of goods or services.
According to the American Marketing Association, consumer behaviour can be defined as "the dynamic interaction of affect and cognition, behaviour, and environmental events by which human beings conduct the exchange aspects of their lives."
As a field of study, consumer behaviour is an applied social science. Consumer behaviour analysis is the "use of behaviour principles, usually gained experimentally, to interpret human economic consumption." As a discipline, consumer behaviour stands at the intersection of economic psychology and marketing science.[11]
The purchase decision and its context
Shoppers inspect the quality of fresh produce at a market in Jerusalem.
Understanding purchase and consumption behaviour is a key challenge for marketers. Consumer behaviour, in its broadest sense, is concerned with understanding both how purchase decisions are made and how products or services are consumed or experienced. Consumers are active decision-makers. They decide what to purchase, often based on their disposable income or budget. They may change their preferences related to their budget and a range of other factors.[12][13][14]
Some purchase decisions involve long, detailed processes that include extensive information search to select between competing alternatives.[15] Other purchase decisions, In consumer practice, consumers must make highly complex decisions, often based on a lack of time, knowledge or negotiating ability.[16] Such as impulse buys or habitual purchases, are made almost instantaneously with little or no investment of time or effort in information search.
Some purchase decisions are made by groups (such as families, households or businesses) while others are made by individuals. When a purchase decision is made by a small group, such as a household, different members of the group may become involved at different stages of the decision process and may perform different roles. For example, one person may suggest the purchase category, another may search for product-related information while yet another may physically go to the store, buy the product, and transport it home. It is customary to think about the types of decision roles; such as:
In a family unit, an adult female often makes brand choices on behalf of the entire household, while children can be important influencers.
The Initiator
the person who proposes a brand (or product) for consideration (something in return);
The Influencer
someone who recommends a given brand;
The Decider
the person who makes the ultimate purchase decision;
The Purchaser
the one who orders or physically buys it;
The User
the person who uses or consumes the product.[17]
For most purchase decisions, each of the decision roles must be performed, but not always by the same individual. For example, in the case of family making a decision about a dining-out venue, a parent may initiate the process by intimating that they are too tired to cook. The children are important influencers in the overall purchase decision, but both parents may act as joint deciders performing a gate-keeping role by vetoing unacceptable alternatives and encouraging more acceptable alternatives. The importance of children as influencers in a wide range of purchase contexts should never be underestimated and the phenomenon is known as pester power.[18]
The purchasing decision model
To approach the mental processes used in purchasing decisions, some authors employ the concept of the black box, which represents the cognitive and affective processes used by a consumer during a purchase decision. The decision model situates the black box in a broader environment which shows the interaction of external and internal stimuli (e.g. consumer characteristics, situational factors, marketing influences, and environmental factors) as well as consumer responses.[19] The black box model is related to the black box theory of behaviourism, where the focus extends beyond processes occurring inside the consumer and also includes the relation between the stimuli and the consumer's response.
The decision model assumes that purchase decisions do not occur in a vacuum. Rather, they occur in real time and are affected by other stimuli, including external environmental stimuli and the consumer's momentary situation. The elements of the model include interpersonal stimuli (between people) or intrapersonal stimuli (within people), environmental stimuli and marketing stimuli.[20] Marketing stimuli include actions planned and carried out by companies, whereas environmental stimuli include actions or events occurring in the wider operating environment and include social, economic, political, and cultural dimensions. In addition, the buyer's black box includes buyer characteristics and the decision process, which influence the buyer's responses.
Purchases of up-market perfumes, often bought as gifts, are high involvement decisions because the gift symbolises the relationship between the giver and the intended recipient.
Problem recognition
The first stage of the purchase decision process begins with problem recognition (also known as category need or need arousal). This is when the consumer identifies a need, typically defined as the difference between the consumer's current state and their desired or ideal state. A simpler way of thinking about problem recognition is that it is where the consumer decides that they are 'in the market' for a product or service to satisfy some need or want. The strength of the underlying need drives the entire decision process.[21]
Theorists identify three broad classes of problem-solving situation relevant for the purchase decision:[22]
Extensive problem-solving
Purchases that warrant greater deliberation, more extensive information search and evaluation of alternatives. These are typically expensive purchases, or purchases with high social visibility e.g. fashion, cars.
Limited problem-solving
Known or familiar purchases, regular purchases, straight re-buys. Typically low-priced items.
Routinised problem-solving
Repeat purchases or habitual purchases
Consumers become aware of a problem in a variety of ways including:[23]
The purchase of a mobile phone may trigger the desire for accessories such as this phone mount for use in a car.
Out-of-Stock/ Natural Depletion
When a consumer needs to replenish stocks of a consumable item e.g. ran out of milk or bread.
Regular purchase
When a consumer purchases a product on a regular basis e.g. newspaper, magazines.
Dissatisfaction
When a consumer is not satisfied with the current product or service.
New Needs or Wants
Lifestyle changes may trigger the identification of new needs e.g. the arrival of a baby may prompt the purchase of a cot, stroller, and car-seat for the baby.
Related products
The purchase of one product may trigger the need for accessories, spare parts, or complementary goods and services e.g. the purchase of a printer leads to the need for ink cartridges; the purchase of a digital camera leads to the need for memory cards.
Marketer-induced problem recognition
When marketing activity persuades consumers of a problem (usually a problem that the consumer did not realise they had). The consciously, and subconsciously, consumed content in traditional as well as social media greatly plays the role of a stimulus for the consumer's recognition of a new need.
New Products or Categories
When consumers become aware of new innovative products that offer a superior means of fulfilling a need. Disruptive technologies such as the advent of wireless-free communications devices can trigger a need for plethora of products such as a new mouse or printer.
Information search
Customer purchase decision, illustrating different communications touchpoints at each stage
During the information search and evaluation stages, the consumer works through processes designed to arrive at a number of brands (or products) that represent viable purchase alternatives. Typically consumers first carry out an internal search and scan their memory for suitable brands. The evoked set is the set of brands that a consumer can elicit from memory and is typically a very small set of some 3- 5 alternatives.[24] Consumers may choose to supplement the number of brands in the evoked set by carrying out an external search using sources such as the Internet, manufacturer/brand websites, shopping around, product reviews, referrals from peers and the like. The readiness of information availability has raised the informedness of the consumers: the degree to which they know what is available in the marketplace, with precisely which attributes, and at precisely what price.[25]
The fact that a consumer is aware of a brand does not necessarily mean that it is being considered as a potential purchase. For instance, the consumer may be aware of certain brands, but not favourably disposed towards them (known as the inept set). Such brands will typically be excluded from further evaluation as purchase options. For other brands, the consumer may have indifferent feelings (the inert set).[26] As the consumer approaches the actual purchase, they distill the mental list of brands into a set of alternatives that represent realistic purchase options, known as the consideration set.[27] By definition, the consideration set refers to the "small set of brands which a consumer pays close attention to when making a purchase decision".[28] This ultimately leads to a choice set which includes the alternatives that are strong contenders for purchase.[29]
Specific brand names enter the consumer's consideration set based on the extent to which they satisfy the consumer's purchasing objectives and/or the salience or accessibility of the brand at the time of making the purchase decision.[30] By implication, brand names that are more memorable are more likely to be accessible. Traditionally, one of the main roles of advertising and promotion was to increase the likelihood that a brand name was included in the consumer's evoked set.[31] Repeated exposure to brand names through intensive advertising was the primary method for increasing top-of-mind brand awareness. However, the advent of the Internet means that consumers can obtain brand/product information from a multiplicity of different platforms. In practice, the consideration set has assumed greater importance in the purchase decision process because consumers are no longer totally reliant on memory. This is marketing, which could be defined as "the process by which companies create value for customers and build strong customer relationships, in order to capture value from customers in return."[32] This definition strongly implies that the relationship is built upon an exchange and the "creation" of value. This means that a need is built for a consumer, with the product presented or advertised to them through an analytical study of the user's patterns of consumption and their behaviours and habits. The implication for marketers is that relevant brand information should be disseminated as widely as possible and included on any forum where consumers are likely to search for product or brand information, whether traditional media or digital media channels. Thus, marketers require a rich understanding of the typical consumer's touchpoints.
Evaluation of alternatives
Consumers shopping at London's Burlington Arcade engage in a variety of recreational and functional purchasing activities - from window shopping through to transporting their purchases homewards.
Consumer evaluation can be viewed as a distinct stage. Alternatively, evaluation may occur continuously throughout the entire decision process. Consumers evaluate alternatives in terms of the functional (also called utilitarian) and psycho-social (also called the value-expressive or the symbolic) benefits offered.[33]
Functional benefits are the tangible outcomes that can be experienced by the consumer such as taste or physical appearance.
Psycho-social benefits are the more abstract outcomes or the personality-related attributes of a brand, such as the social currency that might accrue from wearing an expensive suit or designer label or driving a 'hot' car.
Brand image (or brand personality) is an important psycho-social attribute. Consumers can have both positive and negative beliefs about a given brand.[34] A considerable body of research suggests that consumers are predisposed towards brands with a personality that matches their own and that a good match can affect brand preference, brand choice, satisfaction with a brand, brand commitment and loyalty, and the consumer's propensity to give positive word-of-mouth referrals.[citation needed] The branch of consumer behaviour that investigates the matching of a brand's personality and the consumer's personality is known as self-congruity research. [35] The social media presence of a brand plays a huge part in this stage, with the effect described as "Think of regular media as a one-way street where you can read a newspaper or listen to a report on television, but you have very limited ability to give your thoughts on the matter. Social media, on the other hand, is a two-way street that gives you the ability to communicate too."[36] Consumer beliefs about a brand or product category may vary depending on a range of factors including the consumer's prior experience and the effects of selective perception, distortion, and retention. Consumers who are less knowledgeble about a category tend to evaluate a brand based on its functional characteristics. However, when consumers become more knowledgeable, functional attributes diminish and consumers process more abstract information about the brand, notably the self-related aspects.[37]
The marketing organisation needs a deep understanding of the benefits most valued by consumers and therefore which attributes are most important in terms of the consumer's purchase decision. It also needs to monitor other brands in the customer's consideration set to optimise planning for its own brand. During the evaluation of alternatives, the consumer ranks or assesses the relative merits of different options available. No universal evaluation process is used by consumers across all-buying situations.[38] Instead, consumers generate different evaluation criteria depending on each unique buying situation. Social media further enables consumers to share views with their peers about the product they are looking to purchase.[39] This way, consumers can gauge the positive and negative sides of each alternative, and decide even more conveniently as for the best product to buy. Thus the relevant evaluation attributes vary according to across different types of consumers and purchase contexts. For example, attributes important for evaluating a restaurant would include food quality, price, location, atmosphere, quality of service, and menu selection. Consumers, depending on their geographic, demographic, psychographic and behavioural characteristics, will decide which attributes are important to them. Potential patrons seeking a pleasant dining experience may be willing to travel further distances to patronise a fine-dining venue compared to those wanting a quick meal at a more utilitarian eatery. After evaluating the different product attributes, the consumer ranks each attribute or benefit from highly important to least important. These priorities are directly related to the consumer's needs and wants.[40] Thus, the consumer arrives at a weighted score for each product or brand which represents the consumer's subjective assessment of individual attribute scores weighted in terms of their importance. Using these scores, they arrive at a total mental score or rank for each product/brand under consideration.[41]
Purchase decision
Once the alternatives have been evaluated, the consumer firms up their resolve to proceed through to the actual purchase. For example, the consumer might say to themself, "Yes, I will buy Brand X one day." This self instruction to make a purchase is known as purchase intent. Purchase intentions are a strong yet imperfect predictor of sales. Sometimes purchase intentions simply do not translate into an actual purchase and this can signal a marketing problem.[42] For instance, a consumer may wish to buy a new product, but may be unaware of the retail outlets that stock it, so that purchase cannot proceed. The extent to which purchase intentions result in actual sales is known as the sales conversion rate.[43]
Happy hour, where two drinks can be purchased for the price of one, is a strong call-to-action because it encourages consumers to buy now rather than defer purchasing to a later time.
Organisations use a variety of techniques to improve conversion rates. The provision of easy credit or payment terms may encourage purchase. Sales promotions such as the opportunity to receive a premium or enter a competition may provide an incentive to buy now rather than defer purchases for a later date. Advertising messages with a strong call-to-action are yet another device used to convert customers.[44] A call-to-action is any device designed to encourage immediate sale.[45] Typically, a call-to-action includes specific wording in an advertisement or selling pitch that employs imperative verbs such as "Buy now!" or "Don't wait!". Other types of calls-to-action might provide consumers with strong reasons for purchasing immediately such an offer that is only available for a limited time (e.g. 'Offer must expire soon'; 'Limited stocks available') or a special deal usually accompanied by a time constraint (e.g. 'Order before midnight to receive a free gift with your order'; 'Two for the price of one for the first 50 callers only'). Additionally, service convenience is a saving of effort, in the way that it minimises the activities that customers may bear to buy goods and services.[46] The key to a powerful call-to-action is to provide consumers with compelling reasons to purchase promptly rather than defer purchase decisions.
As consumers approach the actual purchase decision, they are more likely to rely on personal sources of information.[47] For this reason, personal sales representatives must be well versed in giving sales pitches and in tactics used to close the sale. Methods used might include 'social evidence', where the salesperson refers to previous success and satisfaction from other customers buying the product. 'Scarcity attraction' is another technique, where the salesperson mentions that the offer is limited, as it forces the consumer to make a quicker decision and therefore spend less time evaluating alternatives.[48]
Post-purchase evaluation
Following purchase and after experiencing the product or service, the consumer enters the final stage, namely post-purchase evaluation. Foxall suggested that post-purchase evaluation can provide key feedback to marketers because it influences future purchase patterns and consumption activities.[49][50]
The post purchase stage is where the consumer examines and compares product features, such as price, functionality, and quality with their expectations.[51] Post purchase evaluation can be viewed as the steps taken by consumers to correlate their expectations with perceived value and thus influence their next purchase decision for that good or service.[52] For example, if a consumer buys a new phone and their post-purchase evaluation is positive, they will be encouraged to purchase the same brand or from the same company in the future. This is also known as "post-purchase intention".[53] On the contrary, if a consumer is dissatisfied with the new phone, they may take actions to resolve the dissatisfaction. Consumer actions, in this instance, could involve requesting a refund, making a complaint, deciding not to purchase the same brand or from the same company in the future, or even spreading negative product reviews to friends or acquaintances, possibly via social media.
After acquisition, consumption, or disposition, consumers may feel some uncertainty in regards to the decision made, generating in some cases regret. Post-decision dissonance[54] (also known as cognitive dissonance) is the feeling of anxiety that occurs in the post purchase stage, as well as the uneasy feelings or concerns as to whether or not the correct decision was made at purchase.[55] Some consumers, for instance, may regret that they did not purchase one of the other brands they were considering. This type of anxiety can affect consumers' subsequent behaviour and may have implications for repeat patronage and customer loyalty.
Consumers use a number of strategies to reduce post purchase dissonance. A typical strategy is to look to peers or significant others for validation of the purchase choice. Customers have always been led by the opinions of friends and family, but nowadays this is corroborated by social media likes, reviews, and testimonials. Marketing communications can also be used to remind consumers that they made a wise choice by purchasing Brand X.[56]
When consumers make unfavorable comparisons between the chosen option and the options forgone, they may feel post-decision regret or buyer's remorse. Consumers can also feel short-term regret when they avoid making a purchase decision, however this regret can dissipate over time. Through their experiences consumers can learn and also engage in a process called hypothesis testing. This refers to the formation of hypotheses about the products or a service through prior experience or word of mouth communications. There are four stages that consumers go through in the hypothesis testing: Hypothesis generation, exposure of evidence, encoding of evidence, and integration of evidence.
"""),
SHARED_ASSET = {
}
HTML_BUTTON = {
"url": "https://curricume-uploads.s3.amazonaws.com/cdc_ebola_poster.pdf",
"button_text":"Read PDF"
}
SYSTEM_PROMPT = """System Prompt: You provide learning objectives that are specific, measurable, easy to understand, and suitable for an online course."""
PHASES = {
"about": {
"name": "Generate Learning Objectives",
"fields": {
"request_type": {
"type": "radio",
"label": "What would you like to do?",
"options": ["Provide learning objectives based on the content","Suggest learning objectives based on the title","Validate alignment between learning content and objectives"],
},
"title": {
"type": "text_input",
"label": """Enter the title for your course or module (optional)""",
"value": "Introduction to Consumer Behavior",
},
"learning_content": {
"type": "text_area",
"height": 200,
"label": "Enter your learning content",
"value": LONG_TEXT,
"showIf": {"request_type": ["Provide learning objectives based on the content", "Validate alignment between learning content and objectives"]}
},
"learning_objectives": {
"type": "text_area",
"label": "Enter your learning objectives:",
"showIf": {"request_type": ["Validate alignment between learning content and objectives"]},
"max_chars": 1000,
},
"lo_quantity": {
"type": "slider",
"label": "How many Learning Objectives would you like to generate?",
"value": 4,
"min_value": 1,
"max_value": 8,
"showIf": {"request_type": ["Provide learning objectives based on the content", "Suggest learning objectives based on the title"]}
},
"preferences": {
"type": "markdown",
"body": """<h3>Preferences (Beta Feature):</h3>""",
"unsafe_allow_html": True,
"showIf": {"request_type": ["Provide learning objectives based on the content", "Suggest learning objectives based on the title"]}
},
"learning_preferences": {
"type": "checkbox",
"label": "Engage a variety of learning preferences (e.g. Visual, Auditory, Kinesthetic)",
"showIf": {"request_type": ["Provide learning objectives based on the content", "Suggest learning objectives based on the title"]}
},
"relevance": {
"type": "checkbox",
"label": "Prioritize objectives that have real-world relevance",
"showIf": {"request_type": ["Provide learning objectives based on the content", "Suggest learning objectives based on the title"]}
},
"dash": {
"type": "markdown",
"body": """</hr>""",
"unsafe_allow_html": True,
},
"preferences_2": {
"type": "markdown",
"body": """<h3>Bloom's Taxonomy</h3><p>Focus on these specific cognition goals:</p>""",
"unsafe_allow_html": True,
"showIf": {"request_type": ["Provide learning objectives based on the content", "Suggest learning objectives based on the title"]}
},
"goal_remember": {
"type": "checkbox",
"label": "Remember",
"showIf": {"request_type": ["Provide learning objectives based on the content", "Suggest learning objectives based on the title"]}
},
"goal_apply": {
"type": "checkbox",
"label": "Apply",
"showIf": {"request_type": ["Provide learning objectives based on the content", "Suggest learning objectives based on the title"]}
},
"goal_evaluate": {
"type": "checkbox",
"label": "Evaluate",
"showIf": {"request_type": ["Provide learning objectives based on the content", "Suggest learning objectives based on the title"]}
},
"goal_understand": {
"type": "checkbox",
"label": "Understand",
"showIf": {"request_type": ["Provide learning objectives based on the content", "Suggest learning objectives based on the title"]}
},
"goal_analyze": {
"type": "checkbox",
"label": "Analyze",
"showIf": {"request_type": ["Provide learning objectives based on the content", "Suggest learning objectives based on the title"]}
},
"goal_create": {
"type": "checkbox",
"label": "Create",
"showIf": {"request_type": ["Provide learning objectives based on the content", "Suggest learning objectives based on the title"]}
},
},
"phase_instructions": "The user will summarize the shared case study. Please critically review their response for accuracy. You will give them credit for mentioning Ebola, and you will be very pleased if they mention it is about Ebola with any other relevant details.",
"user_prompt": [
{
"condition": {"request_type": "Validate alignment between learning content and objectives"},
"prompt": """Please validate the alignment between the provided learning content and the learning objectives provided.\n
Be extremely strict and make sure that A) specific content exists that can be assessed to meet the learning objective and B) the learning objective is reasonable for an online course.)"""
},
{
"condition": {"request_type": "Suggest learning objectives based on the title"},
"prompt": "Please suggest {lo_quantity} learning objectives for the provided course. \n"
},
{
"condition": {"request_type": "Provide learning objectives based on the content"},
"prompt": "Please write {lo_quantity} learning objectives based on the provided content.\n"
},
{
"condition": {"learning_objectives": True},
"prompt": "Here are my learning objectives: {learning_objectives}"
},
{
"condition": {},
"prompt": "Provide learning objectives that are specific, measurable, easy to understand, and suitable for an online course.\nStart each learning objective with a verb from Bloom's taxonomy. **Avoid** verbs like \"understand\", \"learn\", or \"know\".",
},
{
"condition": {},
"prompt": """If I provide them, please focus on the following Bloom's Taxonomy verbs:
[Verbs List:
"""
},
{
"condition": {"goal_remember": True},
"prompt": "Remember"
},
{
"condition": {"goal_apply": True},
"prompt": "Apply"
},
{
"condition": {"goal_evaluate": True},
"prompt": "Evaluate"
},
{
"condition": {"goal_understand": True},
"prompt": "Understand"
},
{
"condition": {"goal_analyze": True},
"prompt": "Analyze"
},
{
"condition": {"goal_create": True},
"prompt": "Create"
},
{
"condition": {},
"prompt": "]"
},
{
"condition": {"learning_preferences": True},
"prompt": "Try to engage a variety of learning modalities (e.g. Visual, Auditory, Kinesthetic) \n"
},
{
"condition": {"relevance": True},
"prompt": "Try to provide learning objectives that are relevant in the real world.\n"
},
{
"condition": {"request_type": "Provide learning objectives based on the content"},
"prompt": """Here is the content:
{learning_content}
"""
},
{
"condition": {"request_type": "Suggest learning objectives based on the title"},
"prompt": """Here is the title of my course:
{title}
"""
},
],
"ai_response": True,
"allow_revisions": True,
"show_prompt": True,
"read_only_prompt": False
}
}
# def prompt_conditionals(prompt, user_input, phase_name=None):
# #TO-DO: This is a hacky way to make prompts conditional that requires the user to know a lot of python and get the phase and field names exactly right. Future task to improve it.
# if user_input["request_type"] == "Validate alignment between learning content and objectives":
# prompt = (
# "Please validate the alignment between the provided learning content and the learning objectives provided.\n"
# + "Be extremely strict and make sure that A) specific content exists that can be assessed to meet the learning objective and B) the learning objective is reasonable for an online course.")
# if user_input["learning_objectives"]:
# prompt += (
# "Here are my learning objectives: \n"
# + user_input["learning_objectives"] + "\n"
# )
# if user_input["learning_content"]:
# prompt += (
# "Here is the content: \n"
# + "===============\n"
# + user_input["learning_content"] + "\n"
# )
# else:
# if user_input["request_type"] == "Suggest learning objectives based on the title":
# prompt = "Please suggest " + str(user_input["lo_quantity"]) + " learning objectives for the provided course. \n"
# if any([user_input["goal_remember"], user_input["goal_apply"], user_input["goal_evaluate"], user_input["goal_understand"], user_input["goal_analyze"], user_input["goal_create"]]):
# prompt += "Focus specifically on these cognitive goals: " + user_input["goal_remember"] + "\n"
# if user_input["goal_remember"]:
# prompt+= "Remember \n"
# if user_input["goal_apply"]:
# prompt+= "Apply \n"
# if user_input["goal_evaluate"]:
# prompt+= "Evaluate \n"
# if user_input["goal_understand"]:
# prompt+= "Understand \n"
# if user_input["goal_analyze"]:
# prompt+= "Analyze \n"
# if user_input["goal_create"]:
# prompt+= "Create \n"
# prompt += ". \n"
# else:
# prompt = "Please write " + str(user_input["lo_quantity"]) + " learning objectives based on the provided content. \n"
# if any([user_input["goal_remember"], user_input["goal_apply"], user_input["goal_evaluate"], user_input["goal_understand"], user_input["goal_analyze"], user_input["goal_create"]]):
# prompt += "Focus specifically on these cognitive goals: \n"
# if user_input["goal_remember"]:
# prompt+= "Remember \n"
# if user_input["goal_apply"]:
# prompt+= "Apply \n"
# if user_input["goal_evaluate"]:
# prompt+= "Evaluate \n"
# if user_input["goal_understand"]:
# prompt+= "Understand \n"
# if user_input["goal_analyze"]:
# prompt+= "Analyze \n"
# if user_input["goal_create"]:
# prompt+= "Create \n"
# prompt += ". \n"
# prompt += "Provide learning objectives that are specific, measurable, easy to understand, and suitable for an online course. \n"
# prompt += "Start each learning objective with a verb from Bloom's taxonomy. **Avoid** verbs like \"understand\", \"learn\", or \"know\".\n"
# if user_input["learning_preferences"]:
# prompt += "Try to engage a variety of learning modalities (e.g. Visual, Auditory, Kinesthetic) \n"
# if user_input["relevance"]:
# prompt += "Try to provide learning objectives that are relevant in the real world. \n"
# if user_input["title"]:
# prompt += "Here is the title of the course: " + user_input["title"] + "\n"
# if user_input["learning_content"]:
# prompt += (
# "Here is the content: \n"
# + "===============\n"
# + user_input["learning_content"]
# )
# return prompt
PREFERRED_LLM = "gpt-4o-mini"
LLM_CONFIG_OVERRIDE = {}
SCORING_DEBUG_MODE = True
DISPLAY_COST = True
COMPLETION_MESSAGE = "You've reached the end! I hope you learned something!"
COMPLETION_CELEBRATION = False
RAG_IMPLEMENTATION = False # make true only when document exists
SOURCE_DOCUMENT = "sample.pdf" # file uploaded in source_docs if only
PAGE_CONFIG = {
"page_title": "LO Generator",
"page_icon": "️🔹",
"layout": "centered",
"initial_sidebar_state": "expanded"
}
SIDEBAR_HIDDEN = True
from core_logic.main import main
if __name__ == "__main__":
main(config=globals())