TalentSync

AI resume builder and ATS optimizer for job seekers. Tailored resumes, outreach, and interview prep from one profile.

Resume analysis API

Resume analysis HTTP API: upload, text analysis, and batch processing under the FastAPI resume routes.

  • File upload endpoints for resume processing
  • Text-based analysis endpoints
  • Batch processing capabilities
  • Structured schemas for resume data extraction, skill identification, experience parsing, and education validation
  • Enrichment endpoints for adding missing information, improvement suggestions, and tailored resume generation
  • The NLP processing pipeline, entity recognition, and structured output formats
  • Practical examples of resume analysis workflows, error handling for malformed inputs, and performance considerations for large files

Repository layout#

The resume analysis feature is implemented as part of a FastAPI backend. Key components include:

  • Routers that define API endpoints for file-based and text-based analysis
  • Services that orchestrate document processing, LLM-based extraction, and validation
  • Models that define request/response schemas for structured outputs
  • Utilities for document conversion and LLM prompt chains

Building blocks#

  • File-based resume analysis endpoint: Accepts a resume file and returns structured data via LLM extraction and validation.
  • Text-based resume analysis endpoint: Accepts pre-formatted text and returns detailed analysis.
  • Detailed analysis service: Extracts skills, languages, education, experience, projects, and more.
  • Enrichment endpoints: Analyze, improve, refine, regenerate, and apply improvements to resume data.
  • Tailored resume generation: Aligns resume content with a target job role and optional context.
  • Data processors: Handle document conversion, text formatting, JSON extraction, and LLM prompt chains.
  • Schemas: Define typed request/response models for typed API contracts.

How it fits together#

The system follows a layered architecture:

  • Presentation layer: FastAPI routers expose endpoints for file and text-based analysis, enrichment, improvement, and tailored resume generation.
  • Application layer: Services coordinate document processing, LLM interactions, and data validation.
  • Domain models: Pydantic models define request/response schemas for typed APIs.
  • Utility layer: Document conversion and LLM prompt chains encapsulate NLP processing.

File-Based resume analysis#

Endpoints:

  • POST /api/v1/resume/analysis
  • POST /api/v2/resume/format-and-analyze
  • POST /api/v2/resume/analysis

Processing flow:

  • Reads uploaded file bytes and writes to a temporary location
  • Converts document to text using document processing utilities
  • Validates text as a resume
  • Extracts and normalizes structured data using LLM-based JSON formatter
  • Applies filtering for experience and project entries
  • Returns typed response with cleaned data dictionary

Text-Based resume analysis#

Endpoints:

  • POST /api/v2/resume/format-and-analyze
  • POST /api/v2/resume/analysis

Processing flow:

  • Accepts pre-formatted text
  • Formats and analyzes using unified LLM chain
  • Returns detailed analysis data

Detailed analysis pipeline#

The detailed analysis extracts:

  • Skills with proficiency percentages
  • Languages
  • Education entries
  • Work experience with bullet points
  • Projects with technologies and links
  • Publications, certifications, achievements
  • Personal identifiers (name, email, contact, social links)
  • Predicted field

Resume enrichment endpoints#

Capabilities:

  • Analyze resume items for enrichment
  • Generate improved descriptions
  • Refine rejected enhancements
  • Apply enhancements
  • Regenerate selected items
  • Apply regenerated items

Resume improvement and tailored resume#

  • Improve endpoint aligns resume with keywords and refines content.
  • Tailored resume endpoint generates a tailored analysis given a target role and optional context.

Dependencies#

Key dependencies and relationships:

  • Routers depend on services for business logic
  • Services depend on document processing utilities and LLM data processors
  • Models define contracts for typed requests and responses
  • Common models are reused across resume and enrichment domains

Performance#

  • Document conversion: PDF/DOC/DOCX are converted to Markdown for consistent parsing; fallback conversion uses multimodal LLM for PDFs when supported.
  • LLM reliability: Text and JSON formatting includes fallbacks and error handling to avoid blocking failures.
  • Large files: Temporary file handling prevents memory overload during processing.
  • Rate limiting and auth: Detected issues are handled gracefully by falling back to original text.
  • Validation: Pre-checks ensure resume validity before expensive LLM processing.

[No sources needed since this section provides general guidance]

Troubleshooting#

Common issues:

  • Unsupported file type: Ensure file extension is TXT, MD, PDF, or DOCX; otherwise conversion returns None and a 400 error is raised.
  • Empty or invalid resume text: Validation checks for resume keywords; failure triggers a 400 error.
  • LLM unavailability or malformed JSON: JSON extraction attempts multiple parsing strategies; on failure returns empty dict or raises 500.
  • Rate limit or auth errors: Detected conditions trigger fallback to original text with warnings.

Appendix#

API endpoints summary#

  • File-based analysis
  • POST /api/v1/resume/analysis
  • POST /api/v2/resume/format-and-analyze
  • POST /api/v2/resume/analysis
  • Enrichment
  • POST /api/v1/resume/enrichment/analyze
  • POST /api/v1/resume/enrichment/improve
  • POST /api/v1/resume/enrichment/refine
  • POST /api/v1/resume/enrichment/apply
  • POST /api/v1/resume/enrichment/regenerate
  • POST /api/v1/resume/enrichment/apply-regenerated
  • Improvement
  • POST /api/v1/resume/improve
  • POST /api/v1/resume/refine
  • Tailored Resume
  • POST /api/v1/resume/tailor (text-based)
  • POST /api/v1/resume/tailor (file-based)

Structured output schemas#

  • ComprehensiveAnalysisData: Skills, languages, education, experience, projects, publications, certifications, achievements, personal identifiers, predicted field
  • ResumeUploadResponse: Analysis result plus cleaned data dictionary
  • FormattedAndAnalyzedResumeResponse: Cleaned text and detailed analysis
  • Common entries: WorkExperienceEntry, ProjectEntry, SkillProficiency, EducationEntry