Table of Contents

👉 Try the demo: https://github.com/LM-Kit/lm-kit-net-samples/tree/main/console_net/resume_parser

AI Resume Parser for C# .NET Applications


🎯 Purpose of the Demo

AI Resume Parser demonstrates how to use LM-Kit.NET to extract structured candidate profiles from resumes entirely on local hardware. Feed it any resume and get back structured JSON with contact info, work experience, education, skills, certifications, and languages.

The sample shows how to:

  • Use TextExtraction to define and extract structured data from unstructured text.
  • Define extraction schemas with TextExtractionElement including nested arrays for complex structures.
  • Parse text content with SetContent(string) or load documents with Attachment.
  • Handle both flat fields (name, email) and nested array fields (work experience, education).

Why a Local Resume Parser with LM-Kit.NET?

  • Candidate data stays private: parse sensitive resumes without uploading to cloud services.
  • One API call: a single Parse() call extracts the entire profile. No agents, no chaining.
  • Structured output: get machine-readable JSON ready for ATS or HR system integration.
  • Works offline: no API keys, no internet connection required.

👥 Who Should Use This Demo

  • HR Teams: automate resume screening without sending candidate data to third parties.
  • Recruiters: quickly extract and compare candidate profiles from stacks of resumes.
  • ATS Developers: integrate local AI-powered resume parsing into applicant tracking systems.
  • Staffing Agencies: process high volumes of resumes with full data sovereignty.
  • Developers: learn the TextExtraction API with nested array elements.

🚀 What Problem It Solves

  • Data privacy: parse resumes containing personal information without cloud exposure.
  • Manual data entry: eliminate copy-pasting candidate details into spreadsheets or databases.
  • Inconsistent formats: extract structured data from any resume format or layout.
  • Integration: produce JSON output ready for any HR system, database, or API.

💻 Demo Application Overview

Console app that:

  • Lets you choose from multiple models optimized for text extraction.
  • Downloads models if needed, with live progress updates.
  • Creates a TextExtraction instance with a resume-specific schema.
  • Enters an interactive loop where you can:
    • Type sample to parse a built-in senior engineer resume.
    • Enter a file path to parse your own resume (.txt, .pdf, .docx).
    • View the extracted candidate profile with color-coded output.
    • View the full JSON output for integration.
  • Loops until you type q.

Key Features

  • Nested Extraction: Work experience and education extracted as structured arrays.
  • Built-In Sample: Realistic senior engineer resume for instant demo.
  • File Support: Parse text files directly or PDF/DOCX via Attachment.
  • JSON Output: Machine-readable structured data alongside formatted display.
  • Zero Configuration: No API keys, no cloud accounts, no external dependencies.

🏗️ Architecture

  ┌─────────────────────────────────────────────────┐
  │           Resume (text, PDF, DOCX)               │
  └───────────────────┬─────────────────────────────┘
                      │
                      ▼
  ┌─────────────────────────────────────────────────┐
  │              TextExtraction                      │
  │                                                  │
  │   Schema:                                        │
  │   ├── Full Name (String)                         │
  │   ├── Email (String)                             │
  │   ├── Phone (String)                             │
  │   ├── Location (String)                          │
  │   ├── Professional Summary (String)              │
  │   ├── Work Experience (Array)                    │
  │   │   ├── Company, Job Title, Period             │
  │   │   └── Key Achievements                       │
  │   ├── Education (Array)                          │
  │   │   └── Institution, Degree, Year              │
  │   ├── Skills (String)                            │
  │   ├── Certifications (String)                    │
  │   └── Languages (String)                         │
  │                                                  │
  └───────────────────┬─────────────────────────────┘
                      │
                      ▼
  ┌─────────────────────────────────────────────────┐
  │         Structured Candidate Profile             │
  │         (formatted display + JSON)               │
  └─────────────────────────────────────────────────┘

Extraction Schema

Field Type Description
Full Name String Candidate's full name
Email String Email address
Phone String Phone number
Location String City, state, or country
Professional Summary String Career objective or summary
Work Experience Array Company, title, period, achievements
Education Array Institution, degree, year
Skills String Technical and professional skills
Certifications String Professional certifications
Languages String Languages with proficiency levels

Code Highlights

using LMKit.Extraction;
using LMKit.Model;

LM model = LM.LoadFromModelID("qwen3:8b");

var textExtraction = new TextExtraction(model);
textExtraction.Elements = new List<TextExtractionElement>
{
    new("Full Name", ElementType.String, "Full name of the candidate."),
    new("Email", ElementType.String, "Email address."),
    new("Work Experience",
        new List<TextExtractionElement>
        {
            new("Company", ElementType.String, "Company name."),
            new("Job Title", ElementType.String, "Job title or role."),
            new("Period", ElementType.String, "Employment period."),
            new("Key Achievements", ElementType.String, "Key achievements.")
        },
        isArray: true,
        "Work experience entries."
    ),
    // ... more elements
};

textExtraction.SetContent(resumeText);
var result = textExtraction.Parse();

Console.WriteLine(result.Json);

⚙️ Getting Started

Prerequisites

  • .NET 8.0 or later
  • Sufficient VRAM for the selected model (6-18 GB depending on model choice)

Download

git clone https://github.com/LM-Kit/lm-kit-net-samples
cd lm-kit-net-samples/console_net/resume_parser

Run

dotnet build
dotnet run

Then:

  1. Select a model from the menu, or paste a custom model URI.
  2. Wait for the model to download (first run) and load.
  3. Type sample to try the built-in resume, or enter a file path.
  4. View the extracted candidate profile and JSON output.
  5. Type q to exit.

🔧 Troubleshooting

  • Incomplete extraction

    • Try a larger model (12B+) for better accuracy on complex resume layouts.
    • Ensure the resume text is complete and not truncated.
  • PDF parsing issues

    • Ensure the PDF contains selectable text (not a scanned image).
    • For scanned resumes, use OCR preprocessing (see invoice_data_extraction demo).
  • Missing fields

    • The model returns empty values for fields not present in the resume.
    • Verify the resume contains the expected information.

🚀 Extend the Demo

  • Batch processing: scan a folder of resumes and generate a comparison spreadsheet.
  • Scoring: add extraction elements for years of experience or skill match percentage.
  • Database integration: pipe JSON output into an ATS or candidate database.
  • Multi-language: test with resumes in different languages using multilingual models.
  • Vision models: parse scanned resume images using vision-capable models.

📚 Additional Resources

Share