A reinforcement learning proof of concept for detecting expertise inflation in technical candidate screening.
Traditional hiring often assumes that correct answers imply real expertise.
That assumption is weaker now.
With modern LLMs, candidates can generate polished answers and credible-looking profiles without having operated real systems in production. The failure mode is often not factual incorrectness, but surface-level correctness without operational depth.
This project explores a different framing for that problem:
instead of asking only whether a candidate looks suspicious, ask what the best next investigative action is to reduce uncertainty.
The result is a simplified environment where an agent learns when to:
- pass a candidate
- flag a candidate
- escalate to manual review
- investigate further through deeper technical probing or web validation
Correctness alone is no longer a reliable proxy for experience.
In practice, stronger candidates tend to expose:
- constraints
- trade-offs
- failure modes
- debugging paths
- operational details
more consistently under deeper questioning.
By contrast, LLM-assisted or overstated expertise often appears as:
- polished but generic answers
- weak linkage between claims and examples
- inconsistent depth across related topics
- poor external evidence relative to claimed experience
This project models that process as a sequential decision problem.
A static classifier can score a candidate as suspicious or not suspicious.
But real interview workflows are sequential. A strong interviewer does not only classify — they decide what to do next:
- ask a deeper question
- verify externally
- escalate ambiguity
- stop early when confidence is high
That makes RL a reasonable fit for the proof of concept.
The goal here is not to claim that RL is the only valid approach.
The goal is to show that candidate verification can be framed as a policy problem, not only a binary classification problem.
The repository includes a custom Gymnasium environment:
KnowledgeIntegrityEnv
Each episode simulates the evaluation of one synthetic candidate.
The synthetic environment uses three classes:
legitfraudgray
These labels act as the controlled ground truth for the prototype.
The environment encodes each step as a fixed-size feature vector with 10 values:
- Profile Delta — suspicious career inflation over time
- Scar Score — evidence of operational detail
- Genericity Score — broad, polished, low-specificity phrasing
- Consistency Score — alignment between profile claims and answers
- Web Signals Score — contradiction between claims and public evidence
- Volatility — disagreement between signals
- Fraud Score — aggregated suspicion score
- Question Ratio — how far the interaction has progressed
- Last Action Encoding — normalized representation of prior action
- Uncertainty — confidence-adjusted ambiguity estimate
The agent can choose among:
ASK_BROAD_RAGASK_DEEP_RAGASK_BROAD_INFRAASK_DEEP_INFRAASK_BROAD_AUTOMATIONASK_DEEP_AUTOMATIONCHECK_PROFILECHECK_WEBPASSFLAGESCALATE
The core idea is that the system does not immediately jump to a final label.
It can investigate first.
The reward function is designed around three goals:
- correctly identify strong fraud indicators
- avoid unnecessary false positives on legitimate candidates
- encourage useful intermediate investigation before final decisions
- Investigative actions such as
ASK_*,CHECK_PROFILE, andCHECK_WEBreceive positive reward when uncertainty is high FLAGis strongly rewarded for fraud and penalized for legit candidatesPASSis rewarded for legit candidates and penalized for fraudESCALATEis treated as a useful fallback for ambiguous gray-zone profiles- long investigations are mildly penalized to avoid wasteful policies
This makes the policy trade off:
- decision quality
- uncertainty reduction
- manual review burden
- investigation cost
The prototype focuses on a small set of interpretable signals rather than a large set of noisy features.
Profile Delta
- timeline anomalies
- title inflation
- compressed experience progression
Operational "Scar" Signals
- mentions of concrete implementation details such as:
- chunking
- reranking
- latency
- retries
- race conditions
- idempotency
- queues
- rollback
Genericity Signals
- polished but low-information language such as:
- "best practices"
- "robust"
- "scalable"
- "high quality"
- "operational excellence"
Consistency Signals
- overlap between claimed tools and response content
- alignment between claimed experience and operational depth
Web Signals
- mocked proxies for:
- GitHub activity
- public presence
- temporal coherence of external evidence
This first version intentionally uses interpretable and partially hand-crafted features.
That is a limitation, but also a deliberate trade-off:
- easier to debug
- easier to explain
- better for validating the policy framing early
A more advanced version would move toward semantic consistency models and richer evidence graphs.
The environment builds an aggregate suspicion score:
fraud_score = (
0.30 * profile_delta
+ 0.25 * genericity
+ 0.20 * web_score
+ 0.10 * volatility
- 0.10 * scar
- 0.15 * consistency
)- Higher score -> stronger fraud indicators
- Lower score -> stronger evidence of legitimate expertise
This is not intended as a production fraud score.
It is an interpretable internal signal for the RL environment.
The repository contains two agents:
A rules-based policy that:
- investigates early when evidence is mixed
- flags strong fraud-like patterns
- passes strong legit-like patterns
- escalates remaining ambiguity
A Deep Q-Network trained to optimize reward over repeated episodes.
The DQN is not presented as a magical fraud detector.
Its role is to learn whether a more adaptive policy can outperform a fixed heuristic on the same environment.
The evaluation compares the heuristic baseline and the trained DQN over repeated seeded episodes.
The evaluation script reports:
- average reward
- average steps to decision
- legit pass rate
- fraud flag rate
- gray investigate rate
- false pass rate for fraud
- false flag rate for legit
- legit escalate rate
- decision counts by label
This is more useful than reward alone because the real trade-offs are:
- catching fraud
- not harming legitimate candidates
- not overloading manual review
src/kie/
agent.py
dqn_agent.py
environment.py
scoring.py
profile_delta.py
web_signals.py
question_bank.py
simulator.py
data/
synthetic_candidates.json
artifacts/
training_metrics.json
eval_results.json
dqn_q_net.pth
dqn_target_net.pth
run_demo.py
train_dqn.py
evaluate_agents.py
requirements.txt
README.md
pip install -r requirements.txtpython train_dqn.pyThis generates:
artifacts/training_metrics.jsonartifacts/dqn_q_net.pthartifacts/dqn_target_net.pthartifacts/training_curve.pngif matplotlib is available
python run_demo.pyThis shows:
- heuristic decisions
- trained DQN decisions
- short natural-language explanations
python evaluate_agents.pyThis generates:
artifacts/eval_results.json
pytest -qThis repository uses:
- a single canonical environment:
KnowledgeIntegrityEnv - fixed seeds in training and evaluation
- synthetic candidate data under
src/kie/data
To reproduce the main artifacts:
python train_dqn.py
python evaluate_agents.pyA common behavior pattern is:
fraud -> FLAG
gray -> CHECK_WEB / ASK_DEEP_RAG / ESCALATE
legit -> PASS
The baseline tends to use more generic escalation.
The trained policy can learn more targeted intermediate actions before reaching a final decision.
That is the main point of the prototype.
For this proof of concept, ground truth is synthetic and controlled.
That is acceptable for a coding exercise, but obviously weaker than real deployment data.
In a more realistic system, ground truth would likely need to combine:
- expert adjudication
- disagreement-aware labeling
- paired interview outcomes
- delayed validation from technical assessments
- weak supervision from external evidence
This repository does not solve that problem fully.
It only demonstrates the policy-learning framing in a controlled setup.
This project is intentionally simplified.
Current limitations include:
- synthetic candidate data
- hand-crafted feature logic
- mocked web evidence
- small state space
- no true semantic reasoning model
- no train/eval split across richer adversarial distributions
- no live interview multimodal signals yet
So the correct interpretation is:
this is a controlled RL proof of concept for adaptive expertise verification, not a production-ready fraud detection system
A realistic live version could extend the state space with multimodal cues from:
- eye movement patterns
- repeated off-screen glances
- reading behavior
- abnormal hesitation before technical answers
- answer latency
- pacing shifts
- prosody disruption
- abrupt confidence collapse under deeper probing
- tab switching
- clipboard behavior
- window focus changes
- suspicious timing correlations with answer quality
In that version, the policy could decide whether to:
- continue current topic
- deepen the question
- switch topic
- request implementation detail
- trigger silent risk accumulation
- escalate to live reviewer
- stop early when evidence is strong
That would turn the agent into a real-time interview strategy layer rather than only an offline evaluator.
The main value of this project is not high benchmark performance.
The main value is the modeling choice:
- treat expertise verification as a sequential decision process
- optimize investigation strategy, not only final classification
- keep the signal set small and interpretable
- surface trade-offs between fraud detection, false positives, and review cost
That is the core thesis.
Potential next steps:
- add richer synthetic and adversarial candidate profiles
- improve train/eval separation
- replace lexical features with semantic consistency features
- add cross-answer consistency scoring
- calibrate reward weights more systematically
- integrate real external evidence sources
- simulate live multimodal interview signals
- add model interpretability outputs per action
A classifier can estimate whether a candidate is suspicious.
But it cannot decide:
- whether more evidence is needed
- which signal to probe next
- when to stop early
- when to escalate safely
This problem is inherently sequential and cost-sensitive.
The goal is not only to predict fraud, but to optimize the investigation process under uncertainty.
The latest evaluation compares the heuristic baseline against the trained DQN policy.
| Metric | Heuristic | DQN |
|---|---|---|
| Avg Reward | 1.869 | 2.503 |
| Avg Steps | 3.0 | 4.14 |
| Legit Pass Rate | 0.47 | 1.00 |
| Fraud Flag Rate | 1.00 | 1.00 |
| False Pass Fraud | 0.00 | 0.00 |
| False Flag Legit | 0.00 | 0.00 |
- Reduces unnecessary escalation of legitimate candidates
- Performs deeper investigation before flagging gray cases
- Adapts investigation strategy instead of fixed rules
- The DQN significantly improves handling of legitimate candidates (100% pass rate)
- It maintains perfect fraud detection
- It uses slightly more steps, indicating deeper investigation
- It reduces unnecessary escalation for legit candidates
This suggests the learned policy improves decision quality under uncertainty, not just reward.
Raoni Medeiros
AI Automation & Systems Engineer