cj-dev-code/semantic_search
0
1from datasets import Dataset2from ragas.metrics import context_precision, context_recall3 4from ragas import evaluate5from ragas.metrics import (6 faithfulness,7 answer_relevancy,8 context_recall,9 answer_correctness10)11 12from dotenv import load_dotenv13import os14load_dotenv()15key = os.getenv('OPENAI_API_KEY')16 17data = [18 {19 "question": "What was that thing about procrastination hiding in excuses and emotions?",20 "contexts": [21 '''Learn to believe you can change things. There are many reasons why people avoid change--fears, lack of 22motivation, resentment of pressure, helpless feelings, procrastination, 23wanting to fail and/or avoid responsibility, wanting to live spontaneously 24without planned change, wanting sympathy and to be taken care of, 25feeling that it's too much trouble to change, pride and stubbornness, being 26willing to accept our own rationalizations ("it runs in my family"), being 27inflexible and "set in our ways," feeling that we are not okay and deserve 28to be miserable, and other motives. 3829It may be hard to understand your reasons for avoiding change if you 30are a procrastinator, but remember, there are reasons for everything (the 31procrastinator should read chapter 4). Look for your reasons (it's likely to 32be several reasons).''',33 '''Some are afraid to change. ''',34 '''First, there may be a variety of barriers to change that need to be 35removed. For instance, many different kinds of fears stop us cold. Dennis O’Grady (1994) in How to Overcome the Fears of Changing 36mentions several: fears of the unknown (if you change) and of facing a 37new situation, fears of failure and of looking foolish, fears of 38commitment and of not wanting the changes you get, fears of 39disapproval and of criticism of what you become, and fears of success, 40increased responsibilities, and people thinking you are selfish or stuck-41up. The book underscores that fears, such as self-doubts and self-42criticism, like “I’ll fail,” kill the will to change. ''',43 '''Sometime changes, even self-improvements and career 44advancements, can be more scary than satisfying. A person may feel 45fairly content day to day but over a period of time become concerned 46that he/she is in a rut, unable to make his/her life better. There are 47two kinds of barriers to change: (a) it is comfortable to just be 48yourself and (b) fears can be a barrier to succeeding. This comfort 49with yourself can be a problem, e.g.''',50'''Basically, it is fears, but each 51procrastinator develops and responds to his/her own specific fears. In 52varying degrees we are all afraid of facing reality--life's challenges, the 53hard work and frustrations ahead of us.'''54 ],55 "ground_truth": '''There are many reasons why people avoid change--fears, lack of56motivation, resentment of pressure, helpless feelings, procrastination,57wanting to fail and/or avoid responsibility, wanting to live spontaneously58without planned change, wanting sympathy and to be taken care of,59feeling that it's too much trouble to change, pride and stubbornness, being60willing to accept our own rationalizations ("it runs in my family"), being61inflexible and "set in our ways," feeling that we are not okay and deserve62to be miserable, and other motives.63''',64 65 },66 67 {"question":'''Self help has limits. Self help can work for many situations. Some situations call for a professional. Don’t put a bandaid like self help on a bullet wound that demands a hospital. See a professional, medication, or a support group for especially intense mental situations.''',68 'contexts':['''When your problems are severe and/or your self-help efforts are 6938 ineffective, seek professional help immediately.''',70 '''Regardless of the 71 problem, if self-help doesn't work, get help! (2) As discussed above, a 72 therapist may be needed before some people can change or correctly use a 73 method. (3) Many self-help authors may promise much more than they can 74 deliver. ''',75 '''Getting professional help is 76crucial. However, sometimes even the professionals drop the ball.77''',78'''Even if the depression is mild to 79moderate, get help if your self-help efforts don't work within a month 80or two. There are medications that relieve many people's depression; 81don't be foolish and reject drugs if psychological approaches don't 82work.''',83'''Second, your answers already indicate difficult 84personal/emotional problems. It will probably take time and new 85attitudes or skills to solve these problems. So, think seriously about 86finding professional help ( http://mentalhelp.net/psyhelp/chap2/a) . Considering the possible severity of the problem, there are no good 87reasons to avoid such help.''',88 ],89 'ground_truth':'''While knowledge of self- help may prevent or relieve many problems,90there are certain situations in every life where outside help is necessary.91Self- help is like first-aid; so, if you need surgery, don't use band-aids, see92a surgeon right away! What are some of the psychological situations that93call for professional help? When one is so depressed that there are94thoughts of suicide, when one's thoughts are confused or unreasonable,95when a person experiences urges to hurt someone, when feelings towards96other people are very strong (so that one is not likely to be thinking97straight), and when someone has tried and tried to help him/herself but98nothing seems to work. Usually when your psychological problems are99quite serious, you will need therapy, medication, a support group, and self-100help. Get what you need.101'''102 },103 104 {105 'question':'''knowledge withoout goodness is dangerous. it's important to develop morals as well as intelligence to live in a well roudned way.''',106 107 'context':['''Moral philosophy is hard thought about right action. -Socrates 108 109 Goodness without knowledge is weak; knowledge without goodness is 110 dangerous. We have to build a better man before we can build a better society.''',111 ''' All that is necessary for the triumph of evil is that good people do 112 nothing. Our purpose is not to make a living but a life--a worthy, well-rounded, 113 useful life.''',114 '''The learning continues throughout old age. Thus, learning the skills we 115 need isn't just spending an hour skimming a long, marginally 116 interesting chapter; it is a life-time of learning the basics and 117 sharpening useful skills. Knowledge and skills are the mark of an effective, sophisticated, 118 educated, capable, responsible person. The more skills you have, the 119 better (so long as you are moral). ''',120 '''There is endless knowledge each person needs to know: (a) the 121 steps in helping, (b) how to handle many kinds of crises, (c) 122 how to gain the self-control necessary to carry out our own 123 lofty ideals, (d) exactly where and how to offer help, etc. Knowledge gives us more ability to do good.''',124 '''We don't yet have the knowledge needed to 125 assess what is fair nor the self-control skills to do what is just'''126 ],127 'ground_truth':'''Goodness without knowledge is weak; knowledge without goodness is128 dangerous.129 We have to build a better man before we can build a better society.130 All that is necessary for the triumph of evil is that good people do131 nothing.132 Our purpose is not to make a living but a life--a worthy, well-rounded,133 useful life.134 Morality is not a subject; it is a life put to the test in dozens of135 moments.136 -Paul Tillich137 '''138 },139 140 {'question':'''desensitization involves relaxing, imagining scary situations, and then by staying relaxed, desensitizes you to the scary thing. it's important to be safe in this situation. it's helpful for overcoming unreasonable fears. ''',141 'context': ['''But your anxiety should be reduced 142by desensitization sufficiently that you can now handle the real 143situations that previously frightened you away. Expose yourself to the 144scary real situations over and over while relaxing as much as possible. Soon you will have conquered your unreasonable fears. 145''', '''New York: 146Doubleday. Desensitization 147What is fear? In a simple sense, it is a connection between certain 148neutral stimuli and an inappropriate emotional reaction (identified as 149fear), such as a fear of heights or leaving home or public speaking etc. Desensitization is a treatment procedure designed to break that 150connection and replace the fear response to the situation with a 151stronger relaxed response. It is also called counter-conditioning. ''', 152'''Essentially, this is the opposite of desensitization which reduces your 153fear of a situation, i.e.''', 154'''Very gradually. You start with mildly scary 155situations where a strong relaxed response might over-ride the weak 156anxiety response. You imagine being in that slightly disturbing scene 157while remaining very relaxed. You do this over and over, breaking the 158connection with fear. Next, you do the same thing with a slightly more 159scary situation. You continue this process until you can imagine 160climbing a tower, leaving home, or speaking to a crowd without 161experiencing strong fear. Then you are ready to handle reality (not 162without some anxiety but without overwhelming fear). Purposes 163· 164To relieve excessive, unreasonable or unneeded fears and 165traumatic memories, such as a fear of heights, violence, war,166 1671187168flying, the dark, bugs, public speaking, taking tests, meeting 169people, asserting one's self, being away from home and many 170other situations. · 171To break the connection between any given situation and an 172unwanted emotional response, e.g. ''', 173'''Relax before the 174confrontation and during it as much as possible. The objective is to 175extinguish the unreasonable fear response by replacing it with a more 176relaxed response. To do this, you need a hierarchy of real situations 177involving increasing stresses. The rationale for in vivo is the same as 178systematic desensitization (method #4). Purposes 179· 180To reduce the unwanted fears and stresses associated with 181many situations where the fear is excessive or unreasonable.''' 182],183 184 'ground_truth':'''that a strong relaxation response can gradually overpower and inhibit185a fear response to a particular stimulus. The desensitization method186involves first relaxing, then imagining mildly scary situations, and187works up to relaxing in the most scary (but not actually dangerous)188situations. This is a painless method of reducing anxiety or fear189reactions because you must stay deeply relaxed throughout the entire190process. It avoids all stressful actual confrontations with the scary191situation, being done entirely in one's imagination. So it is easy to192carry out and always available--it just takes fantasy (see in vivo and193Exposure for versions that require confronting the real situation). The194method was developed by a psychiatrist, Joseph Wolpe (1958), and195based on classical conditioning, using the same principles as Watson196 197and Jones in the 1920's198'''},199 200{'question':'''many therapists recommend imagining successful conversation with different people before talking to overcome shyness. some recommend practicing in a safe space. then, go out to the world and practie irl! prepare things in advance and be informed, too. 201''',202'context':['''A 203shy person should greet people, get involved, express 204opinions, and generally be assertive''',205'''Practice out loud and record your comments. Then listen to 206yourself and note your skills, don't tell yourself how awful it sounds, 207look for the good specific points--nice voice, loud enough, good 208grammar, cheerful, etc. Later, you can look for specific ways to 209improve your responses. (3) Use desensitization to reduce the fears 210associated with role-playing (see method #6 in chapter 12). (4) Some 211people find it easier if they pretend to be someone else--a successful 212person, a movie star, a smooth-operating friend or a psychologist who 213is helping shy people. (5) Occasionally, it is helpful to begin by goofing 214around and exaggerating your weaknesses, e.g. act out all the terribly 215embarrassing dumb mistakes you could possibly make. This can 216"break the ice." 217 2181235219STEP TWO: Have in mind some desired way of interacting--220probably a more effective or smoother approach--with a 221specific person in a specific situation. Ordinarily, you know what outcome you want to achieve, e.g. (source: fullbook)222''',223''' See 224what works best for you. Have some idea of where the conversation might go. Don't start a 225conversation and then have nothing to say. Become practiced at "small 226talk," it gives people time to check each other out and to figure out 227what future activities can be proposed together, if any. Also, practice 228making people smile and feel good.''',229'''Learn 230from your mistakes, don't get down on yourself. If you have practiced interacting in a certain situation and feel your 231skills are adequate, but you still won't use these skills in real life, you 232need to deal with the fear. Try desensitization or try covert rehearsal 233(practice in your fantasy) and imagine being successful. Either should 234reduce the anxiety. ''',235'''Likewise, most of us have had the 236experience of becoming temporarily more outgoing and self-confident 237during or after certain experiences, such as a love relationship, being 238an athletic star, or doing very well in school. What we think and feel 239about ourselves, our self-esteem, influences our shyness and may 240come from observing our own behavior. In any case, adopting a 241hopeful, I-can-change-my-social-behavior way of thinking is 242important, then DO SOMETHING, like smiling and greeting people, 243making small talk, give a compliment, etc. (Glass & Shea, 1986). 426244What are some other things you can do about shyness? Learn 245social interaction skills, especially self-disclosure, assertiveness, and 246empathy responses. Gerald Phillips (1981) advocates teaching shy 247students practical speech communication skills, like in speech class, 248and forget about "therapy" for anxiety. Many other psychologists 249would do the opposite, namely, focus on relaxation and desensitizing 250the nervousness, and forget speech skills. Others would use cognitive 251methods (correcting negative thoughts, giving self-instructions, 252planning) and improve their self-concept by building self-confidence 253and self-esteem (all in chapter 14). Stop thinking how stupid you 254sound; stop wanting to be humorous, brilliant, and perfect. Stop 255focusing on how nervous you feel and focus on the other person, 256making them comfortable, helping them tell their story and share their 257feelings with you. Almost all therapists would recommend lots of practice interacting 258by first imagining successful conversations with different people.'''],259'ground_truth':'''Almost all therapists would recommend lots of practice interacting260by first imagining successful conversations with different people.261Maybe you can role play with a friend. Then try out your new skills,262talking to people at work, on the Internet, going out with friends, etc.263Prepare things to say and ask in advance. Learn and think about264current social/political issues, listen to the news, see movies, polish265your opinions. Improve your listening skills. There are several good self-help books for shyness266'''267},268 269{'question':'''fight and flight is a common response in men. women often use tend and befriend too. these are stress responses. we are learning and getting more data about them though. gendered data helped us expand our understanding of stress responses.''',270'context':['''Both of these responses would not only divert 271attention from the threat but also usually place her in a safer situation. Thus, in men, on whom most of the research has been done, 272stress has been described for decades by authorities and science as 273definitely leading to "fight or flight" responses (a tendency which is, 274one would suppose, augmented by testosterone). Observations also 275suggest that men prefer to handle stress by themselves. In women, 276we are lucky to have a new theory about stress possibly leading to 277"tend and befriend" responses, both because those are the roles 278prescribed by our culture for women and because women's bodies may 279have learned or grown to respond to stresses with different juices than 280men. Debates about these gender differences will hopefully lead to 281gathering more data and better understanding. At least, we are now 282free to consider optional additional reactions to stress beyond just 283fight and flight. Surely it would be wise to develop a repertoire of responses to 284stress, depending on the circumstances. Choices would certainly 285include attacking the threat in assorted ways, fleeing in a variety of 286ways, diverting attention via TV, reading, journaling, distracting one's 287attention by socializing, engaging in tending chores, such as child care, 288hobbies, To-Do-Lists, doing extra work or getting a second job, 289throwing one's self into solving the problems causing the stress, and 290so on. Yet, it is good to keep in mind that the neglected "tending 291instinct" is a major natural part of our human nature (Taylor, 2002)''',292'''men and 293 294334295women respond about equally to a storm, like a hurricane, but women 296respond more intensely than men to a nasty family fight (Adler, 1993). We are learning new things about our reaction to stress all the time; 297there is a lot more to discover.''',298'''It would certainly be a mistake to assume that biology is always in 299control--that little squirts of hormones will dictate what you do under 300stress. Regardless of oxytocin, some women respond to stress 301sometimes with aggression and with flight, and regardless of 302testosterone, men can respond with tending and befriending responses 303to stress. An angry response is sometimes appropriate and needed.''',304'''Recently, some interesting physiological findings about gender 305differences (both in animals and humans) in response to stress have 306been reported (Taylor, Klein, Gruenwald, Gurung & Updrgraff, 2001). It seems that under stress females produce, along with many other 307stress-related reactions, a lot more of a hormone called oxytocin than 308men who, of course, produce more testosterone. The significance of 309 310433311this is that oxytocin has also been associated with relaxation and social 312interaction. Many studies of anxiety and many clinical observations 313report that women often respond to stress by "tending" to others, such 314as children or family, and by "befriending," such as getting together 315and talking with friends.''',316'''these 317responses seem to help us calm down''',318],319'ground_truth':"""Thus, in men, on whom most of the research has been done,320stress has been described for decades by authorities and science as321definitely leading to "fight or flight" responses (a tendency which is,322one would suppose, augmented by testosterone). Observations also323suggest that men prefer to handle stress by themselves. In women,324we are lucky to have a new theory about stress possibly leading to325"tend and befriend" responses, both because those are the roles326prescribed by our culture for women and because women's bodies may327have learned or grown to respond to stresses with different juices than328men. Debates about these gender differences will hopefully lead to329gathering more data and better understanding. At least, we are now330free to consider optional additional reactions to stress beyond just331fight and flight.332"""},333 334{'question':'''Five categories of self help apply: behavior, so adding joy, emotions, so emotional processing, skills, so getting better to reduce helplessness and burnout, cognition, so attitude changes, and unconscious things, so introspective and belief restructuring. 335''',336'context':['''After gaining some understanding of depression, self-help 337approaches will be discussed by levels: 3381. Behavior--increase pleasant activities, more rest and exercise, 339thought stopping and reduction of worries, atoning for wrong-340doing, and others, 3412. Emotions--desensitization of sadness to specific situations and 342memories, venting anger and sadness, elation or relaxation 343training, etc., 3443. Skills--social skills training, decision- making, and self-control 345training to reduce helplessness, 3464. Cognition--more optimistic perceptions and attributions, 347challenging depressing irrational ideas, a more positive self-348concept, more acceptance and tolerance, decide on values and 349meaning, and 3505. Unconscious factors--learn to recognize repressed feelings and 351urges, understand sources of guilt, and read about depression. At the end of the chapter, you should be able to select the 352techniques that seem most likely to reduce your sadness. ''',353'''Improve your ability to cope. The feeling of helplessness can 354only be countered by improving your ability to cope and your 355awareness of that ability. By willfully changing your environment and 356your own behavior, you start to see yourself as a self-helper, not as 357helpless. Expect only gradual changes.''',358'''Mental processes 359--attitudes 360--values 361--motivation 362--self-concept 363(Which views and values 364harm--and which help?) 365Questioning irrational ideas, correcting 366expectations, determinism, building self-367esteem, paradoxical intention, increasing 368motivation, values clarifications, gaining hope, 369developing a philosophy of life, learning to think 370straight, helpful attitudes, self-hypnosis. 5.''',371'''The reinforcement 372of other unwanted behaviors may be easier to eliminate. Completing Your Self-Help Plan 373 374What other self-help methods can be used within other 375non-behavioral parts of the problem? The 20 methods above are all directed towards changing our 376behavior, not our emotions or skills or attitudes or unconscious 377motives.''',378'''and you need 379to know about all of it. 32380Remember originally I said the five parts were to help you 381understand your problem. Now, it sounds like I'm saying the five parts 382help you fix the problem. That's right. This five-part analysis helps 383both ways. It is especially helps you find usable self-help methods. Here is how. Most self-help methods (and therapy methods) have an 384influence primarily on only one of the five parts of a problem, not all 385five. Thus, there is a highly useful relationship between diagnosis (a 386description of a part of the problem) and treatment methods to use. Table 2.3 will help you see this relationship and find the chapters 387telling you in detail how to change each part. At this point, you should 388be beginning to get the basic idea of how you could develop a 389comprehensive and fairly sophisticated treatment plan. Table 2.3: Analysis of Problem into Parts and Possible Solutions 390Parts of any problem 391Psychological self-help methods 3921. Behavior (simple 393thoughts) (What behavior or 394habitual thoughts do I want 395to change?) 396Self-reinforcement, self-punishment change of 397environment, break the chain early, extinction, 398thought control, covert sensitization, self-399instructions. 2. Emotions 400--fears and anxiety 401--sadness & self-criticism 402--anger & prejudice 403--dependency & passivity 404(What unwanted feelings 405are involved?) 406Relaxation, self-desensitization, venting 407feelings, exposure to harmless fears, stress 408inoculation, meditation, constructive use of 409emotional energy. 3. Skills (Lacking) 410(What skills do I need?) 411Problem-solving training, social skills via 412practice in groups and role playing, 413assertiveness training, constructively handling 414anger, decision making, study skills, leadership 415skills, organization and scheduling skills. 4.'''],416'ground_truth':"""Behavior--increase pleasant activities, more rest and exercise,417thought stopping and reduction of worries, atoning for wrong-418doing, and others,4192. Emotions--desensitization of sadness to specific situations and420memories, venting anger and sadness, elation or relaxation421training, etc.,4223. Skills--social skills training, decision- making, and self-control423training to reduce helplessness,4244. Cognition--more optimistic perceptions and attributions,425challenging depressing irrational ideas, a more positive self-426concept, more acceptance and tolerance, decide on values and427meaning, and4285. Unconscious factors--learn to recognize repressed feelings and429urges, understand sources of guilt, and read about depression.430"""},431 432{'question':'''a first task in overcoming loneliness means questioning self defeating thoughts. getting to the truth allows you figure out if your belief is really true. is there evidence to support your beliefs? what would it really feel like if you experience something you think would be unpleasant? what actually does matter most? figure it out for yourself!433''',434'context':['''If 435you frequently don't know that to say, be sure to learn to empathize. According to Richard Bootzin at Northwestern University, the 436people who handle being alone best have been encouraged by their 437parents to be independent, active, and self-sufficient. If being alone is 438difficult for you, desensitization should help and you will need practice 439enjoying being alone. Find some interesting and worthwhile activity, 440like get a part-time job interacting with people, read parts of this 441book, etc. It has been reported that once people learn to enjoy 442themselves alone, they can reach out to others more easily; they 443certainly look less needy. Marital enrichment and therapy groups can help troubled 444relationships. Readings, social skills training groups, and self-help 445groups for the lonely, the separated, and the bereaved are important. Training groups have special advantages: modeling, practice (role 446playing), immediate feedback, and support or advice from the group 447for your efforts in real life. Level IV (cognitive): Young (1979) developed a Cognitive 448Therapy approach to loneliness. There are many common irrational, 449problem-causing ideas or assumptions (and "automatic thoughts") 450associated with each stage from aloneness to togetherness: Do you 451think any of these thoughts? Stage 1: Being alone 452 453587454· 455Being alone is terrible''',456'''Only a summary of these skills will be 457given here but several references will be cited. Lonely people are often physically alone but even more important 458are their feelings of being left out, disliked, not being understood and 459emotionally removed from others, even when physically with others. Also, how people view their loneliness influences how they think it can 460be overcome, if at all. For example, if a person thinks he/she is lonely 461because he/she is ugly, unlikable, or recently lost a spouse, he/she is 462likely to feel helpless. If he/she thinks his/her loneliness is caused by 463shyness, lack of social skills, or limited opportunities, he/she may feel 464able to change. Understanding one's shyness (e.g''',465'''Also, see 466references at the end of this section and review the section on shyness 467in chapter 5. Before looking for self-help methods, it is important to get rid of 468your attributions that block your attempting constructive changes. If 469you are blaming your loneliness on something somewhat 470unchangeable, say your height or lack of education or money or some 471permanent personality trait, stop using these excuses and focus on the 472things you can and are willing to change. If you are blaming the other 473person, say their lack of interest or time, or the situation, find things 474that you can do to meet people, such as working on your shyness, 475learning where and how to meet more people, learning to be a better 476conversationalist and how to help others with their troubles, etc. You 477have to get over this stumbling block of hopelessness before you can 478optimistically attack the loneliness. ''',479'''If you are self-absorbed, thinking 480mostly of yourself, broaden your world--seek friends and learn the 481skills and look for ways to help others. Seek the reasons for your 482sadness—use this entire book to plan self-help projects. Most 483important, get active--DO SOMETHING! ''',484'''To be able to converse with others and establish a good 485relationship, to reduce loneliness. Steps 486STEP ONE: Deciding where to meet people.'''],487'ground_truth':'''The first task is to identify the automatic, self-defeating thoughts488you are having. Then question if these thoughts are really true and do489some experimenting to see if it's more pleasurable (less hassle) to490stay home than go out alone, if others always consider you dull and491boring, if you can learn to tell interesting stories and jokes, if there is492evidence that others are constantly evaluating you, if a friend can be493trusted with your personal feelings, if it would be crushing to be494rejected, if classrooms yield different partners than bars, if personal495traits might be more important than looks, if there is a "middle496ground" between saying nothing and complaining frequently, and on497and on, until your thinking becomes more realistic and helpful and less498depressing.499'''},500 501 # More rows like this502]503 504 505data = [506 {507 "question": "What was that thing about procrastination hiding in excuses and emotions?",508 "contexts": [509 '''Boston: Houghton Mifflin Co.''',510 '''Give bigger rewards. Try again.''',511 '''For 512instance, if you falsely believe that supervisors or teachers are 513uninterested in you, then you may approach them in such a shy, 514uncomfortable way that they avoid interactions that make you uneasy; 515consequently, they seem uninterested--just like you expected. Robert Rosenthal and Lenore Jacobson (1968) observed, in a 516famous experiment, the self-fulfilling prophecy in the class room. They 517told the teachers that certain students would be intellectual "late 518bloomers" during the school year.''',519 '''1991). Human relations development. Boston: 520Allyn and Bacon.''',521'''Because dreams involve symbols, condensation, and displacement, there are 522many hidden meanings. Understanding this helps you analyze your dreams. Just like poems and art, dreams constantly use symbols to hide our real 523feelings. For example, a calm scene which turns into a storm which threatens 524your family may symbolize your loving outside and your angry feelings 525towards them inside. In condensation a small part of the dream may 526represent a major, life-long psychological drive or conflict. Example: 527dreaming of receiving food and presents may reflect decades of feeling 528unloved or neglected and an enormous need for love. Displacement is a 529simple way of denying some motivation, e.g. dreaming that a friend is angry 530at you may be to hide that you are angry at him or dreaming that a stranger 531is attracted to your lover may reflect your insecurity about your lover's 532faithfulness. In analyzing dreams the term "psychological conflict" is often used.'''533 ],534 "ground_truth": '''There are many reasons why people avoid change--fears, lack of535motivation, resentment of pressure, helpless feelings, procrastination,536wanting to fail and/or avoid responsibility, wanting to live spontaneously537without planned change, wanting sympathy and to be taken care of,538feeling that it's too much trouble to change, pride and stubbornness, being539willing to accept our own rationalizations ("it runs in my family"), being540inflexible and "set in our ways," feeling that we are not okay and deserve541to be miserable, and other motives.542''',543 },544 {"question":'''Self help has limits. Self help can work for many situations. Some situations call for a professional. Don’t put a bandaid like self help on a bullet wound that demands a hospital. See a professional, medication, or a support group for especially intense mental situations.''',545 'contexts':['''I'm not all bad; they'd see 546that. I'm odd & 547ugly 548I'm so tall, I'm a freak. There are real advantages to 549being tall.''',550 '''Examples: If you are short, imagine being tall.551''',552'''Industry needs all the brains it can find. Kipnis and Schmidt (1984) found three common ways of 553influencing other people: (1) Hard --getting angry, demanding, 554threatening, putting down others. (2) Soft --charming, being nice, 555flattering, acting humble.''',556'''Male and female brains may differ 557but the innate intellectual differences seem to be very slight. Even where male and female average physical traits are clearly 558different--males are bigger, stronger, and faster--there is great 559overlap, i.e.''',560'''I hate being so flat-561chested. I'm a beautiful & good 562person, so forget it. ''',563 564 ],565 'ground_truth':'''While knowledge of self- help may prevent or relieve many problems,566there are certain situations in every life where outside help is necessary.567Self- help is like first-aid; so, if you need surgery, don't use band-aids, see568a surgeon right away! What are some of the psychological situations that569call for professional help? When one is so depressed that there are570thoughts of suicide, when one's thoughts are confused or unreasonable,571when a person experiences urges to hurt someone, when feelings towards572other people are very strong (so that one is not likely to be thinking573straight), and when someone has tried and tried to help him/herself but574nothing seems to work. Usually when your psychological problems are575quite serious, you will need therapy, medication, a support group, and self-576help. Get what you need.577'''578 },579 580 {581 'question':'''knowledge withoout goodness is dangerous. it's important to develop morals as well as intelligence to live in a well roudned way.''',582 583 'context':[''' Many of the self-help methods are fairly complicated for a beginner. Not that they will be hard to learn (if you read carefully), but you can't 584just "fly by the seat of your pants" either. You will need very clear and 585detailed directions.''',586 '''There is evidence that such 587skills can be taught; however, thus far the skills taught seem to be 588used largely in the subject matter areas in which they were learned 589(Mayer, 1984). For example, if you teach students strategies for 590solving math or engineering problems, the students do not 591automatically learn to use better strategies to solve social or personal 592problems. That isn't surprising. ''',593 '''He contends that 594only 20% of a group's success is due to the leader. The remaining 59580% of success is attributable to good followers--not blind slaves but 596constructively independent, intelligent, knowledgeable, self-reliant 597followers or team members. It's important to see the whole picture 598and not assume that the "leader" runs the whole show.''',599 '''or 600being given healthy genes... or being endowed with the ability to learn 601coping skills on your own. To become effective at coping, you need to 602practice thinking of self-help as being applicable to all parts of your 603life, i.e. helpful all the time with serious problems, minor concerns, 604and self-improvements of all kinds.''',605'''It is important to see that learning is different from 606performing.'''607 ],608 'ground_truth':'''Goodness without knowledge is weak; knowledge without goodness is609 dangerous.610 We have to build a better man before we can build a better society.611 All that is necessary for the triumph of evil is that good people do612 nothing.613 Our purpose is not to make a living but a life--a worthy, well-rounded,614 useful life.615 Morality is not a subject; it is a life put to the test in dozens of616 moments.617 -Paul Tillich618 '''619 },620 621 {'question':'''desensitization involves relaxing, imagining scary situations, and then by staying relaxed, desensitizes you to the scary thing. it's important to be safe in this situation. it's helpful for overcoming unreasonable fears. ''',622 'context': ['''Then, Berne 623(1964) wrote Games People Play, which we have just reviewed. Sources of help: Friends, family, self-help groups, therapists 624Even if interpersonal stress is not a cause of a problem, other 625people can often help with the solution. As you may remember from 626childhood, often a problem doesn't seem so big after we have shared it 627with another person, especially if he/she holds us lovingly on his/her 628lap.''',629 '''By too many complaints, requests 630for support, and premature discussions of personal problems. This may 631account for staying depressed but it doesn't explain why the social 632interaction and skills decline. Coyne suggests that this sequence of events occurs: (a) some 633stressful events happen, (b) depression-prone people need more social 634support and nurturance than others when under stress, (c) but they 635have fewer social skills for getting the extra support needed, which 636worsens the depression, and (d) they start relating in ways that drive 637others away, which maintains the depression. Indeed, 70% seeking 638therapy aren't getting what they want from their spouse (McLean, 6391976). ''',640'''Harary and Donahue (1994) provide this feedback, using the Berkeley 641Personality Profile which is part of their book. They measure the "Big 642Five" personality dimensions: (1) Expressive Style--introverted to 643extraverted, (2) Interpersonal Style--inconsiderate to generous, (3) 644Work Style--lackadaisical to dedicated, (4) Emotional Style--calm to 645intense, and (5) Intellectual Style--traditional thinking to seeing things 646differently. Then the same five dimensions are assessed from different 647viewpoints: how you see yourself inside, how you think others see 648you, how you would like to be, how you see yourself in different roles 649(spouse, worker, friend), and, finally, how others actually rate you on 650the same dimensions. The entire book focuses on how to interpret and 651use this information to self-improve and relate better. ''',652'''Neither makes friends. After about 5 minutes, the self-put 653downs, pessimism, dependency, and whiny helplessness of talkative 654depressed people becomes unpleasant to most people. Yet, most 655depressed people long for meaningful contact; therefore, they must 656learn to interact differently. So, give the potential friend "equal time" 657and be an empathic listener during his/her time. Let the friend know 658you are down but suggest doing some fun things together too. Do 659things for others.''',660'''Recognize that time heals. Read some 661sensitive and useful books (Rando, 1991; Bernstein, 1977; Grollman, 6621974b; LeShan, 1976; Lifton & Olson, 1975; Shepard, 1976; Colgrove, 663Bloomfield & McWilliams, 1991). For a comprehensive coverage of 664many aspects of grieving, I recommend Fitzgerald (1994). Try to 665become active (unemployed widows had more difficulty overcoming 666depression than anyone else)''' 667 ],668 'ground_truth':'''that a strong relaxation response can gradually overpower and inhibit669a fear response to a particular stimulus. The desensitization method670involves first relaxing, then imagining mildly scary situations, and671works up to relaxing in the most scary (but not actually dangerous)672situations. This is a painless method of reducing anxiety or fear673reactions because you must stay deeply relaxed throughout the entire674process. It avoids all stressful actual confrontations with the scary675situation, being done entirely in one's imagination. So it is easy to676carry out and always available--it just takes fantasy (see in vivo and677Exposure for versions that require confronting the real situation). The678method was developed by a psychiatrist, Joseph Wolpe (1958), and679based on classical conditioning, using the same principles as Watson680 681and Jones in the 1920's682'''},683{'question':'''many therapists recommend imagining successful conversation with different people before talking to overcome shyness. some recommend practicing in a safe space. then, go out to the world and practie irl! prepare things in advance and be informed, too. 684''',685'context':['''Otherwise, our growth would be 686slowed or reversed...and we would have problems. Maslow had impact 687on Humanistic education and on business management. But, he left it 688to others to discover if it is possible to develop specific methods of 689speeding up the natural development of self-actualization, such as 690through self-help techniques. ''',691'''places where one can make his/her own decisions, 692gain esteem, and use his/her talents.''',693''' So, the teacher, having 694a full pitcher of knowledge, pours each student's empty glass full. Teachers oriented towards personal growth recognize that students 695have knowledge to share with the teacher and other students, i.e. they 696have pitchers of knowledge too. Each student in the self-directed 697personal growth model seeks out new knowledge and awareness for 698their own reasons, then they share that information so it can be used 699in life by others. The medical model, like the traditional teacher, assumes that the 700expert--the doctor--has all the knowledge and makes all the decisions. The doctor diagnoses the problem, decides how to treat it, does the 701treatment, and tells you when you are well. The personal growth 702facilitator does not try to "cure" a "patient," instead he/she helps the 703other person acquire new needed skills or new outlooks for coping 704better. Medical model treatment starts with sickness and ends with a 705cure; growth may start with sickness or wellness and fosters 706improvement which never ends. The super-guru model assumes that a guru--a therapist, teacher, 707writer, preacher, etc.--has the answer, a blueprint for living. In 708contrast, the growth model assumes that the good life is more 709complicated than a simple prescription. In self-direction, optimal, 710creative growth involves the creation of your own values, dreams, and 711skills, and the avoiding of internal barriers to progress (Elliott, 1973). As you can see, gathering information--and the way you go about 712doing that--is closely related to decision-making''',713'''What a gift! Over 2000 years ago, the Chinese called it "Yu"--the 714proper way to live, without concern for external rewards, with joy and 715total commitment. Wouldn't it be wonderful if we could all "flow" most 716of the time? The recipe for flow isn't figured out for sure yet--too 717complex (see chapter 14, however). But a few lucky people figure it 718out for themselves.''',719'''Dreamers run the risk of being disappointed and self-critical 720later. 591721Fred Astaire was told "he can only dance a little;" Beethoven--"hopeless as a composer;" 722Caruso--"he can't sing;" Disney--"has no ideas." Great talent may often go unrecognized. Other people have argued that the focus of James' formula, 723happiness, is of secondary importance.'''],724'ground_truth':'''Almost all therapists would recommend lots of practice interacting725by first imagining successful conversations with different people.726Maybe you can role play with a friend. Then try out your new skills,727talking to people at work, on the Internet, going out with friends, etc.728Prepare things to say and ask in advance. Learn and think about729current social/political issues, listen to the news, see movies, polish730your opinions. Improve your listening skills. There are several good self-help books for shyness731'''732},733 734{'question':'''fight and flight is a common response in men. women often use tend and befriend too. these are stress responses. we are learning and getting more data about them though. gendered data helped us expand our understanding of stress responses.''',735'context':['''Knowledge of others' lives can help us. The above discussion of character types and personality 736development helps us recognize how similar or how different we may 737be from one another. And, as we have just seen, it is important to 738understand the origin of the many different personality types. Others 739are different from us because they simply have a different background, 740different genes, and are in a different environment, i.e''',741'''The evil "self" was 742contrasted with the divinely perfect nature of a Christian soul. Joseph 743Campbell believed the concept of an independent, self-directed "self" 744didn't start to develop until about 800 years ago. So, it is a relatively 745new idea (somewhat older than the idea that we are not at the center 746of the universe) which has grown in importance. In medieval times, 747 7481338749values and meaning were dictated by the community ("do what you 750are told to do"). Today, modern "self" theory says each person is 751expected to decide what is right (almost by magic and without much 752reliance on the accumulated wisdom of the culture) and to know 753him/herself well enough to determine what courses of action "feel 754right." In short, we must know ourselves, so we can set our life goals 755and self-actualize. The cultures of 1200 and 2000 are two very 756different worlds.''',757'''These prejudgments are usually based on 758stereotypes which are oversimplified and overgeneralized views of 759groups or types of people. Or, a prejudgment may be based on an 760 761683762emotional experience we have had with a similar person, sort of our 763own personal stereotype. Stereotypes also provide us with role 764expectations, i.e.''',765'''But, as you know, I don't think life is simple. I suspect that any 766one person's depression may have many causes. For instance, you 767might have a genetic propensity for depression. Then, you grew up in 768a shaming family who had a critical, pessimistic attitude. Feeling 769rejected anyway, you sensed and resented the hostility within the 770family, which lead to your gaining a lot of weight at puberty. All these 771factors together resulted in your having serious social problems and 772low self-esteem; you not only disliked yourself, you felt your family 773had caused a lot of your emotional problems--and told them so. The 774family had never been emotionally supportive anyway and honestly 775thought "if you are fat, stop eating" and "if you are unhappy, get 776 777527778happy--and drop all this psychology crap about parents being 779responsible." Being unable to deal with these personal problems, when 780your lover of two years, who you depended on greatly, decided to 781dump you, the depression was more than you could handle. You 782become lonely and sad all day, nothing seems fun any more, you gain 783more weight, feel tired and listless, become more self-critical and 784guilt-ridden, are unable to see anything good in your life now or in the 785future, and even have some thoughts of ending it all if your lover 786doesn't come back''',787'''It's OK to be emotional and 788need others. It is these sorts of primitive messages, plus other aspects of how 789we are dealt with (respected, valued, spoiled, neglected, resented), 790that determine how we feel about ourselves and others, and which 791produce a script for our lives. It is scary to think that we may be 792compelled to live out our lives in accordance with a five-year-old's 793interpretation of confused and subtle messages from our parents' 794irrational inner child. Many people seeking self-understanding reject 795this notion and disagree with Berne's (1973) book on scripts. Many of 796us don't like the idea that unconscious forces, like a script, are 797directing our lives. Liking or disliking something has little to do with its 798truth, however. Your "child's" view of life as being positive or negative is related to 799your script being for a "winner" or a "loser." Our life script not only 800unconsciously controls the role we play but it also manipulates others 801into playing the roles needed for our script. For example, if your script 802depicts others as disliking you, you may act in irritating ways that 803insure a negative reaction from others. Yet, all we see is that "people 804don't like me." It may seem to us as though we are planning and living 805our lives rationally as adults but perhaps we aren't. If you experience 806the same kind of things happening over and over again with different 807kinds of people, suppose they all show little interest in being friendly, 808you should start looking for an underlying script. In any case, being 809aware of possible unconscious scripts should be helpful. The best way to understand life scripts is through case 810illustrations. Sooty Sarah in chapter 5 and Stella in chapter 15 811illustrate a "I'm a lonely, sickly, no-good person" script. They acquired 812the script in different ways, however. '''813],814'ground_truth':"""Thus, in men, on whom most of the research has been done,815stress has been described for decades by authorities and science as816definitely leading to "fight or flight" responses (a tendency which is,817one would suppose, augmented by testosterone). Observations also818suggest that men prefer to handle stress by themselves. In women,819we are lucky to have a new theory about stress possibly leading to820"tend and befriend" responses, both because those are the roles821prescribed by our culture for women and because women's bodies may822have learned or grown to respond to stresses with different juices than823men. Debates about these gender differences will hopefully lead to824gathering more data and better understanding. At least, we are now825free to consider optional additional reactions to stress beyond just826fight and flight.827"""},828 829{'question':'''Five categories of self help apply: behavior, so adding joy, emotions, so emotional processing, skills, so getting better to reduce helplessness and burnout, cognition, so attitude changes, and unconscious things, so introspective and belief restructuring. 830''',831'context':['''The 832world has enough children already (we let 42,000 die needlessly every 833day). If children would make you unhappy and unproductive or if you 834would make your children unhappy or unproductive, then don't have 835children. It is unwise to put social pressure on every couple to have 836children. ''',837'''The evil "self" was 838contrasted with the divinely perfect nature of a Christian soul. Joseph 839Campbell believed the concept of an independent, self-directed "self" 840didn't start to develop until about 800 years ago. So, it is a relatively 841new idea (somewhat older than the idea that we are not at the center 842of the universe) which has grown in importance. In medieval times, 843 8441338845values and meaning were dictated by the community ("do what you 846are told to do"). Today, modern "self" theory says each person is 847expected to decide what is right (almost by magic and without much 848reliance on the accumulated wisdom of the culture) and to know 849him/herself well enough to determine what courses of action "feel 850right." In short, we must know ourselves, so we can set our life goals 851and self-actualize. The cultures of 1200 and 2000 are two very 852different worlds.''','''If you know what you are 853doing, you will be more at ease, more secure, and more passionate 854about the work. It is eye-opening to realize that Howard Gardner describes seven 855intelligences. Schools only teach two: math and language. There are 856five more: spatial orientation and art, psychomotor skills and athletics, 857musical talent, an understanding of others and ability to work with 858them, and an understanding of yourself and the ability to handle your 859own problems. Develop all your intelligences.''',860'''Please note that 861there are at least two steps involved here. First, you go searching for 862the answer, as in chapter 3 where you consider and compare many 863purposes of life, such as serving God, doing good for others, being 864happy, making lots of money, having a good family life, being 865successful, being content, and others. Second, after deciding on a 866goal--in this case an answer to "What is most important?"--you must 867then focus on the details of how to achieve your goals. We don't just 868automatically do whatever we decide we should do, right?''',869'''Practical intelligence. Social-870emotional intelligence. Courage.''',871],872'ground_truth':"""Behavior--increase pleasant activities, more rest and exercise,873thought stopping and reduction of worries, atoning for wrong-874doing, and others,8752. Emotions--desensitization of sadness to specific situations and876memories, venting anger and sadness, elation or relaxation877training, etc.,8783. Skills--social skills training, decision- making, and self-control879training to reduce helplessness,8804. Cognition--more optimistic perceptions and attributions,881challenging depressing irrational ideas, a more positive self-882concept, more acceptance and tolerance, decide on values and883meaning, and8845. Unconscious factors--learn to recognize repressed feelings and885urges, understand sources of guilt, and read about depression.886"""},887 888{'question':'''a first task in overcoming loneliness means questioning self defeating thoughts. getting to the truth allows you figure out if your belief is really true. is there evidence to support your beliefs? what would it really feel like if you experience something you think would be unpleasant? what actually does matter most? figure it out for yourself!889''',890'context':['''(1990). Flow: The psychology of optimal 891experience.''',892'''Almost no complex behavior is totally caused by fixed factors, 893such as heredity, innate ability, physiological factors (height), etc. ''',894''' (1998). How to be school 895smart: Super study skills. Beech Tree Books.''',896'''Why should submissiveness or cooperation 897be considered feminine? They are human traits, not just traits of 898women! Just define what each personal trait, such as submissiveness, 899involves in terms of actions and feelings--and let each human being 900decide how submissive or cooperative he/she is and wants to be. Indeed, the current masculine-or-feminine classification of traits is 901silly, e.g. ''',902'''(1986). The care and feeding of ideas: A guide to 903encouraging creativity. Reading, Mass.: Addison-Wesley'''],904'ground_truth':'''The first task is to identify the automatic, self-defeating thoughts905you are having. Then question if these thoughts are really true and do906some experimenting to see if it's more pleasurable (less hassle) to907stay home than go out alone, if others always consider you dull and908boring, if you can learn to tell interesting stories and jokes, if there is909evidence that others are constantly evaluating you, if a friend can be910trusted with your personal feelings, if it would be crushing to be911rejected, if classrooms yield different partners than bars, if personal912traits might be more important than looks, if there is a "middle913ground" between saying nothing and complaining frequently, and on914and on, until your thinking becomes more realistic and helpful and less915depressing.916'''},917]918 919dataset = Dataset.from_list(data)920 921results = evaluate(dataset, metrics=[922 context_precision,923 context_recall,924 #answer_relevancy925])926print(results)927 