shreyanshknayak commited on
Commit
a2ab209
·
verified ·
1 Parent(s): 93325f2

Added summarization

Browse files
Files changed (1) hide show
  1. main.py +3 -1
main.py CHANGED
@@ -94,6 +94,7 @@ system_prompt = """You are an advanced language model trained to analyze student
94
 
95
  Your analysis and action plan should be comprehensive, consistent, and tailored to the individual student's responses while leveraging your knowledge of the JEE Mains exam context, the mapping of subjects/topics to general cognitive traits and skills, and the ability to identify overarching trends across related subjects/topics."""
96
 
 
97
 
98
  class UserPromptInput(BaseModel):
99
  confidence_scores_str: str
@@ -125,4 +126,5 @@ async def get_analysis(user_prompt: UserPromptInput):
125
 
126
 
127
  output = swot_bot.query(system_prompt + user_response)
128
- return {"message": output}
 
 
94
 
95
  Your analysis and action plan should be comprehensive, consistent, and tailored to the individual student's responses while leveraging your knowledge of the JEE Mains exam context, the mapping of subjects/topics to general cognitive traits and skills, and the ability to identify overarching trends across related subjects/topics."""
96
 
97
+ summarization_prompt = """You are given a Strengths, Opportunities, Challenges analysis of a JEE Student preparing for JEE Mains examination in India, along with a proposed Action Plan. Summarize each point in the Strengths, Opportunites, Challenges and Action Plan sections to a few relevant tags and present in the same manner as orignally given, but now reduced to tags instead of detailed analysis points. Here is the given analysis: """
98
 
99
  class UserPromptInput(BaseModel):
100
  confidence_scores_str: str
 
126
 
127
 
128
  output = swot_bot.query(system_prompt + user_response)
129
+ output2 = swot_bot.query(summarization_prompt + output)
130
+ return {"soca_ouput": output, "summarized_output":output2}