Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 63 additions & 15 deletions prompts/templates/awards.jinja
Original file line number Diff line number Diff line change
@@ -1,20 +1,68 @@
Extract ONLY the awards and honors information from this resume.
You are an expert resume parser specializing in extracting awards, honors, recognitions, and achievements from resumes. Your job is to extract ONLY the awards and honors section — academic distinctions, competition wins, scholarships, fellowships, and formal recognitions — and return them as a valid JSON array of award objects conforming to the JSON Resume awards schema.

--- The input markdown starts here ---
**AWARD ENTRY STRUCTURE (each award gets one object):**

{{ text_content }}
Each extracted award entry must contain these fields:

1. **title**:
- The exact name of the award, honor, or recognition as written in the resume.
- Preserve official capitalization and naming conventions:
- "Dean's List", "Best Paper Award", "Gold Medal", "National Science Olympiad — Gold"
- "Hackerearth Medianist", "CodeChef 4-star", "GeeksforGeeks DDP 3.0 Graduate"
- If the award has a tier/rank (e.g., "First Place", "Top 1%", "Silver Medal"), append it to the title: "Dean's List — Top 5%".

2. **date**:
- Use `YYYY-MM` format.
- "March 2024" → "2024-03".
- "Spring 2024" → "2024-03".
- "2024" (year only) → "2024-01".
- For multi-year awards: use the start year: "2022–2024" → "2022-01".

3. **awarder**:
- The organization, institution, or entity that conferred the award.
- Examples: "Indian Institute of Technology Bombay", "Google", "National Council of Science Museums", "Coursera (Google)", "ACM".
- For competition awards: use the organizing body: "HackerEarth", "CodeChef", "Kaggle", "Meta Hacker Cup".
- For scholarships/fellowships: use the funding body.

**EXTRACTION RULES:**

1. **WHAT COUNTS AS AN AWARD**: Extract any of these categories:
- Academic honors: Dean's List, Gold Medal, Silver Medal, Consistent Distinction, First Class with Honors.
- Competition prizes: Hackathon wins (1st/2nd/3rd place), coding contest rankings, Olympiad medals.
- Scholarships/Fellowships: Merit scholarships, full-tuition awards, research fellowships, government fellowships.
- Corporate recognitions: Employee of the Month, Performance Excellence Award, VP Award.
- Published work recognition: Best Paper Award, Outstanding Paper Award, People's Choice Award.
- Certifications with distinction: "AWS Certified Solutions Architect — Professional", "Completed with Honors".

2. **WHAT DOES NOT COUNT AS AN AWARD** (SKIP THESE):
- Regular coursework grades or GPA: "Scored 9.2 CGPA" is not an award unless explicitly called a "scholarship" or "merit-based".
- Course completion certificates from platforms like Coursera/Udemy that are listed under certifications, not awards.
- Participation-only entries without any distinction: "Participated in Hackathon" (unless they won something).
- Self-declared titles like "Self-taught developer".
- Membership in organizations: "Member of ACM", "IEEE Student Member".

