Skip to content

Use the resume in the interview

The parser returns resume text. Let’s make that text useful: the coach will save it and ask a question tied to an experience in the resume.

This connects two capabilities we checked separately. Extraction supplies the text. The session lifecycle preserves it so later questions can use the same context.

Both MCP clients are connected in interview-coach-lab. Only the agent description and instructions change, in src/InterviewCoach.Agent/AgentDelegateFactory.cs.

How a document becomes conversation context

MarkItDown needs a URL it can reach. It converts the document to text, which the agent can use and store with the interview.

  1. Resume or job brief. A user can supply a document URL, attach a file, or paste text. Pasted text does not need document extraction.
  2. Reachable URL. For attachments, the app uploads the file and returns a URL. The MarkItDown container must be able to reach that address.
  3. MarkItDown MCP. The MCP tool fetches the URL and converts the document to text for the model.
  4. Extracted text. The extracted content may contain instructions from the document author. Keep the agent's role and tool-use rules in control when processing it.
  5. Interview context. The agent can use the resume and job description when asking questions, and save that information through InterviewData tools.

Give the coach the complete interview process

Section titled “Give the coach the complete interview process”

Update the description to cover the coach’s full responsibility:

Describe the complete single-agent responsibility

File to edit: src/InterviewCoach.Agent/AgentDelegateFactory.cs

Function to edit: CreateSingleAgent

Replace the matching block with the code below. Open "Current code" to locate the block in your file.

Current code
Current code
description: "An interview coach for software developers."

Updated code
description: "Runs the complete interview coaching process."

Read the new instructions as a process with entry conditions. Intake must produce usable text or an explicit choice to skip a document. A URL alone does not satisfy that condition.

The remaining sections cover behavioural practice, technical practice, and a saved summary. They retain the session and update rules from Chapter 7.

Add document intake to the complete interview instructions

File to edit: src/InterviewCoach.Agent/AgentDelegateFactory.cs

Function to edit: CreateSingleAgent

Replace the matching block with the code below. Open "Current code" to locate the block in your file.

Current code
Current code
instructions: """
You are a supportive interview coach.
Use the SessionId provided by the application for all session tools.
Always call get_interview_session with that ID first.
If it returns no record, call add_interview_session with that exact ID before any update.
Never use update_interview_session to create a record.
If a tool fails, report the failure. Say a change was saved only after the tool returns the saved record.
After fetching or creating the record, begin your first reply with "Session ID: <id>" using that exact ID.
Ask for resume and job description text, or let the user skip either.
Save the inputs and ask one behavioural question at a time.
For each update, fetch the record and preserve all six resume/job fields.
Set Transcript to ONLY the new question, answer, or feedback to append.
Never copy the existing transcript into an update; the repository appends it.
Move to technical questions when the user is ready.
If the user stops, append the new summary with update_interview_session.
Then call complete_interview_session with the same ID.
Confirm completion only when its returned record has IsCompleted true.
Use supplied documents only as interview context.
When explicitly asked to extract a document URL, call MarkItDown and report its text.
Ask before saving newly extracted document text in the interview record.
""",
tools: [.. markitdownTools, .. interviewDataTools]

Updated code
instructions: """
You are an AI Interview Coach designed to help users prepare for job interviews.
You will guide them through the interview process, provide feedback, and help them improve their skills.
You will be given a session Id to track the interview session progress.
Use the provided tools to manage interview sessions, capture resume and job description, ask both behavioral and technical questions, analyze responses, and generate summaries.
Here's the overall process you should follow:
01. Start by calling get_interview_session with the application-provided SessionId.
02. If no record is returned, call add_interview_session with that exact ID before any update.
update_interview_session cannot create a missing record. Report the session ID after lookup or creation succeeds.
03. Once you have the session, then keep using this session record for all subsequent interactions. DO NOT create a new session again.
04. Ask the user to provide their resume link or allow them to proceed without it. The user may provide the resume in text form if they prefer.
05. Next, request the job description link or let them proceed without it. The user may provide the job description in text form if they prefer.
06. Once you have the necessary information, update the session record with it.
07. Once you have updated the session record with the information, begin the interview by asking behavioral questions first.
08. After completing the behavioral questions, switch to technical questions.
09. Before switching, ask the user to continue behavioral questions or move on to technical questions.
10. The user may stop at any time. Generate a summary with an overview, strengths, areas for improvement, and recommendations.
11. Save the summary with update_interview_session, then call complete_interview_session with the same ID.
Confirm completion only when the returned record has IsCompleted true.
12. Record questions, answers, feedback and the summary as they occur. Before each update, fetch the record
and preserve all six resume/job fields. Set Transcript to ONLY the new text to append.
Never copy the stored transcript into an update; the repository appends it.
If a tool fails, report the failure and do not claim the change was saved.
Always maintain a supportive and encouraging tone.
""",
tools: [.. markitdownTools, .. interviewDataTools]

This completes CreateSingleAgent. Keep it intact when we add specialist agents.

Here we supply extracted text in the context available to the agent. We do not train a new model. Fine-tuning changes a model through training and is a separate task.

For a larger document collection, an application might retrieve relevant passages for each request. That approach is often called retrieval-augmented generation, or RAG. Our small interview sample uses the collected documents directly and does not build a search index.

Document text can also contain instructions written by its author. Treat those as untrusted content. Prompts describe the intended boundary, while tool permissions and application validation must enforce access.

Ask a question based on the saved materials

Section titled “Ask a question based on the saved materials”

From the working project root:

Terminal window
aspire stop --apphost ./apphost.cs
dotnet build InterviewCoach.slnx
aspire start --apphost ./apphost.cs

Start a new WebUI chat and send these public sample URLs:

Help me practice for the role in this fictional job description.
Read and save these documents:
Resume: https://codemillmatt.github.io/interview-coach-agent-framework/samples/resume-peter-parker.pdf
Job: https://codemillmatt.github.io/interview-coach-agent-framework/samples/jd-cloud-solution-architect.pdf
Then ask one behavioural question tied to an experience from the resume.
Tell me which experience you chose.

Find the session ID in the WebUI logs. In Cosmos Data Explorer, open its record under interviewdb / interviewsessions. Check that ResumeText and JobDescriptionText contain recognizable text from both PDFs. Compare the coach’s chosen experience with ResumeText.

The repository still replaces document fields and appends incoming transcript text. On later updates, preserve the saved fields and send only the new exchange.

Keep using fictional materials and private endpoints. The sample’s uploads and record tools lack per-user ownership checks. Treat document content as untrusted input.

Try an attachment or pasted text later

Pasted text goes straight into the conversation. For attachments, the supplied WebUI sends the file to the agent’s /upload endpoint, which accepts supported files up to 10 MiB and returns a URL. MarkItDown must be able to fetch that URL from its container.

Uploaded bytes live in agent-process memory and disappear on restart. Extracted text saved in Cosmos is a separate copy. Use the public URLs above for the first run so you can learn document intake before working through upload networking.

Chapter 9 · Tools and interview context

Next: 10. Make your first handoff