from utils import get_file_data import os # user_journal = get_file_data("journal.txt") # example = get_file_data("example.json") # direcindirecprompt = f''' # I'll be giving you a journal entry written by a user. Your task is to extract out problems being faced by the user in the following format: # {{ # "Overall Problem 1": ["Specific reason1 - reason why it was created", "Specific reason2 - reason why it was created"], # "Overall Problem 2": ["Specific reason1 - reason why it was created"], # }} # I'll give you an example how this overall - specific problem pair looks like. Here you'll see that the heading (single word is the overall problem), then we have the reasons why it was created # here is the overall - specific problem pair: {example} # Obviusly a single overall problem can have multiple specific reasons why it was created. Put it in the exact format as shown above. # Also, multiple overall problems can share a common specific reason why it was created. In that case, just repeat the specific reason under all of them. # Here is the user text you have to analyse: {user_journal} # Output strictly in the format given to you no extra symbols or words or anything ''' # if os.path.getsize("overall_specific_problempair.json") != 0: # user_problem = get_file_data("overall_specific_problempair.json") # # print("File is empty") # directdesc = f''' # So i am giving you the iverall problems that are being faced by the user. Here it is: {user_problem.keys()} # Now I want you to generate a 2-3 line summary/description for each of the problems. It shuold indicate what effect it has on the user's body and mind. # So basically I want to perform a cosine similarity between this description that you give and a task dataset that has multiple tasks and they have their own descriptions of what they are able to cure # So, If you write a good description for each overall problem, then I can match it with the task dataset descriptions to find the best matching tasks for the user. # Here are examples of what is present int the task dataset descriptions: # "Nadi Shodhana (Alternate Nostril Breathing)": {{ # "Stress": [ # "Balances left/right brain hemispheres for nervous system equilibrium", # "Reduces cortisol by 27% through symmetrical breathing patterns", # "Creates instant mental clarity during decision fatigue" # ], # "Emotions": [ # "Harmonizes emotional extremes by balancing solar/moon energies", # "Resets emotional reactivity through prefrontal cortex activation", # "Integrates logical and intuitive aspects of awareness" # ], # }} # "Bakasana (Crow Pose)": {{ # "Focus": [ # "Develops laser-like concentration to prevent falling", # "Trains mind-body coordination in challenging position", # "Builds mental discipline through fear management" # ], # "Strength": [ # "Develops core and wrist strength simultaneously", # "Tones abdominal muscles through active engagement", # "Builds functional arm strength for daily activities" # ], # }} # So, you see there is a certain way the descriptions are written for the task and hence you need to generate the descriptions for the overall problems in a similar way so that cosine similarity precisely extracts onyl those tasks which are highly relevant to the overall problems being faced by the user. # Also, follow the following format strictly: # {{ # "Overall Problem 1": ["Description"] # "Overall Problem 2": ["Description"] # }} # Remember to output not anything else what is said, also don't use veyr veyr complicated words. You can use some technical words but keep it simple and precise otherwise if those words are present in the task dataset then cosine similaity will be very less. # also, replace "Overall Problem 1" with the problem name for which description is being written # '''