Skip to content

Enhance Resume Parsing with AI and Gemini 2.5 Flash - #9006

Open
MoonLawlier wants to merge 1 commit into
JhaSourav07:mainfrom
MoonLawlier:resume-parsing
Open

Enhance Resume Parsing with AI and Gemini 2.5 Flash#9006
MoonLawlier wants to merge 1 commit into
JhaSourav07:mainfrom
MoonLawlier:resume-parsing

Conversation

@MoonLawlier

Copy link
Copy Markdown

Pull Request: AI-Assisted Resume Parsing with Gemini 2.5 Flash

Description

Fixes #7984

Implemented an AI-assisted resume parsing pipeline using Gemini 2.5 Flash to significantly improve profile extraction accuracy across diverse resume formats while maintaining a lightweight local-first architecture.

What was added

  • Integrated Gemini 2.5 Flash for structured resume data extraction.
  • Added JSON-based profile parsing workflow.
  • Implemented schema validation for AI responses using Zod.
  • Added automatic profile form population from parsed data.
  • Added localStorage persistence for parsed profile information.
  • Implemented fallback mechanism to the existing rule-based parser when AI parsing fails.
  • Improved support for resumes created with Canva, Figma, Microsoft Word templates, and other modern resume builders.
  • Prevented raw PDF metadata and object references from being incorrectly displayed as profile information.

Why this change?

The existing PDF text extraction approach struggles with many real-world resume formats, often resulting in:

  • Missing names and contact information
  • Empty education and experience sections
  • Incorrect skill extraction
  • PDF object references being interpreted as user data
  • Poor compatibility with visually designed resumes

This enhancement improves extraction accuracy while preserving a lightweight architecture and avoiding unnecessary backend complexity.


Pillar

  • 🎨 Pillar 1 — New Theme Design
  • 📐 Pillar 2 — Geometric SVG Improvement
  • 🕐 Pillar 3 — Timezone Logic Optimization
  • 🛠️ Other (Bug fix, refactoring, docs)

Visual Preview

Previous Output

Full Name: N/A

Skills:
Parent 7 0 R
Prev 13 0 R
...
endobj
15 0 obj

New Output

{
  "name": "John Doe",
  "email": "john@example.com",
  "skills": ["React", "TypeScript", "Next.js"],
  "education": [
    {
      "institution": "ABC University",
      "degree": "B.Tech CSE"
    }
  ],
  "experience": [
    {
      "company": "XYZ Ltd",
      "role": "Frontend Developer"
    }
  ]
}

Parsing Flow

Resume Upload
      ↓
PDF Text Extraction
      ↓
Gemini 2.5 Flash
      ↓
Schema Validation (Zod)
      ↓
Profile Generation
      ↓
localStorage Persistence
      ↓
Auto-filled Profile Form

Fallback Flow

PDF Text Extraction
        ↓
Gemini Parsing
        ↓
Success → Structured Profile

OR

Gemini Failure
        ↓
Existing Rule-Based Parser
        ↓
Best-Effort Profile Generation

How I solved this issue:

  • Added AI-powered resume parsing using Gemini 2.5 Flash.
  • Implemented structured JSON extraction and validation.
  • Added profile persistence using localStorage.
  • Added graceful fallback to the existing parser to ensure uninterrupted user experience.
  • Improved compatibility with modern resume templates and complex layouts.

@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

@MoonLawlier is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@retenta-bot

retenta-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

This PR significantly enhances the resume parsing capabilities by integrating Gemini 2.5 Flash, which should address many of the issues we've faced with the existing parser, particularly with complex resume formats. It also includes a fallback mechanism to ensure reliability, similar to past decisions we've made regarding garbage character handling in the parser. Looking forward to your feedback on this improvement! 😊

@retenta-bot retenta-bot Bot changed the title AI-Assisted Resume Parsing with Gemini 2.5 Flash Enhance Resume Parsing with AI and Gemini 2.5 Flash Aug 12, 2026
@JhaSourav07 JhaSourav07 added GSSoC 2026 level:intermediate Moderate complexity tasks quality:exceptional Outstanding contribution with exceptional implementation quality, testing. gssoc:approved PR has been reviewed and accepted for valid contribution points type:feature New features, additions, or enhancements and removed gssoc:approved PR has been reviewed and accepted for valid contribution points labels Aug 13, 2026
@github-actions github-actions Bot added this to the GSSoC 2026 milestone Aug 13, 2026
@Aamod007 Aamod007 added mentor:Aamod007 level:advanced Complex contributions involving architecture, optimization, or significant feature work quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. labels Aug 13, 2026

@Aamod007 Aamod007 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome integration of Gemini 2.5 Flash! The addition of the AI fallback mechanism in
esume-parser.ts\ makes the parser much more resilient to differently formatted resumes.

I particularly like how you robustly handled extracting and validating the JSON response from the LLM using \zod\ and checking multiple possible payload structures (\ ryParseCandidate). The \sanitizeExtractedText\ function is also a smart addition to clean up PDF stream artifacts before feeding the text to the model.

Labels applied:

  • type:feature: Introduces AI-assisted resume parsing.
  • level:advanced: Implements LLM API interactions, robust schema validation, and fallback logic.
  • quality:clean: Well-structured code with good test coverage for the PDF stream issue.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Hey @MoonLawlier, this pull request has been inactive for 3 days. It will be automatically closed in 2 days if no further activity occurs.

If you are still working on this, please push your latest changes or leave a comment to keep it active.

@MoonLawlier

Copy link
Copy Markdown
Author

hi @Aamod007 I didn't really understood what exactly I need to improve or change in my current code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:needs-rebase GSSoC 2026 level:advanced Complex contributions involving architecture, optimization, or significant feature work level:intermediate Moderate complexity tasks mentor:Aamod007 quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. quality:exceptional Outstanding contribution with exceptional implementation quality, testing. type:feature New features, additions, or enhancements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AI-Powered Resume Parsing with Gemini Fallback & Local Profile Persistence

3 participants