---
title: "Promptify"
type: "tool"
slug: "promptslab-promptify"
canonical_url: "https://www.graphcanon.com/tools/promptslab-promptify"
github_url: "https://github.com/promptslab/Promptify"
homepage_url: "https://discord.gg/m88xfYMbK6"
stars: 4619
forks: 362
primary_language: "Python"
license: "Apache-2.0"
categories: ["inference-serving", "llm-frameworks"]
tags: ["gpt-3", "chatgpt-api", "nlp", "large-language-models", "gpt-4", "chatgpt", "prompt-engineering"]
updated_at: "2026-07-07T18:40:48.020093+00:00"
---

# Promptify

> Task-based NLP engine with Pydantic structured outputs

Promptify is a Python library for prompt engineering, versioning and using large language models like GPT to generate structured output. It includes built-in evaluation tools and can be integrated seamlessly across different LLM backends.

## Facts

- Repository: https://github.com/promptslab/Promptify
- Homepage: https://discord.gg/m88xfYMbK6
- Stars: 4,619 · Forks: 362 · Open issues: 60 · Watchers: 51
- Primary language: Python
- License: Apache-2.0
- Last pushed: 2026-03-27T01:09:45+00:00

## Categories

- [Inference & Serving](/categories/inference-serving.md)
- [LLM Frameworks](/categories/llm-frameworks.md)

## Tags

gpt-3, chatgpt-api, nlp, large language models, gpt-4, chatgpt, prompt-engineering

## Related tools

- [ollama](/tools/ollama-ollama.md) - Get up and running with Kimi-K2.6, GLM-5.1, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models. (★ 175,659)
- [prompts.chat](/tools/f-prompts-chat.md) - The world's largest open-source prompt library for AI (★ 165,019)
- [transformers](/tools/huggingface-transformers.md) - 🤗 Transformers: the model-definition framework for state-of-the-art machine learning models (★ 162,347)
- [open-webui](/tools/open-webui-open-webui.md) - User-friendly AI Interface (Supports Ollama, OpenAI API, ...) (★ 144,575)
- [awesome-llm-apps](/tools/shubhamsaboo-awesome-llm-apps.md) - 100+ AI Agent & RAG apps you can actually run — clone, customize, ship. (★ 116,702)
- [LLMs-from-scratch](/tools/rasbt-llms-from-scratch.md) - Implement a ChatGPT-like LLM in PyTorch from scratch (★ 98,711)
- [TradingAgents](/tools/tauricresearch-tradingagents.md) - TradingAgents: Multi-Agents LLM Financial Trading Framework (★ 91,610)
- [caveman](/tools/juliusbrussee-caveman.md) - Cuts 65% of tokens in AI coding agent responses. (★ 86,150)

## README (excerpt)

```text
<div align="center">
<img width="110px" src="https://raw.githubusercontent.com/promptslab/Promptify/main/assets/logo.png">
<h1>Promptify</h1></div>


<p align="center">
  <p align="center">Task-based NLP engine with Pydantic structured outputs, built-in evaluation, and LiteLLM as the universal LLM backend. Think "scikit-learn for LLM-powered NLP".
</p>
</p>

 <h4 align="center">
  <a href="https://github.com/promptslab/Promptify/blob/main/LICENSE">
    <img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg" alt="Promptify is released under the Apache 2.0 license." />
  </a>
  <a href="https://pypi.org/project/promptify/">
    <img src="https://badge.fury.io/py/Promptify.svg" alt="PyPI version" />
  </a>
  <a href="http://makeapullrequest.com">
    <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square" alt="http://makeapullrequest.com" />
  </a>
  <a href="https://discord.gg/m88xfYMbK6">
    <img src="https://img.shields.io/badge/Discord-Community-orange" alt="Community" />
  </a>
  <a href="#">
    <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="colab" />
  </a>
</h4>

<img width="910px" src="https://raw.githubusercontent.com/promptslab/Promptify/main/assets/dark.png">

## Installation

### With pip

Requires Python 3.9+.

```bash
pip install promptify
```

or

```bash
pip install git+https://github.com/promptslab/Promptify.git
```

For evaluation metrics support:
```bash
pip install promptify[eval]
```

## Quick Tour

### 3-Line NER

```python
from promptify import NER

ner = NER(model="gpt-4o-mini", domain="medical")
result = ner("The patient is a 93-year-old female with a medical history of chronic right hip pain, osteoporosis, hypertension, depression, and chronic atrial fibrillation admitted for evaluation and management of severe nausea and vomiting and urinary tract infection")
```

**Output:**
```python
NERResult(entities=[
    Entity(text="93-year-old", label="AGE"),
    Entity(text="chronic right hip pain", label="CONDITION"),
    Entity(text="osteoporosis", label="CONDITION"),
    Entity(text="hypertension", label="CONDITION"),
    Entity(text="depression", label="CONDITION"),
    Entity(text="chronic atrial fibrillation", label="CONDITION"),
    Entity(text="severe nausea and vomiting", label="SYMPTOM"),
    Entity(text="urinary tract infection", label="CONDITION"),
])
```

### Classification

```python
from promptify import Classify

clf = Classify(model="gpt-4o-mini", labels=["positive", "negative", "neutral"])
result = clf("Amazing product! Best purchase I've ever made.")
# Classification(label="positive", confidence=0.95)
```

### Question Answering

```python
from promptify import QA

qa = QA(model="gpt-4o-mini")
answer = qa("Einstein was born in Ulm in 1879.", question="Where was Einstein born?")
# Answer(answer="Ulm", evidence="Einstein was born in Ulm", confidence=0.98)
```

### Custom Task with Any Pydantic Schema

```python
from promptify import Task
from pydantic import BaseModel

class MovieReview(BaseModel):
    sentiment: str
    rating: float
    key_themes: list[str]

task = Task(model="gpt-4o", output_schema=MovieReview, instruction="Analyze this movie review.")
review = task("Nolan's best work. Stunning visuals but the plot drags.")
# MovieReview(sentiment="mostly positive", rating=7.5, key_themes=["visuals", "pacing"])
```

### Any Provider - Just Change the Model String

```python
ner_openai = NER(model="gpt-4o-mini")
ner_claude = NER(model="claude-sonnet-4-20250514")
ner_local  = NER(model="ollama/llama3")
```

### Batch Processing

```python
results = ner.batch(["text1", "text2", "text3"], max_concurrent=10)
```

### Async Support

```python
result = await ner.acall("Patient has diabetes")
```

### Built-in Evaluation

```python
from promptify.eval import evaluate

scores = evaluate(task=ner, dataset=labeled_data, metrics=["precision", "recall", "f1"])
# {"precision": 0.92, "recall": 0.88, "f1": 0.90}
```

## Features

- **2-3
```

---

**Machine-readable endpoints**

- JSON: [`/api/graphcanon/tools/promptslab-promptify`](/api/graphcanon/tools/promptslab-promptify)
- LLM index: [/llms.txt](/llms.txt)
- Full corpus: [/llms-full.txt](/llms-full.txt)

_GraphCanon - The knowledge graph for AI development. https://www.graphcanon.com/_
