QFix Resume Tailor — Single-Page LLM Resume Compiler
A multi-stage LLM layout compiler that guarantees strict single-page PDF resume outputs.
Enforced via pdf-parse page counting and scaling.
Optimized serverless Puppeteer using @sparticuz/chromium.
Direct regex parser for resume.cls structures.
LLM-generated resumes frequently spill onto multi-page PDF outputs, breaking strict single-page hiring constraints.
Achieved guaranteed single-page PDF output using pdf-parse page counting, custom regex LaTeX-to-HTML parser, and Vercel serverless Puppeteer pipeline.
Project description
QFix Resume Tailor addresses non-deterministic LLM output lengths by introducing a closed-loop layout compiler that counts generated PDF pages using pdf-parse.
If page count exceeds one, the system triggers aggressive LLM shortening and applies CSS scaling factors (0.92 ratio) until a single-page output is strictly met.
Features a custom regex LaTeX-to-HTML parser matching resume.cls structures and a serverless Puppeteer pipeline on Vercel under 2GB RAM limits.
Why I built this
Job applicants struggle when AI resume builders produce multi-page PDFs that violate 1-page recruitment guidelines.
Built to demonstrate how deterministic layout compilers and retry mechanisms can tame non-deterministic LLM outputs.
Process and execution
How the work moved
- Engineered multi-stage layout compiler with page counting via pdf-parse and scale factor adjustments (0.92 ratio)
- Built regex-driven parsing layer in TypeScript converting complex LaTeX resume templates into compliant HTML
- Configured serverless PDF generation using puppeteer-core and @sparticuz/chromium under 2GB RAM limit
- Integrated Gemini 2.5 Flash with LangChain using custom exponential backoff & retry handling for rate limits (HTTP 429)
What I owned
- Led the work as Lead Architect & Developer.
- Turned messy context into a clearer operating model, interaction direction, and rollout shape.
- Worked across stakeholders to move the project from framing into execution.
Notable decisions
Strict layout constraint compiler
Enforced 1-page limits using dynamic CSS scaling and LLM shortening triggers when pdf-parse detects > 1 page.
LaTeX-to-HTML regex parser
Converted LaTeX resume.cls structures into semantic HTML directly, eliminating the overhead of full LaTeX compilers.
What I learned from this
Regex parsers can bypass full LaTeX compiler overhead when converting structured templates to semantic HTML.
Exponential backoff and rate-limit handling are essential for serverless LLM pipelines.