- Extract relevant skills and responsibilities from a job description.
- Scan local PDF resumes for matches to those skills.
- Transcribe an interview audio file and analyze whether the interview questions align with the job posting.
- Produce a consolidated report with extracted keywords, resume matches, and interview relevance feedback.
Ensure your environment variables are configured (for example via a
.env file). Set your OpenAI API key at a minimum. Also update RESUME_DIR and INTERVIEW_AUDIO_PATH to match your local filesystem.Table: Tools and Responsibilities
Imports and configuration
Start by loading environment variables and importing required libraries. Adjust imports if your project uses different modules or versions.Tool 1 — Scan resumes for keywords
This tool opens each PDF inRESUME_DIR, searches for each keyword (case-insensitive), and returns matches containing filename, keyword, surrounding snippet, and page number.
- Normalize keywords before searching to improve match quality.
- Consider using more advanced NLP (lemmatization, fuzzy matching) for improved recall.
Tool 2 — Extract keywords from a job description
Use the LLM to extract 10–15 focused skills, tools, and responsibilities. Provide a clear system instruction and parse the model output into a clean list.REST APIs, containerization) to preserve context for resume scanning.
Tool 3 — Transcribe interview audio
Transcribe interviews using OpenAI’s speech-to-text model. This function returns the transcription text extracted from the audio file.Tool 4 — Analyze interview relevance
Compare the transcript against the job description and return a human-readable assessment that highlights areas that were strong, missing, or overemphasized, plus actionable suggestions.strengths, gaps, and recommendations, then parse it programmatically.
Coordinator agent — The AI Recruiter Assistant
Now compose the tools into a coordinator Agent that orchestrates the full workflow. The agent pulls together keyword extraction, resume scanning, transcription, and interview analysis, and returns a consolidated report.@function_tool narrow and focused makes it easy to test, reuse, and replace components (for example, swapping Whisper for another transcription service).
Running the system
Create the job description and set the interview audio path. Update paths and job text to match your use case.Example output (what to expect)
When executed, the agent should produce:- A list of extracted keywords from the job description (10–15 items).
- Resume matches found in your PDF files, each with filename, keyword, snippet, and page number.
- A transcript of the interview audio.
- A detailed analysis explaining which interview questions aligned with the job description and which areas were under- or over-emphasized, including actionable suggestions.
Recap & next steps
- Each
@function_toolacts as a specialized sub-agent (resume scanning, keyword extraction, transcription, interview analysis). - The
Agentobject composes these tools and orchestrates the full pipeline. - Tools are modular and reusable—swap or extend them as needed.
- Improve keyword extraction (synonyms, fuzzy matching, weighted scoring).
- Parse resumes into structured fields (name, email, experience years) for richer filtering.
- Add automated candidate ranking and prioritization.
- Request structured analysis output (JSON) from the LLM for programmatic post-processing.
Links and references
- OpenAI API keys
- OpenAI Speech-to-Text guide
- OpenAI Chat guide
- PyMuPDF (fitz) documentation
- dotenv (python-dotenv)
Be mindful of API usage and costs. Transcribing long audio files and multiple LLM calls can incur charges—batch and rate-limit requests where possible. Also ensure you have consent and comply with relevant privacy requirements when processing candidate data.