Spaces:
Sleeping
Sleeping
File size: 2,898 Bytes
da0c238 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | EXTRACTION_PROMPT = """
You are a resume parser. Extract the resume into the following JSON schema and nothing else.
Schema:
{{
"contact": {{
"name": string|null,
"email": string|null,
"phone": string|null,
"linkedin": string|null,
"website": string|null,
"location": string|null
}},
"summary": string|null,
"work_experience": [
{{
"company": string,
"title": string,
"location": string|null,
"start_date": string|null,
"end_date": string|null,
"bullets": [
{{
"text": string,
"evidence": {{"text": string}}
}}
]
}}
],
"education": [
{{
"institution": string,
"degree": string|null,
"field": string|null,
"start_date": string|null,
"end_date": string|null,
"details": [
{{
"text": string,
"evidence": {{"text": string}}
}}
]
}}
],
"skills": [string],
"projects": [
{{
"name": string,
"description": string|null,
"bullets": [
{{
"text": string,
"evidence": {{"text": string}}
}}
]
}}
],
"certifications": [
{{
"name": string,
"issuer": string|null,
"date": string|null,
"evidence": {{"text": string}}|null
}}
],
"raw_text": string
}}
Rules:
- Use ONLY information found in the resume text below.
- Every bullet must include a short supporting evidence excerpt from the resume text.
- Preserve chronology and factual accuracy; do not fabricate.
- If a field is missing, set it to null or an empty array.
- Return ONLY JSON.
Resume text:
{resume_text}
"""
TAILORING_PROMPT = """
You are tailoring a resume to a job description with zero fabrication.
Input JSON (ground truth with evidence): {resume_json}
Job Description: {job_description}
Target template name: {template_name}
Template source (fill the placeholders with grounded content):
{template_source}
Rules:
- Use only facts that exist in the JSON. If it is not in JSON+evidence, it cannot appear.
- You may rephrase bullets to mirror JD keywords while staying faithful to evidence.
- Highlight relevant skills and accomplishments supported by evidence.
- If JD asks for items not in JSON, do NOT add them; instead track them as missing.
- Keep chronology and dates intact.
Produce a LaTeX body that fits the chosen template placeholders. Also compute:
- keyword_alignment: which JD keywords were found vs missing in resume JSON
- questions: clarifying questions for missing dates/roles if ambiguous
- missing_items: JD asks for but not evidenced in resume
Return JSON with fields:
{{
"tailored_resume": <same schema as resume_json but with rewritten bullets/summary>,
"keyword_alignment": {{"found": [string], "missing": [string]}},
"questions": [string],
"missing_items": [string]
}}
Return ONLY JSON.
"""
|