Mangesh223 commited on
Commit
1e625b3
·
verified ·
1 Parent(s): 1080aa9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -12
app.py CHANGED
@@ -61,30 +61,30 @@ def analyze_with_mistral(resume_text, job_description):
61
  {
62
  "role": "user",
63
  "content": """
64
- Analyze the provided resume against the job description for ATS compatibility. Your analysis should assess how well the resume aligns with ATS requirements and the job description in terms of keywords, formatting, skills, experience relevance, and education. Provide detailed recommendations for improvement where applicable.
65
 
66
- Return the output in EXACTLY this JSON format, with no deviations:
67
  {
68
  "ATS Parameters": {
69
  "Keywords": {
70
  "Match": <integer score between 0 and 100>,
71
- "Recommendation": [<list of specific keywords to add or emphasize>]
72
  },
73
  "Formatting": {
74
  "Match": <integer score between 0 and 100>,
75
- "Recommendation": [<list of specific formatting suggestions>]
76
  },
77
  "Skills Match": {
78
  "Match": <integer score between 0 and 100>,
79
- "Recommendation": [<list of specific skills to include or highlight>]
80
  },
81
  "Experience Relevance": {
82
  "Match": <integer score between 0 and 100>,
83
- "Recommendation": [<list of suggestions to improve experience alignment>]
84
  },
85
  "Education": {
86
  "Match": <integer score between 0 and 100>,
87
- "Recommendation": [<list of suggestions to improve education section>]
88
  }
89
  },
90
  "Score": {
@@ -97,10 +97,13 @@ def analyze_with_mistral(resume_text, job_description):
97
  }
98
  }
99
 
100
- - Ensure all "Match" values are integers between 0 and 100.
101
- - Ensure "Recommendation" fields are lists of strings, even if empty (e.g., []).
102
- - Calculate "Overall" as the average of the five "Score" values, rounded to the nearest integer.
103
- - Base your analysis on typical ATS requirements (e.g., keyword matching, simple formatting, clear section headers) and the specific job description provided.
 
 
 
104
 
105
  Resume:
106
  {resume_text}
@@ -109,7 +112,7 @@ def analyze_with_mistral(resume_text, job_description):
109
  {job_description}
110
  """
111
  }
112
- ]
113
 
114
  payload = {
115
  "model": "mistralai/Mistral-7B-Instruct-v0.3",
 
61
  {
62
  "role": "user",
63
  "content": """
64
+ Analyze the provided resume against the job description for ATS compatibility. Assess how well the resume aligns with ATS requirements and the job description in terms of keywords, formatting, skills, experience relevance, and education. Provide concise, actionable recommendations for improvement.
65
 
66
+ Return the output in EXACTLY this JSON format, with no deviations, ensuring the full structure is complete:
67
  {
68
  "ATS Parameters": {
69
  "Keywords": {
70
  "Match": <integer score between 0 and 100>,
71
+ "Recommendation": [<list of 2-5 specific keywords to add or emphasize>]
72
  },
73
  "Formatting": {
74
  "Match": <integer score between 0 and 100>,
75
+ "Recommendation": [<list of 2-5 specific formatting suggestions>]
76
  },
77
  "Skills Match": {
78
  "Match": <integer score between 0 and 100>,
79
+ "Recommendation": [<list of 2-5 specific skills to include or highlight>]
80
  },
81
  "Experience Relevance": {
82
  "Match": <integer score between 0 and 100>,
83
+ "Recommendation": [<list of 2-5 suggestions to improve experience alignment>]
84
  },
85
  "Education": {
86
  "Match": <integer score between 0 and 100>,
87
+ "Recommendation": [<list of 2-5 suggestions to improve education section>]
88
  }
89
  },
90
  "Score": {
 
97
  }
98
  }
99
 
100
+ Rules:
101
+ - All "Match" values must be integers between 0 and 100.
102
+ - All "Recommendation" fields must be lists of strings (2-5 items max), or empty lists ([]) if no suggestions apply.
103
+ - "Overall" score is the average of the five "Score" values, rounded to the nearest integer.
104
+ - Base analysis on typical ATS requirements (e.g., keyword density, simple formatting, clear sections) and the job description.
105
+ - Ensure the ENTIRE JSON structure is returned, even if recommendations are minimal.
106
+ - Keep recommendations concise to fit within response limits.
107
 
108
  Resume:
109
  {resume_text}
 
112
  {job_description}
113
  """
114
  }
115
+ ]
116
 
117
  payload = {
118
  "model": "mistralai/Mistral-7B-Instruct-v0.3",