How farishana/smart-talent-engine works
1. What this system is
- Smart Talent Engine is an AI-assisted resume screening platform that turns uploaded resumes and job descriptions into structured candidate profiles, then ranks candidates with an explainable hybrid pipeline.
- The main architectural split is backend AI/decision services and frontend review/analysis UI.
2. Backend entry point and API boundary
- backend/main.py is the FastAPI entry point and likely exposes the upload, candidate, ranking, comparison, and explanation endpoints used by the UI.
- The backend is the orchestration layer: it receives raw documents, invokes extraction and matching services, persists results, and returns scored candidates plus decision traces.
3. Document intake and parsing
- Resume and job-description text flow through backend/extractor.py, backend/llm_extractor.py, and backend/jd_parser.py.
- The parser/extractor layer is responsible for turning unstructured inputs such as .docx resumes into normalized candidate/job data before any ranking occurs.
4. LLM-assisted extraction with guardrails
- backend/llm_extractor.py uses Gemini 1.5 Flash, as indicated in the README, to extract verified skills and seniority signals.
- This is not a free-form generation step; extracted claims are later checked against the deterministic skill knowledge layer so the system can reject hallucinated skills.
5. Deterministic skill graph as the trust boundary
- backend/skill_graph.json is the canonical knowledge source for skill relationships.
- backend/alias_matcher.py and related matching logic verify aliases and inferred relationships, so the system can treat “React” as evidence for “JavaScript” or related concepts only when the graph supports it.
- This graph is the architectural guardrail between probabilistic LLM output and final scoring.
6. Semantic retrieval layer
- backend/vector_store.py and backend/reranker.py implement the candidate filtering stage using SentenceTransformer embeddings and ChromaDB nearest-neighbor search, as described in the README.
- This layer narrows the candidate pool based on semantic similarity before deterministic scoring and explanation generation.
7. Scoring and ranking pipeline
- backend/scorer.py, backend/classifier.py, backend/matcher.py, and backend/trajectory.py appear to form the core ranking engine.
- The system likely combines multiple signals: skill match quality, inferred seniority, domain alignment, and career trajectory.
- backend/hidden_gem.py suggests a specific uplift mechanism for non-obvious but promising candidates, which is surfaced in the UI as a “Hidden Gem” concept.
8. Explainability and decision trace
- backend/explainer.py is the reporting layer that turns internal scoring steps into human-readable reasoning.
- The README’s “AI Decision Trace” implies the architecture records why a candidate matched, what evidence was used, and how the score was computed, rather than exposing only a final rank.
9. Persistence and local state
- backend/database.py and backend/models.py define the structured storage layer, likely backed by the local SQLite database file backend/smart_talent.db.
- This persistence layer stores candidates, extracted entities, rankings, and possibly historical runs so the dashboard can reload previously processed data without re-running the entire AI pipeline.
10. Backend runtime dependencies
- The backend depends on FastAPI for serving, Pydantic-style data modeling, aiosqlite for local storage, ChromaDB for vector retrieval, SentenceTransformers for embeddings, and Gemini via external API key.
- These technologies shape the architecture: there is a clear split between deterministic local processing and remote LLM enrichment.
11. Frontend presentation layer
- The React/Vite frontend in frontend/src is organized around screens such as Upload, Dashboard, Ranking, Comparison, and CandidateDetail.
- Components like RadarChart, MatchMap, JobCard, CandidateRow, and HiddenGemBadge visualize ranking rationale, skill overlap, and candidate quality signals rather than just lists of names.
12. End-to-end data flow
- The primary flow is: upload resume/job description → parse and extract → LLM-assisted skill/seniority extraction → verify against skill graph → embed and retrieve semantically similar candidates → rerank and score → generate explanation/trajectory → persist results → render in the UI.
- This makes the system a pipeline, not a single model call: each stage adds structure, reduces noise, and increases explainability.
13. Artifacts and test surface
- Test files such as test_extractor.py, test_aliases.py, and test_fresher_uplift.py indicate that extraction correctness, alias/graph resolution, and candidate uplift logic are important behavior boundaries.
- Supporting files like create_test_resume.py and farisha_resume.docx suggest the repo includes sample input generation for validating the pipeline.
14. How to draw the diagram
- The main boxes should be: Frontend UI, FastAPI backend orchestrator, Extraction/LLM service, Skill graph verifier, Vector search + reranker, Scoring/trajectory/explainer, and SQLite persistence.
- The only external service that materially affects the architecture is the Gemini API; the rest is local processing with a knowledge-graph guardrail and a semantic retrieval stage.
Main entry points: api.js API client · App.jsx App shell · main.py API server · scorer.py Scoring
Components 22
Frontend UI
React/Vite review and comparison interface
- App shell · Top-level UI composition and route wiring
frontend/src/App.jsx - Upload · Entry screen for resumes and job descriptions
frontend/src/pages/Upload.jsx - Dashboard · Overview of processed candidates and results
frontend/src/pages/Dashboard.jsx - Ranking · Ranked candidate list and scoring views
frontend/src/pages/Ranking.jsx - Comparison · Side-by-side candidate comparison view
frontend/src/pages/Comparison.jsx - Candidate detail · Single candidate drill-down and explanation view
frontend/src/pages/CandidateDetail.jsx - API client · Frontend-to-backend request layer
frontend/src/api.js
Backend Engine
FastAPI orchestration, extraction, ranking, and persistence
- API server · HTTP boundary for uploads, ranking, comparison, and explanation
backend/main.py - Extraction · Document and job-description normalization
backend/extractor.py - LLM extractor · LLM-assisted skill and seniority extraction with guardrails
backend/llm_extractor.py - JD parser · Normalizes job descriptions into structured requirements
backend/jd_parser.py - Alias matcher · Resolves aliases and validates inferred skill relationships
backend/alias_matcher.py - Vector search · Embedding-based candidate retrieval over the local index
backend/vector_store.py - Reranker · Refines retrieval results before scoring
backend/reranker.py - Scoring · Combines match quality, seniority, trajectory, and uplift signals
backend/scorer.py - Hidden gem · Boosts promising non-obvious candidates
backend/hidden_gem.py - Trajectory · Analyzes career progression and growth patterns
backend/trajectory.py - Explainer · Produces human-readable reasoning and evidence summaries
backend/explainer.py - Models · Structured data models for persisted and exchanged entities
backend/models.py
Data Store
Local knowledge and persistence assets
- Skill graph · Canonical skill and alias relationships used for verification
backend/skill_graph.json - Database · Local storage for candidates, runs, and results
backend/database.py
External Services
Remote AI services used by the backend
- Gemini API · Remote LLM service used for extraction enrichment
Connections 26
- App shell → Upload: routes · App shell exposes the upload flow
- App shell → Dashboard: routes · App shell exposes the results dashboard
- App shell → Ranking: routes · App shell exposes ranking views
- App shell → Comparison: routes · App shell exposes comparison views
- App shell → Candidate detail: routes · App shell exposes candidate detail views
- Upload → API client: calls · Upload screen submits documents and job data
- Dashboard → API client: calls · Dashboard fetches processed run data
- Ranking → API client: calls · Ranking screen requests scored candidates
- Comparison → API client: calls · Comparison screen requests candidate pairs
- Candidate detail → API client: calls · Detail screen requests candidate explanations
- API client → API server: HTTP · Frontend talks to the FastAPI backend
- API server → Extraction: orchestrates · API server triggers document parsing
- API server → JD parser: orchestrates · API server triggers job-description parsing
- Extraction → LLM extractor: enriches · Extraction layer uses LLM-assisted enrichment
- LLM extractor → Gemini API: remote call · LLM extraction relies on Gemini
- LLM extractor → Skill graph: verifies · Extracted claims are checked against the skill graph
- JD parser → Skill graph: normalizes · Job requirements are mapped through canonical skills
- Skill graph → Alias matcher: supports · Knowledge graph enables alias and relation checks
- API server → Vector search: retrieves · Backend initiates semantic candidate search
- Vector search → Reranker: feeds · Nearest-neighbor results are refined
- Reranker → Scoring: feeds · Reranked candidates enter scoring
- Scoring → Hidden gem: uplift · Hidden-gem logic adjusts promising candidates
- Scoring → Trajectory: uses · Trajectory signals contribute to ranking
- Scoring → Explainer: explains · Scoring outputs are turned into decision traces
- API server → Database: persists · API layer stores runs and outcomes
- Database → Models: uses · Persistence relies on shared data models