Skip to content
Bishalsingh153Public

About

An AI resume parser build using Golang

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Resume Parser (Go + Groq LLM)

A command-line tool that lets you pick a resume file (PDF or DOCX) via a native file dialog, extracts its raw text, and uses an LLM (via the Groq API) to parse it into structured JSON matching a defined schema.

How it works

  1. Pick a file — opens a native OS file browser (via zenity) restricted to .pdf and .docx files.
  2. Extract text — reads the raw text content from the selected file:
    • PDFs are parsed with github.com/ledongthuc/pdf
    • DOCX files are parsed with github.com/lu4p/cat
  3. Parse with LLM — sends the raw resume text to Groq's chat completions API (openai/gpt-oss-20b model) with a system prompt instructing it to extract fields matching a fixed JSON schema, and requests a json_object response format.
  4. Structure the result — unmarshals the LLM's JSON output into a Go Resume struct and prints it.

Schema

The tool currently extracts:

type Resume struct {
    Name      string   `json:"name"`
    Email     string   `json:"email"`
    Phone     string   `json:"phone"`
    Skills    []string `json:"skills"`
    Education string   `json:"education"`
}

To parse against your own criteria, edit this struct and update the JSON schema described in the systemPrompt inside parseResumeWithLLM to match — the two need to stay in sync.

Prerequisites

  • Go installed (1.20+ recommended)
  • A Groq API key
  • zenity installed on your system (for the file picker dialog):
    • Fedora: sudo dnf install zenity
    • Debian/Ubuntu: sudo apt install zenity
    • macOS: file dialogs work via a different native backend; no zenity install needed
  • Windows: uses the native Windows file dialog; no extra install needed

Setup

  1. Clone or copy this project into a folder.
  2. Initialize the Go module (if not already done):
    go mod init resumeparser
  3. Install dependencies:
    go get github.com/joho/godotenv
    go get github.com/ledongthuc/pdf
    go get github.com/lu4p/cat
    go get github.com/ncruces/zenity
    go mod tidy
  4. Create a .env file in the project root:
    GROQ_API_KEY=your_groq_api_key_here
    

Usage

go run main.go

A file picker window will open. Select a .pdf or .docx resume. The tool will:

  • Print the selected file path
  • Extract and send the resume text to the LLM
  • Print the parsed, structured fields

Project structure

Everything currently lives in a single main.go file:

Function Responsibility
extractText Reads a PDF or DOCX file and returns its raw text
pickResumeFile Opens a native file picker dialog and returns the chosen path
parseResumeWithLLM Sends resume text to Groq and returns a structured Resume
main Wires the above together end-to-end

Known limitations / next steps

  • Only .pdf and .docx are supported — no .doc, .rtf, or image-based/scanned PDFs (no OCR).
  • The schema is currently hardcoded for demonstration; swap in your actual parsing criteria.
  • No retry logic if the LLM returns malformed JSON — errors are surfaced with the raw response for debugging.
  • No batch mode yet — one resume per run.

Troubleshooting

  • no required module provides package ... — you forgot to go get that dependency. Run go mod tidy.
  • open <file>: no such file or directory — the file picker didn't return the path you expected, or you hardcoded a filename that doesn't exist in your project folder.
  • zenity: command not found / dialog doesn't open — install zenity for your OS (see Prerequisites).
  • LLM output doesn't match the schema — check the raw response printed in the error message; you may need to tighten the system prompt or reduce resume text length.

About

An AI resume parser build using Golang

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages