cvxtract
LLM-powered structured extraction from CVs and resumes.
cvxtract loads a CV/resume in any common format (PDF, DOCX, HTML, plain text), sends the text to an LLM of your choice, and deserialises the response directly into typed Rust structs — no regex, no hand-written parsers.
Quick start
use ;
async
Installation
[]
= "0.1"
= { = "1", = ["full"] }
Providers
| Constructor | Backend | Auth |
|---|---|---|
Model::from_local() |
llama-cpp-2 on-device (Qwen3.5-2B) | none — model auto-downloaded |
Model::from_openai() |
OpenAI API | OPENAI_API_KEY |
Model::from_openrouter() |
OpenRouter | OPENROUTER_API_KEY |
Model::from_ollama() |
Local Ollama | Ollama running on localhost:11434 |
Model::from_openai_compatible() |
Any OpenAI-compatible endpoint | explicit key + URL |
Model::from_copilot() |
GitHub Copilot | COPILOT_TOKEN |
// OpenAI
let model = from_openai;
// Ollama (local)
let model = from_ollama;
// Any OpenAI-compatible endpoint
let model = from_openai_compatible;
Supported input formats
| Format | Extension |
|---|---|
.pdf |
|
| Word | .docx |
| HTML | .html, .htm |
| Plain text | .txt |
Built-in Resume type
extract_resume() populates a comprehensive Resume struct:
Custom types
Extract any shape by deriving serde::Deserialize and schemars::JsonSchema:
use ;
use JsonSchema;
use Deserialize;
async
GPU acceleration (local model)
When using Model::from_local(), compile with a feature flag to offload layers to
your GPU. llama.cpp auto-fits what it can into VRAM and falls back to CPU for the
remainder — this is safe even on GPUs with limited memory.
# NVIDIA CUDA
# Apple Silicon (Metal)
# AMD / Intel Vulkan
# Cargo.toml
[]
= { = "0.1", = ["cuda"] }
Error handling
All async methods return Result<T, ExtractionError>:
use ExtractionError;
match extractor.extract_resume.await
Raw document loading
Use UnstructuredLoader to extract plain text from a file without any LLM call:
use UnstructuredLoader;
let loader = new;
let doc = loader.load?;
println!;
License
Licensed under either of MIT license.