How I engineered hallucination-proof resume generation with Python, LangChain, and LaTeX
If you've ever tried using ChatGPT to write your resume, you've probably noticed the problem: it makes stuff up.
It inflates your job titles, invents technologies you've never used, and adds responsibilities that sound impressive but never happened. For something as high-stakes as a resume, that's a deal-breaker.
So I built something different.
π Python Resume Generator on GitHub
The Core Problem With AI + Resumes
Most AI resume tools treat the LLM as a content creator. You describe yourself vaguely, the AI fills in the rest β and somewhere in that gap, hallucinations sneak in.
I flipped the model entirely.
In this system, the LLM is a transformer, not an inventor. It can only rephrase, tailor, and optimize content that you have already provided. If it's not in your profile, it cannot appear in your resume. Period.
How It Works
The architecture is built around what I call a source-of-truth pipeline:
Your YAML Profile
β
Job Description (optional)
β
LLM Processing (LangChain + OpenAI / Ollama)
β
Validation Layer β kicks out hallucinated content
β
LaTeX Rendering (Awesome-CV)
β
PDF / DOCX Output
π Your Profile is the Law
Everything starts from a structured YAML file β your single source of truth. Personal details, skills, experience, projects, achievements β all of it lives here.
experience:
- company: Acme Corp
role: Senior Engineer
technologies: [Python, AWS, Kubernetes]
bullets:
- Led migration of monolith to microservices
- Reduced deployment time by 40%
The LLM sees this. It works within it. It cannot add React if you never listed React.
π€ Controlled AI Tailoring
When you provide a job description, LangChain kicks in to:
Reorder and emphasize relevant experience
Rewrite bullets for clarity, impact, and ATS keyword alignment
Optimize phrasing β without inventing a single new fact
The prompts enforce this with explicit constraints: "Do not add technologies not listed. Only rephrase, do not invent."
π‘οΈ Validation Layer
Before anything gets rendered, a validation pass checks the output against your original profile. Unsupported claims? Rejected. New technologies? Flagged. It's guardrails all the way down.
π Beautiful Output via LaTeX
The final resume is rendered through Awesome-CV, a polished LaTeX template trusted by engineers worldwide. The result is a clean, ATS-friendly PDF that looks like it was designed by a professional.
Why This Matters
For job seekers: Your resume stays truthful. You're not gambling your credibility on AI guessing what sounds good.
For engineers: This is a case study in responsible AI integration β using LLMs for what they're genuinely great at (language transformation) while preventing them from doing what they're bad at (staying factual).
For teams: The modular pipeline means you can swap out LLM providers, rendering templates, or validation rules independently.
Tech Stack at a Glance
Layer Technology
βββββββββββββββββββββββββββββββββββββββββ
Language Python
AI Framework LangChain
LLMs OpenAI API / Ollama (local)
Templates LaTeX (Awesome-CV)
Config YAML-driven pipeline
Output PDF, DOCX
This project is actively evolving and the roadmap is ambitious:
π Multi-language resume generation
ποΈ Real-time preview UI
π LinkedIn & job board integrations
π€ Automated job matching + resume generation
π§ Vector-based retrieval for experience selection
π― Fine-tuned models for resume optimization
π Want to Contribute?
This is an open source project and contributions are very welcome β whether you're fixing bugs, adding features, improving docs, or proposing new ideas.
Here's how to get involved:
β Star the repo to show support
π΄ Fork it and explore the codebase
π Open an issue if you find a bug or have a feature idea
π§ Submit a PR β all skill levels welcome
π github.com/mponagandla/Python-Resume-Generator
Final Thoughts
AI is incredibly powerful for language tasks β but power without constraints is just noise. What I wanted to build was a system where AI makes your writing better without compromising your honesty.
The Python Resume Generator is my answer to that challenge. It's opinionated, it's disciplined, and it's designed to grow.
If you've ever wrestled with the AI hallucination problem in a real project β or if you're building your own AI-powered tools β I'd love to hear how you've approached it. Drop a comment below! π
Top comments (0)