Skip to content

About

AI面试辅助系统

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

MirrorMind: A Dual-Agent Interview Simulator Powered by LLMs

MirrorMind is a dual-agent LLM-powered framework that simulates dynamic, multi-turn interview interactions through resume parsing, context-aware generation, and automated evaluation.

MirrorMind Demo

Important: All required models (e.g., DeepSeek-R1-Distill-Qwen-14B, gte-qwen-1.5) must be downloaded manually to the specified cache_dir before running. The evaluation script (05_Evaluation.py) also requires a valid DeepSeek API key to function correctly. Please update the corresponding variable in the code (DEEPSEEK_API_KEY) prior to execution.


Overview of Files and Functions

Script File Role Description
01_OCR_extract_1.py Extracts raw and cleaned text from resume PDFs using OCR, saves to ./CV/
02_LLM_infer_1.py Uses local LLM to structure cleaned resume text (*_cleaned.txt) into JSON
03_MAIN_1.py Combines OCR + structuring into one integrated pipeline from PDF to JSON
04_MaterialsGen_1Model.py Performs 10-round dual-agent RAG-enhanced interview simulation using CV.json and require.txt
05_Evaluation.py Uses LLM API to perform multidimensional evaluation of dialogue in chat.txt

Processing Pipeline & I/O Logic

./CV/
├── 1.pdf                  ← Input: Resume PDF
├── 1.txt                  ← OCR raw output
├── 1_cleaned.txt          ← Cleaned lines for LLM structuring
├── 1RESULT.txt            ← Output: Resume info in JSON format
./Recordings/
├── CV.json                ← Resume structuring result
├── require.txt            ← Job description
chat.txt                   ← Chat history (for evaluation)
entire.txt                 ← Full model output logs
monitor.txt                ← Resource usage logs

Environment Requirements

  • Python 3.8+
  • Dependencies:
    pip install torch transformers openai pynvml pytesseract pdf2image opencv-python scikit-learn

Step 1: OCR Extraction

Extract resume text from PDF using OCR and text cleaning.

Execution Script

python 01_OCR_extract_1.py

Input

./CV/YourResume.pdf

Output

./CV/YourResume.txt → → → Raw OCR text output

./CV/YourResume_cleaned.txt → → → Cleaned lines used for LLM structuring

Tools / Models Used

  • Tesseract OCR via pytesseract
  • pdf2image for PDF-to-image conversion
  • OpenCV (cv2) for grayscale processing

Step 2: LLM-driven Structuring

Use a local large language model (LLM) to extract and structure key resume information into JSON format.

Execution Script

python 02_LLM_infer_1.py

Input

./CV/YourResume_cleaned.txt

Output

./CV/YourResumeRESULT.txt → → → Resume structuring result

./Recordings/CV.json → → → Resume structuring result from combined script 03_MAIN_1.py

Tools / Models Used

  • THUDM/glm-4-9b-chat-hf
  • PyTorch (CUDA enabled)

Step 3: RAG-enhanced Dual-Agent Simulation

Simulate a 10-round interview between an LLM-powered interviewer and interviewee using structured resume data and job descriptions. The system leverages retrieval-augmented generation (RAG) to enhance context relevance.

Execution Script

python 04_MaterialsGen_1Model.py

Input

./Recordings/CV.json → → → Structured resume (from Step 2)

./Recordings/require.txt → → → Job description text

Output

chat.txt → → → Final 10-round interactions (for evaluation)

entire.txt → → → Raw prompt + LLM response logs

monitor.txt → → → System resource usage per stage

Tools / Models Used

  • deepseek-ai/DeepSeek-R1-Distill-Qwen-14B (LLM for roles)
  • thenlper/gte-qwen-1.5-7b-instruct (retriever model for RAG)
  • cosine_similarity from scikit-learn for vector matching
  • Resource monitor: psutil, torch.cuda, datetime

Step 4: Qualitative Evaluation via LLM Judge

Automatically evaluate the most recent multi-turn interview session from chat.txt using an LLM-based qualitative assessment framework. The evaluator provides feedback across realism, question quality, answer quality, and overall performance.

Execution Script

python 05_Evaluation.py

Input

chat.txt  → → → Multi-turn interview interactions generated from Step 3

Output

Console Output → → → JSON-formatted evaluation result

Tools / Models Used

  • DeepSeek Reasoner API (deepseek-reasoner)
  • OpenAI-compatible Python SDK (openai)

About

AI面试辅助系统

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages