Mangesh223 commited on
Commit
586a068
·
verified ·
1 Parent(s): 732b6bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -37,11 +37,12 @@ def analyze_with_mistral(resume_text, job_description):
37
  messages= [
38
  {
39
  "role": "system",
40
- "content": "You are an AI expert in ATS resume analysis. Your task is to analyze a resume against a job description for ATS compatibility and return the result in a structured JSON format. You must strictly follow the JSON schema provided and output ONLY JSON."
41
  },
42
  {
43
  "role": "user",
44
- "content": f"""Analyze the provided resume against the job description for ATS compatibility. Evaluate **keywords, formatting, skills, experience relevance, and education** based on ATS best practices.\n\nStrict Instructions:\n- **Return ONLY valid JSON** that matches the exact schema below. NO explanations, comments, or extra text.\n- **Ensure all fields are populated** (use empty lists or defaults if no suggestions apply).\n- **Use integer values (0-100)** for scores.\n- **Ensure 'Overall' is the rounded average** of all score fields.\n\n### **JSON Schema:**\n```json\n{\n \"ATS Parameters\": {\n \"Keywords\": {\n \"Match\": <integer 0-100>,\n \"Recommendation\": [<list of 0-5 strings>]\n },\n \"Formatting\": {\n \"Match\": <integer 0-100>,\n \"Recommendation\": [<list of 0-5 strings>]\n },\n \"Skills Match\": {\n \"Match\": <integer 0-100>,\n \"Recommendation\": [<list of 0-5 strings>]\n },\n \"Experience Relevance\": {\n \"Match\": <integer 0-100>,\n \"Recommendation\": [<list of 0-5 strings>]\n },\n \"Education\": {\n \"Match\": <integer 0-100>,\n \"Recommendation\": [<list of 0-5 strings>]\n }\n },\n \"Score\": {\n \"Keywords\": <integer 0-100>,\n \"Formatting\": <integer 0-100>,\n \"Skills Match\": <integer 0-100>,\n \"Experience Relevance\": <integer 0-100>,\n \"Education\": <integer 0-100>,\n \"Overall\": <integer 0-100, rounded average of all scores>\n }\n}\n```\n\n### **Processing Rules:**\n- **Score Calculation:** Base your evaluation on **ATS resume best practices** (keyword density, formatting simplicity, skills relevance, etc.).\n- **Recommendations:** Provide actionable suggestions to improve compatibility.\n- **Strict JSON Format:** No preamble, no explanations—return ONLY the completed JSON.\n\nResume:\n{resume_text}\n\nJob Description:\n{job_description}"""
 
45
  }
46
  ]
47
 
 
37
  messages= [
38
  {
39
  "role": "system",
40
+ "content": "You are an AI expert in ATS resume analysis. Your task is to analyze a resume against a job description for ATS compatibility and return the result in a structured JSON format. You must strictly follow the JSON schema provided and output ONLY JSON."
41
  },
42
  {
43
  "role": "user",
44
+ "content": f"""Analyze the provided resume against the job description for ATS compatibility. Evaluate **keywords, formatting, skills, experience relevance, and education** based on ATS best practices.\n\nStrict Instructions:\n- **Return ONLY valid JSON** that matches the exact schema below. NO explanations, comments, or extra text.\n- **Ensure all fields are populated** (use empty lists or defaults if no suggestions apply).\n- **Use integer values (0-100)** for scores.\n- **Ensure 'Overall' is the rounded average** of all score fields.\n\n### **JSON Schema:**\n```json\n{{\n \"ATS Parameters\": {{\n \"Keywords\": {{\n \"Match\": <integer 0-100>,\n \"Recommendation\": [<list of 0-5 strings>]\n }},\n \"Formatting\": {{\n \"Match\": <integer 0-100>,\n \"Recommendation\": [<list of 0-5 strings>]\n }},\n \"Skills Match\": {{\n \"Match\": <integer 0-100>,\n \"Recommendation\": [<list of 0-5 strings>]\n }},\n \"Experience Relevance\": {{\n \"Match\": <integer 0-100>,\n \"Recommendation\": [<list of 0-5 strings>]\n }},\n \"Education\": {{\n \"Match\": <integer 0-100>,\n \"Recommendation\": [<list of 0-5 strings>]\n }}\n }},\n \"Score\": {{\n \"Keywords\": <integer 0-100>,\n \"Formatting\": <integer 0-100>,\n \"Skills Match\": <integer 0-100>,\n \"Experience Relevance\": <integer 0-100>,\n \"Education\": <integer 0-100>,\n \"Overall\": <integer 0-100, rounded average of all scores>\n }}\n}}\n```\n\n### **Processing Rules:**\n- **Score Calculation:** Base your evaluation on **ATS resume best practices** (keyword density, formatting simplicity, skills relevance, etc.).\n- **Recommendations:** Provide actionable suggestions to improve compatibility.\n- **Strict JSON Format:** No preamble, no explanations—return ONLY the completed JSON.\n\nResume:\n{resume_text}\n\nJob Description:\n{job_description}"""
45
+
46
  }
47
  ]
48