RepositoryJupyter NotebookDEGermany
explosion

explosion/prodigy-recipes

🍳 Recipes for the Prodigy, our fully scriptable annotation tool

513stars
112forks
0issues
3views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: data-annotation

#1 Repository of the month

1
TINIX TRENDING·Topic: machine-teaching

#1 Repository of the month

2
TINIX TRENDING·Topic: spacy

#2 Repository of the month

Prodigy Recipes

This repository contains a collection of recipes for Prodigy, our scriptable annotation tool for text, images and other data. In order to use this repo, you'll need a license for Prodigy – see this page for more details. For questions and bug reports, please use the Prodigy Support Forum. If you've found a mistake or bug, feel free to submit a pull request.

✨ Important note: The recipes in this repository aren't 100% identical to the built-in recipes shipped with Prodigy. They've been edited to include comments and more information, and some of them have been simplified to make it easier to follow what's going on, and to use them as the basis for a custom recipe.

📋 Usage

Once Prodigy is installed, you should be able to run the prodigy command from your terminal, either directly or via python -m:

python -m prodigy

The prodigy command lists the built-in recipes. To use a custom recipe script, simply pass the path to the file using the -F argument:

python -m prodigy ner.teach your_dataset en_core_web_sm ./data.jsonl --label PERSON -F prodigy-recipes/ner/ner_teach.py

You can also use the --help flag for an overview of the available arguments of a recipe, e.g. prodigy ner.teach -F ner_teach_.py --help.

Some things to try

You can edit the code in the recipe script to customize how Prodigy behaves.

  • Try replacing prefer_uncertain() with prefer_high_scores().
  • Try writing a custom sorting function. It just needs to be a generator that yields a sequence of example dicts, given a sequence of (score, example) tuples.
  • Try adding a filter that drops some questions from the stream. For instance, try writing a filter that only asks you questions where the entity is two words long.
  • Try customizing the update() callback, to include extra logging or extra functionality.

🍳 Recipes

Named Entity Recognition

RecipeDescription
ner.teachCollect the best possible training data for a named entity recognition model with the model in the loop. Based on your annotations, Prodigy will decide which questions to ask next.
ner.matchSuggest phrases that match a given patterns file, and mark whether they are examples of the entity you're interested in. The patterns file can include exact strings or token patterns for use with spaCy's Matcher.
ner.manualMark spans manually by token. Requires only a tokenizer and no entity recognizer, and doesn't do any active learning. Optionally, pre-highlight spans based on patterns.
ner.fuzzy_manualLike ner.manual but use FuzzyMatcher from spaczz library to pre-highlight candidates.
ner.manual.bertUse BERT word piece tokenizer for efficient manual NER annotation for transformer models.
ner.correctCreate gold-standard data by correcting a model's predictions manually. This recipe used to be called ner.make_gold.
ner.silver-to-goldTake an existing "silver" dataset with binary accept/reject annotations, merge the annotations to find the best possible analysis given the constraints defined in the annotations, and manually edit it to create a perfect and complete "gold" dataset.
ner.eval_abEvaluate two NER models by comparing their predictions and building an evaluation set from the stream.
ner_fuzzy_manualMark spans manually by token with suggestions from spaczz fuzzy matcher pre-highlighted.

Text Classification

RecipeDescription
textcat.manualManually annotate categories that apply to a text. Supports annotation tasks with single and multiple labels. Multiple labels can optionally be flagged as exclusive.
textcat.correctCorrect the textcat model's predictions manually. Predictions above the acceptance threshold will be automatically preselected (0.5 by default). Prodigy will infer whether the categories should be mutualy exclusive based on the component configuration.
textcat.teachCollect the best possible training data for a text classification model with the model in the loop. Based on your annotations, Prodigy will decide which questions to ask next.
textcat.custom-modelUse active learning-powered text classification with a custom model. To demonstrate how it works, this demo recipe uses a simple dummy model that "predicts" random scores. But you can swap it out for any model of your choice, for example a text classification model implementation using PyTorch, TensorFlow or scikit-learn.