3. **DEDUPLICATION**: If the same award is mentioned in multiple sections (e.g., Dean's List in both education and a separate awards section), include it only ONCE — prefer the version with more details (more specific title/date/awarder).

--- The input markdown ends here ---
4. **CONTEXT PRESERVATION**: If the resume provides extra context for an award within its bullet points (e.g., "Awarded to top 2% of 5000+ students"), capture this as additional detail in the title field: "Dean's List — Top 2% of 5,000+ Students".

Return ONLY a JSON object with this structure:
{
"awards": [
{
"title": "Award name",
"date": "Award date (YYYY-MM)",
"awarder": "Awarding organization"
}
]
}
5. **SORTING**: Return awards in REVERSE CHRONOLOGICAL order (most recent first). Within the same date, preserve the order from the resume.

6. **COMBINED AWARDS**: If multiple awards are listed together under one heading (e.g., "Awards: Dean's List, Gold Medal, Best Project"), split them into separate objects with their respective dates and awarders if available.

**WHAT TO SKIP:**
- Course grades, mid-term scores, or exam results not designated as awards.
- Participation certificates without a winning or distinguishing qualifier.
- Generic "Certificate of Completion" entries (these belong in certifications, not awards).

**VALIDATION CHECKS:**
- Title must never be null or empty — if an entry has no clear award title, skip it.
- date must be valid YYYY-MM format; if the resume gives no date, use `"unknown"` but do NOT fabricate a date.
- awarder must never be null — at minimum, infer from context (e.g., the university name for academic awards).
Comment on lines +57 to +60

**IMPORTANT**: Return ONLY a JSON object with the key "awards" containing an array of award objects. Do not include any explanatory text, markdown code fences, or surrounding comments.

--- The input resume markdown starts here ---

{{ text_content }}

**IMPORTANT**: Return ONLY valid JSON. Do not include any explanatory text.
--- The input resume markdown ends here ---
128 changes: 79 additions & 49 deletions prompts/templates/basics.jinja
Original file line number Diff line number Diff line change
@@ -1,55 +1,85 @@
Extract ONLY the basic information (name, email, phone, location, profiles) from this resume.
You are an expert resume parser specializing in extracting personal and contact information from resumes. Your job is to extract ONLY the basic profile data — name, email, phone, location, profiles, and URL — from the provided resume markdown and return it as a valid JSON object conforming to the JSON Resume basics schema.

**EXTRACTION RULES FOR EACH FIELD:**

1. **name**:
- Extract the candidate's full legal or professional name as written in the resume header.
- Preserve capitalization exactly: "Amit Sharma" not "amit sharma".
- If only initials are given (e.g., "A.S."), return them as-is — do NOT expand them.
- If a middle name or initial is present, include it: "Priya Nair Gupta".

2. **email**:
- Extract the FIRST valid email address found. Prefer contact-section emails over inline ones.
- Validate format loosely: must contain exactly one `@` with text on both sides and a domain containing at least one `.`.
- If multiple emails exist (personal + work), prefer the personal/primary contact email.
- If no email is found, return `null`.

3. **phone**:
- Extract phone numbers in any format: "+91-9876543210", "(555) 123-4567", "+91 98765 43210".
- Strip all non-digit characters except the leading `+`. Final output: `"+919876543210"`.
- If multiple numbers exist, prefer the one labeled as "mobile", "phone", or the most prominent one in the header.
- If no phone is found, return `null`.

4. **url**:
- Extract any personal website, portfolio URL, or blog link found in the header or profiles section.
- Prefer URLs that look like personal domains (e.g., `amitsharma.dev`, `priya.github.io`).
- Include the protocol if missing — prepend `https://` automatically.
- If no URL is present, return `null`.

5. **summary**:
- Extract any "About Me", "Summary", "Profile", or "Objective" section text from the resume.
- Preserve paragraph formatting: keep line breaks as `\n` in the JSON string.
- Do NOT summarize or rewrite — copy verbatim.
- If no summary section exists, return `null`.

6. **location**:
- Extract city and country from any address-like text (e.g., "Bangalore, India", "San Francisco, CA").
- **city**: The city/town name as written. Use the most specific one mentioned. If only a region/state is given (no city), use that as the city field.
- **countryCode**: Convert to ISO 3166-1 alpha-2 code:
- "India" → "IN", "United States" / "USA" / "US" → "US", "United Kingdom" → "GB", "Canada" → "CA"
- "Germany" → "DE", "France" → "FR", "Australia" → "AU", "China" → "CN"
- If you cannot determine the country, return `null` for countryCode.
- If no location info is present, set both city and countryCode to `null`.

7. **profiles**:
- Extract every social/professional profile URL found in the resume. For each entry:
- **network**: Identify the platform name exactly from this canonical list:
- "GitHub" for github.com URLs
- "LinkedIn" / "Linkedin" for linkedin.com URLs
- "Twitter" / "X" for x.com or twitter.com URLs
- "LeetCode" for leetcode.com URLs
- "HackerRank" for hackerrank.com URLs
- "CodeForces" for codeforces.com URLs
- "Kaggle" for kaggle.com URLs
- "StackOverflow" for stackoverflow.com URLs
- "Portfolio" for personal domains or github.io pages
- "Devpost" / "DevPost" for devpost.com URLs
- "Medium" / "Mastodon" / "YouTube" / "ResearchGate" as applicable
- **url**: The full URL as written in the resume. Normalize to `https://` if it starts with `http://`. Remove trailing slashes.
- **username**: Extract the last path segment or handle from the URL:
- `https://github.com/username` → username = "username"
- `https://linkedin.com/in/username` → username = "username"
- `https://twitter.com/username` → username = "username"
- **CRITICAL**: ONLY extract URLs that are EXPLICITLY present in the resume. Do NOT add any default or assumed profiles.
- Do NOT add generic platform homepages (e.g., don't add "https://github.com" unless the candidate has a personal GitHub profile link).
- If no profile URLs exist, return an empty array `[]`.

**VALIDATION CHECKS BEFORE RETURNING:**
- Email must pass basic format validation (contains @ and domain with .)
- Phone number must be digits only, possibly starting with +
- All URLs must start with http:// or https://
- profiles array is never null — always [] when empty
- location.city may be null but if countryCode is set, city should also be populated

**WHAT TO IGNORE:**
- Address components like "flat #", "street", "landmark" — they are not part of the JSON Resume basics schema.
- Social media handles that are NOT URLs (e.g., "@amitsharma" without a URL).
- Phone numbers in non-contact sections (e.g., mentioned inside a project description).

**IMPORTANT**: Return ONLY valid JSON. Do not include any explanatory text, markdown code fences, or surrounding comments.

--- The input resume markdown starts here ---

{{ text_content }}

--- The input resume markdown ends here ---

Return ONLY a JSON object with this structure:
{
"basics": {
"name": "Full name",
"email": "Email address",
"phone": "Phone number",
"url": null,
"summary": null,
"location": {
"city": "City",
"countryCode": "Country code"
},
"profiles": [
{
"network": "Platform name",
"url": "Full URL",
"username": "Username from URL"
}
]
}
}

**IMPORTANT**: If there is any About Me or Summary section, add that to the summary section of the basics

**CRITICAL**: For profiles section:
- ONLY extract URLs that are EXPLICITLY present in the resume markdown
- Look for URLs in markdown format [text](url) or plain URLs
- DO NOT create any URLs that are not in the original resume
- DO NOT add generic platform URLs like "https://github.com" or "https://linkedin.com" unless they are actually present in the resume
- If no URLs are found in the resume, return an empty profiles array: "profiles": []
- If a URL is present but you cannot determine the network or username, still include it with the available information
- If the URL is of the format github.io or personal domain, mark the network as "Portfolio"
- If there is any link at the header of the resume or Portfolio link, add that as url in the basics

**EXAMPLES OF WHAT NOT TO DO:**
- Do NOT add "https://github.com" if GitHub is not mentioned in the resume
- Do NOT add "https://linkedin.com" if LinkedIn is not mentioned in the resume
- Do NOT add "https://leetcode.com" if LeetCode is not mentioned in the resume
- Do NOT add "https://stackoverflow.com" if Stack Overflow is not mentioned in the resume

**EXAMPLES OF WHAT TO DO:**
- If resume contains "GitHub: https://github.com/username", extract it
- If resume contains "[My Portfolio](https://example.com)", extract it
- If resume contains "LinkedIn: linkedin.com/in/username", extract it

**IMPORTANT**: Return ONLY valid JSON. Do not include any explanatory text.

96 changes: 77 additions & 19 deletions prompts/templates/education.jinja
Original file line number Diff line number Diff line change
@@ -1,23 +1,81 @@
Extract ONLY the education information from this resume.
You are an expert resume parser specializing in extracting education history from resumes. Your job is to extract ONLY the education section — degrees, certifications, courses, and academic achievements — and return it as a valid JSON array of education objects conforming to the JSON Resume education schema.

--- The input markdown starts here ---
**EDUCATION ENTRY STRUCTURE (each degree/course gets one object):**

Each extracted education entry must contain these fields:

1. **institution**:
- The name of the school, university, college, or training organization.
- Preserve the official name exactly as written: "Indian Institute of Technology, Bombay" not "IIT Bombay" (unless only the short form is present).
- If the institution has a branch/campus (e.g., "University of California, Berkeley"), include the full name.
- For online platforms (Coursera, edX, Udemy), use the platform name as the institution: "Coursera", "edX", "Udacity".

2. **area**:
- The field of study or specialization: "Computer Science", "Electrical Engineering", "Data Science".
- For certifications: the certification title/topic area: "AWS Solutions Architect", "Google Cloud Professional".
- If no specific area is mentioned but the degree name implies one (e.g., "B.Tech"), derive it: "Technology" or the specialization if listed.
- Do NOT leave this blank — if completely missing, infer from the degree type as a best effort (but never invent).

3. **studyType**:
- Normalize to standard degree types:
- "Bachelor of ..." for B.Tech, B.E., BSc, BA, BTech, BS
- "Master of ..." for M.Tech, M.E., MSc, MA, MS, MBA
- "PhD" or "Doctorate" for PhD, Doctor of Philosophy
- "Diploma" for diploma programs
- "Certificate" / "Certification" for short courses and professional certs
- "Course" for individual course enrollments
- If the resume uses non-standard terms (e.g., "Graduate Programme"), normalize to the closest standard type.

4. **startDate**:
- Use the format `YYYY-MM` or `YYYY` if only the year is available.
- For "2021 – Present" or "2021-Present": startDate = "2021-01", endDate = `"present"`.
- If only a start year is given and no end date, set startDate to `"YYYY-01"` and leave endDate as `null` (candidate may still be studying).

5. **endDate**:
- Use the format `YYYY-MM` or `YYYY`.
- For ongoing education: `"present"`.
- For "Completed in 2023": endDate = "2023-12" (use December for year-only graduations).
- If no end date is given and it's a past degree, infer from typical duration:
- Bachelor's: start + 4 years
- Master's: start + 2 years
- But ONLY if the resume indicates completion. If ambiguous, leave as `null`.
Comment on lines +38 to +41

6. **score**:
- Extract GPA, CGPA, percentage, or any academic score exactly as reported.
- Normalize the scale indicator: "9.2/10" → score = "9.2", additional context can go into a notes field if needed.
- For percentages: "85%" → score = "85", note the "%" in your parsing but return just the numeric string.
- For grade-based systems (A+, B, First Class): extract the grade as-is.
- If no score is mentioned, return `null`. Do NOT calculate or assume CGPA from marks.

**EXTRACTION RULES:**

1. **SORTING**: Return education entries in REVERSE CHRONOLOGICAL order (most recent/relevant first). Current degrees come before past degrees; master's before bachelor's.

2. **MULTIPLE ENTRIES**: A candidate may have multiple education entries:
- Each degree = one entry (e.g., B.Tech is one, M.Tech is another)
- Each certification = one entry
- Do NOT merge two distinct degrees into one entry.

3. **RELATED FIELDS**: If an institution field contains both a university and department/faculty (e.g., "Department of Computer Science, IIT Bombay"), extract the INSTITUTION as "IIT Bombay" and area as "Computer Science".

4. **THESIS/DISSERTATION**: If the resume mentions a thesis title or dissertation topic within an education entry, include it in the `courseName` or add it as additional context — but ONLY if explicitly stated.

5. **RELEVANT COURSEWORK**: If the resume lists "Relevant Courses" under an education entry, treat this as contextual information and do NOT create separate entries unless each course is individually described with a grade/score.

**WHAT TO SKIP:**
- High school education unless the candidate has no college/university degree (for intern positions, focus on higher ed).
- "Pursuing" or "In progress" without any start date — these are incomplete and should be skipped.
- Self-study mentions without a formal institution: "Self-taught Python via YouTube" — skip entirely.

**VALIDATION CHECKS:**
- All startDate values must be valid YYYY or YYYY-MM format.
- No duplicate entries (same institution + same area + same studyType).
- endDate cannot be before startDate for any entry.

**IMPORTANT**: Return ONLY a JSON array of education objects wrapped in an object with the key "education". Do not include any explanatory text, markdown code fences, or surrounding comments.

--- The input resume markdown starts here ---

{{ text_content }}

--- The input markdown ends here ---

Return ONLY a JSON object with this structure:
{
"education": [
{
"institution": "School/University name",
"area": "Field of study",
"studyType": "Degree type",
"startDate": "Start date (YYYY-MM)",
"endDate": "End date (YYYY-MM)",
"score": "GPA/Percentage"
}
]
}

**IMPORTANT**: Return ONLY valid JSON. Do not include any explanatory text.
--- The input resume markdown ends here ---
Loading