Case index
Case File 001Status: Closed2024

QFix Resume Tailor — Single-Page LLM Resume Compiler

A multi-stage LLM layout compiler that guarantees strict single-page PDF resume outputs.

Layout guarantee
Strict 1-Page

Enforced via pdf-parse page counting and scaling.

Memory footprint
< 2GB

Optimized serverless Puppeteer using @sparticuz/chromium.

Parsing engine
LaTeX to HTML

Direct regex parser for resume.cls structures.

Opening brief

LLM-generated resumes frequently spill onto multi-page PDF outputs, breaking strict single-page hiring constraints.

Outcome on record

Achieved guaranteed single-page PDF output using pdf-parse page counting, custom regex LaTeX-to-HTML parser, and Vercel serverless Puppeteer pipeline.

Exhibit A

Project description

Filed statement

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.

Exhibit B

Why I built this

Filed statement

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.

Exhibit C

Process and execution

Approach

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)
Responsibilities

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.
Exhibit D

Notable decisions

Decision

Strict layout constraint compiler

Enforced 1-page limits using dynamic CSS scaling and LLM shortening triggers when pdf-parse detects > 1 page.

Decision

LaTeX-to-HTML regex parser

Converted LaTeX resume.cls structures into semantic HTML directly, eliminating the overhead of full LaTeX compilers.

Exhibit E

What I learned from this

Filed statement

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.