Skip to main content
You can also run this cookbook in Colab here. Recruiting teams drown in resumes. Every resume is a blob of unstructured text wrapped around a pile of personal data: names, emails, phone numbers, home addresses. You want the signal (skills, titles, companies) without holding the PII any longer than you must, and GDPR and CCPA make β€œany longer than you must” a legal line, not a preference. This notebook builds a small resume-screening pipeline that pulls the structured signal out of a PDF resume, strips the PII before anything is stored or shared, and routes the candidate to the right team, using three ZeroGPU tools through LangChain. For the full reference, see the langchain-zerogpu repository on GitHub and the package on PyPI. In this notebook, you’ll explore:
  • LangChain: The framework for building applications with LLMs and agents. Its langchain-zerogpu package exposes ZeroGPU’s small and nano models as first-class tools, so you can drop entity extraction, PII redaction, and zero-shot classification straight into a pipeline without writing any HTTP code.
  • ZeroGPU: An ultra-fast, compute-efficient inference provider for apps and agents. We run purpose-built small and nano language models across an edge-powered network for the high-volume, purpose-specific tasks your app or agent runs constantly. Plug in our OpenAI-compatible API and you’re live - zero GPU infrastructure, serverless, auto-scaling by default.
This setup not only demonstrates a practical application of privacy-aware resume screening, but also provides a flexible framework that can be adapted to other real-world scenarios requiring structured extraction and compliant handling of sensitive documents.

πŸŽ₯ Watch the Video Guide

πŸ“¦ Installation

First, install the langchain-zerogpu package, which ships the ZeroGPU tools. You’ll also install pypdf to pull the text out of an uploaded PDF resume (this pipeline is text-only, no OCR):

πŸ”‘ Setting Up API Keys

You’ll need to set up your ZeroGPU credentials so the tools can reach the inference API securely. This ensures every tool call is authenticated without re-prompting. You can go to here to get an API key and Project ID from ZeroGPU. The key starts with zgpu-api- and the Project ID (UUID) is on the project settings page.
Python
Each tool reads ZEROGPU_API_KEY and ZEROGPU_PROJECT_ID from the environment when you construct it with no arguments. The key is held as a SecretStr and is never logged.
The example outputs throughout this notebook are illustrative placeholders that show the shape of each result. Rerun the cells with your own credentials and resume to capture live values.

πŸ“„ Upload a Resume

Upload a single PDF resume straight from your machine, then read its text with pypdf. Everything downstream runs on resume_text.
Python

🏷️ Extract Candidate Entities with ZeroGPU

ZeroGPU is an ultra-fast, compute-efficient inference provider for apps and agents. We run purpose-built small and nano language models across an edge-powered network for the high-volume, purpose-specific tasks your app or agent runs constantly. Plug in our OpenAI-compatible API and you’re live - zero GPU infrastructure, serverless, auto-scaling by default. In this section, we will extract skills, job titles, companies, and locations from the resume as a structured candidate card. ZeroGPUExtractEntitiesTool runs custom-label named-entity recognition on gliner2-base-v1. You pass the entity types you care about as labels, and it returns the matched spans grouped by label.
Python
The result nests every match under its label, so you can assemble a clean candidate card in a couple of lines:
Python
πŸŽ‰ ZeroGPU effortlessly turns a wall of resume text into a structured candidate card in one call, providing the cheap, repeatable extraction layer your screening pipeline runs on!

πŸ” Redact PII Before Sharing

Before the resume goes into a dashboard, an applicant-tracking system, or a shared review channel, the personal data has to come out. ZeroGPURedactPIITool masks PII inline on gliner-multi-pii-v1, replacing each match with an uppercase [LABEL] placeholder and returning the redacted text.
Python
The tool returns a JSON envelope, not a bare string: redacted_text holds the masked copy, and an entities list records every span that was detected and replaced. Parse it with json.loads(anonymized_resume)["redacted_text"] when you just want the masked text. Names, emails, phone numbers, addresses, and even company names come back masked, while skills and the rest of the prose pass through, so the redacted copy is still useful for review with the identifying details gone. This is the version that is safe to store or share. πŸŽ‰ ZeroGPU strips the personal data out of the resume in a single call, giving you a compliant, shareable copy without touching the rest of the content!

🧭 Route the Candidate with Zero-Shot Classification

With the signal extracted and the PII gone, the last step is routing: which team should review this candidate? ZeroGPUClassifyZeroShotTool scores the resume against a flat list of labels on deberta-v3-small and returns a score per label, so you can pick the best match.
Python
The tool returns every label with a score, so max(routing, key=routing.get) gives you the top team. Swap the labels list for your own org chart to route against any set of teams. πŸŽ‰ ZeroGPU classifies the resume against your own team labels in one call, turning unstructured text into a routing decision!

πŸ€– Run the Full Screening Pipeline

Now chain the three tools into one function that takes a resume and returns a structured candidate card, an anonymized copy, and a routing label. This is the end-to-end pipeline you’d wire into a real screening flow.
Python
πŸŽ‰ From a single PDF, the pipeline produced a structured candidate card, a PII-free copy safe to store or share, and a routing label, with each task running on a purpose-built ZeroGPU model instead of a frontier LLM.

🌟 Highlights

This notebook has guided you through setting up and running a LangChain workflow with ZeroGPU for privacy-aware resume screening. You can adapt and expand this example for various other scenarios requiring structured extraction and compliant handling of sensitive documents. Key tools utilized in this notebook include:
  • LangChain: The framework for building applications with LLMs and agents. Its langchain-zerogpu package exposes ZeroGPU’s small and nano models as first-class tools, so you can drop entity extraction, PII redaction, and zero-shot classification straight into a pipeline without writing any HTTP code.
  • ZeroGPU: An ultra-fast, compute-efficient inference provider for apps and agents. We run purpose-built small and nano language models across an edge-powered network for the high-volume, purpose-specific tasks your app or agent runs constantly. Plug in our OpenAI-compatible API and you’re live - zero GPU infrastructure, serverless, auto-scaling by default.
This comprehensive setup allows you to adapt and expand the example for various scenarios requiring structured extraction and compliant handling of sensitive documents. For more, see the langchain-zerogpu repository, the PyPI page, and the ZeroGPU documentation.