Terminology

RecipeDescription
terms.teachBootstrap a terminology list with word vectors and seeds terms. Prodigy will suggest similar terms based on the word vectors, and update the target vector accordingly.

Image

RecipeDescription
image.manualManually annotate images by drawing rectangular bounding boxes or polygon shapes on the image.
image-captionAnnotate images with captions, pre-populate captions with image captioning model implemented in PyTorch and perform error analysis.
image.frozenmodelModel in loop manual annotation using Tensorflow's Object Detection API.
image.servingmodelModel in loop manual annotation using Tensorflow's Object Detection API. This uses Tensorflow Serving
image.trainmodelModel in loop manual annotation and training using Tensorflow's Object Detection API.

Other

RecipeDescription
markClick through pre-prepared examples, with no model in the loop.
choiceAnnotate data with multiple-choice options. The annotated examples will have an additional property "accept": [] mapping to the ID(s) of the selected option(s).
question_answeringAnnotate question/answer pairs with a custom HTML interface.

Community recipes

RecipeAuthorDescription
phrases.teach@kabirkhanNow part of sense2vec.
phrases.to-patterns@kabirkhanNow part of sense2vec.
records.link@kabirkhanLink records across multiple datasets using the dedupe library.

Tutorial recipes

These recipes have made an appearance in one of our tutorials.

RecipeDescription
span-and-textcatDo both spancat and textcat annotations at the same time. Great for chatbots!
terms.from-nerGenerate terms from previous NER annotations.
audio-with-transcriptHandles both manual audio annotation as well as transcription.
progressDemo of an update-callback that tracks annotation speed.

📚 Example Datasets and Patterns

To make it even easier to get started, we've also included a few example-datasets, both raw data as well as data containing annotations created with Prodigy. For examples of token-based match patterns to use with recipes like ner.teach or ner.match, see the example-patterns directory.

Similar Projects

Discover other similar projects and AI models.

RepositoryTypeScript
explosion/jupyterlab-prodigy

🧬 A JupyterLab extension for annotating data with Prodigy

193
May 10, 2023
RepositoryPython
explosion/spaCy

💫 Industrial-strength Natural Language Processing (NLP) in Python

34.1k
Nov 21, 2026
RepositoryTypeScript
HumanSignal/label-studio

Label Studio is a multi-type data labeling and annotation tool with standardized output format

28.8k
Dec 1, 2026
RepositoryPython
cvat-ai/cvat

CVAT is a leading data annotation platform for image, video, audio, and 3D datasets. It offers open-source, cloud, and enterprise products, as well as labeling services, with AI-assisted labeling, quality assurance, team collaboration, analytics, and developer APIs.

17.2k
Dec 1, 2026
RepositoryJupyter Notebook
microsoft/AI-For-Beginners

12 Weeks, 24 Lessons, AI for All!

71.5k
Nov 15, 2026
RepositoryJupyter Notebook
rasbt/LLMs-from-scratch

Implement a ChatGPT-like LLM in PyTorch from scratch, step by step

109.4k
Nov 26, 2026
RepositoryJupyter Notebook
microsoft/ML-For-Beginners

12 weeks, 26 lessons, 52 quizzes, classic Machine Learning for all

92.5k
Nov 7, 2026
RepositoryPython
diffgram/diffgram

The AI Datastore for Schemas, BLOBs, and Predictions. Use with your apps or integrate built-in Human Supervision, Data Workflow, and UI Catalog to get the most value out of your AI Data.

1.9k
Jun 22, 2026
RepositoryTypeScript
xtreme1-io/xtreme1

Xtreme1 is an all-in-one data labeling and annotation platform for multimodal data training and supports 3D LiDAR point cloud, image, and LLM.

1.4k
Sep 29, 2026