Keeping an LLM from fabricating CV details with a strict schema and validation

The author is building Cveelo, a tool that converts a CV into a portfolio website, and needed to stop the AI from inventing credentials. The model's only job is to extract information from the CV into a typed profile, while design and achievement wording are handled manually. Every optional field is nullable so that missing data is reported rather than guessed. Extracted output is validated with Zod, retried once on failure, and rejected if it still fails, so unvalidated data is never saved. The author also guards against prompt injection inside CVs and detects scanned PDFs with no text layer, while keeping contact details out of the decision and analytics layers.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in