Setting Up a Two-Stage AI Prompt Pipeline to Prevent Resume Hallucinations

Ads

When you give an LLM a messy paragraph of project notes and instruct it to rewrite this into three polished, metrics-driven resume bullets, you are asking it to perform three complex operations simultaneously: parsing facts, inventing missing context, and generating executive prose. This cognitive overload is why single-prompt resume rewrites almost always invent fake percentages and exaggerated responsibilities.

The engineering solution is prompt chaining: separating extraction from styling. By running a two-stage pipeline where Stage 1 locks down the verifiable facts into a structured JSON schema, Stage 2 is mathematically constrained to work only with truth.

Why Single Prompts Cause Hallucinations

In a standard single-pass prompt, the language model generates tokens sequentially based on probability. If your raw note says Worked on customer login speed, the model knows a high-quality resume bullet needs a metric. Because no number exists in your prompt, the model samples from its training set of professional resumes and inserts improved load times by 42%.

Once the number is generated, the model treats it as factual context for subsequent tokens. You are left with a polished bullet that you cannot defend in an interview. Splitting extraction and composition eliminates this failure mode.

Stage 1: The Extraction Prompt

The first stage acts as a data parser. It takes messy notes and converts them into a strict JSON object. If a metric or tool is missing, it must output null rather than guessing.

Prompt 1 (Extractor):

Analyze the raw project notes below. Extract all verifiable facts into this exact JSON schema. Do not extrapolate, infer, or embellish. If a field is not explicitly mentioned, enter null.

{
  "action_taken": "string",
  "tools_and_languages": ["string"],
  "measured_impact": "string or null",
  "team_scope": "string or null"
}

[Raw Project Notes]

Paste your unedited notes, commit summaries, or ticket logs here.

Stage 2: The Constrained Rewriter Prompt

Once the model returns the JSON object, review it quickly. Fill in any null values manually if you remember the true numbers, or leave them empty. Then feed that validated JSON into the second prompt.

Prompt 2 (Rewriter):

You are an executive resume writer. Transform the following validated JSON data into two concise, high-impact resume bullets following the Action + Context + Outcome framework.

Strict Constraints:

[Validated JSON Input]

Paste the output from Stage 1 here.

Verifying the Final Bullets

Because Stage 2 was strictly bound to the JSON keys, the resulting bullet points remain completely defensible. When an interviewer asks, How did you measure this deliverable?, you will have the raw project documentation to back up every word on your resume.

FAQ

Can I automate this two-stage pipeline with scripts?

Yes. You can wire these two prompts together using simple Python scripts with OpenAI, Anthropic, or local Ollama API endpoints, passing the JSON output of function one directly into function two.

What if my raw notes have zero metrics?

That is completely acceptable. The pipeline will recognize the null metric field and draft a bullet focused on the technical complexity, architectural handoff, or operational volume instead of generating a fictitious metric.

Why use JSON instead of a standard bulleted list for Stage 1?

JSON enforces structural syntax. Models are significantly less likely to drift into creative prose when required to produce valid JSON keys and arrays.

Key takeaways

Related reading

Featured Topics