Overview
PromptTools, from Hegel AI, is a set of self-hostable tools for experimenting with prompts, models and vector databases. Its premise is that prompt evaluation should happen in the places engineers already work — code, notebooks and a local UI — rather than in a hosted dashboard you have to send your data to. Everything runs on your machine, against your own API keys.
The core abstraction is an *experiment*: you give it the axes you want to vary — a list of message sets, a list of models, a list of temperatures — and it runs the full cross-product, collects the responses, and renders them as a table you can eyeball or score. `openai_experiment.run()` followed by `.visualize()` is the whole loop in a notebook. Because the axes are just Python lists, a regression check across two models and a dozen prompts is a handful of lines rather than a bespoke script.
The same treatment extends to retrieval. PromptTools ships experiments for vector databases — Chroma, Weaviate, Qdrant, LanceDB and Pinecone among them — so you can measure whether a change to chunking or an embedding model actually improved what comes back, instead of inferring it from downstream answer quality. On the model side the supported list spans OpenAI (completion, chat and fine-tuned models), Anthropic, Google Gemini and Vertex AI, Mistral AI, Azure OpenAI, Replicate, HuggingFace Hub and Inference Endpoints, and LLaMA.cpp for local models.
For people who would rather click than write code, a Streamlit playground exposes three modes — Instruction, Prompt Template and Model Comparison — with fields for each provider's API key, so a non-engineer can run the same side-by-side comparison. It runs locally with a single `streamlit run`, and Hegel AI also hosts a version on the Streamlit Community Cloud (without LlamaCpp support).
What it does
- Experiment objects that sweep the cross-product of prompts, models and parameters in a few lines, then render the results as a table
- Broad provider coverage in one harness: OpenAI, Anthropic, Google Gemini and Vertex AI, Mistral AI, Azure OpenAI, Replicate, HuggingFace, and LLaMA.cpp for local models
- Vector-database experiments that measure retrieval accuracy directly — Chroma, Weaviate, Qdrant, LanceDB and Pinecone
- A local Streamlit playground with Instruction, Prompt Template and Model Comparison modes for click-driven comparisons
- Notebook-first workflow: `run()` then `visualize()`, with example notebooks in the repo and a Google Colab starting point
- Entirely self-hosted — prompts, responses and API keys stay on your machine
Getting started
PromptTools installs from PyPI. The fastest path is a notebook; the playground is a second command once the package is installed.
Install the package
pip install prompttoolsSweep a grid of prompts across two models
An experiment takes lists for each axis and runs the cross-product. Here two message sets are tried against gpt-3.5-turbo and gpt-4 at temperature 0; `visualize()` renders the responses as a table.
from prompttools.experiment import OpenAIChatExperiment
messages = [
[{"role": "user", "content": "Tell me a joke."},],
[{"role": "user", "content": "Is 17077 a prime number?"},],
]
models = ["gpt-3.5-turbo", "gpt-4"]
temperatures = [0.0]
openai_experiment = OpenAIChatExperiment(models, messages, temperature=temperatures)
openai_experiment.run()
openai_experiment.visualize()Run one of the example notebooks
The repository ships runnable notebooks under examples/notebooks. The OpenAI chat example is the one the project points newcomers at; it is also available on Google Colab.
pip install notebook
git clone https://github.com/hegelai/prompttools.git
cd prompttools && jupyter notebook examples/notebooks/OpenAIChatExperiment.ipynb
Launch the playground
The Streamlit app is in the repo. Start it from a clone and it opens in the browser with the three modes and per-provider key fields.
git clone https://github.com/hegelai/prompttools.git
cd prompttools && streamlit run prompttools/playground/playground.pyCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Reach for it when a prompt change needs a before/after across several models, and 'it looked better in the chat window' is not evidence
- Reach for it when picking between providers for one task and you want the same grid run against all of them
- Reach for it to measure whether a chunking or embedding change actually improved retrieval, rather than judging it by the final answer
- Reach for it when the data cannot leave your machine, so a hosted prompt-evaluation service is not an option
How PromptTools compares
PromptTools alongside other open-source evaluation & red-teaming tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Strix | ★ 72.3k | Strix runs autonomous AI agents that act like hackers, dynamically running your code to find vulnerabilities and validate them with real proof-of-concepts. |
| iFixAi | ★ 35.9k | An agent auditor that runs up to 60 inspections across fabrication, manipulation, deception, unpredictability and opacity, and returns an A–F grade judged by a model from a different vendor. |
| promptfoo | ★ 26.5k | A developer-first CLI and library for testing and comparing prompts and models, with red-teaming probes for prompt injection, PII leaks, and other vulnerabilities. |
| OpenAI Evals | ★ 19.7k | A framework and open registry for building and running evaluations of LLMs and LLM-based systems, including prompt chains and tool-using agents. |
| DeepEval | ★ 19.1k | An open-source Python framework that tests LLM apps like unit tests, with 50+ metrics for RAG, agents, chatbots, and safety, and a Pytest integration for CI/CD. |
| Ragas | ★ 16.2k | An evaluation toolkit focused on retrieval-augmented generation that scores answer faithfulness, context precision/recall, and relevancy, often without needing ground-truth labels. |
| Arize Phoenix | ★ 12k | An open-source observability and evaluation tool for tracing LLM and agent behavior, running evals on traces, and troubleshooting issues in development and production. |
| PromptTools | ★ 3.1k | Self-hostable experiment harness for prompts, models and vector databases — sweep a grid of prompts across providers in a notebook, or compare them side by side in a local playground |