Open-source tools for prompt testing and experimentation, with support for both LLMs (e.g. OpenAI, LLaMA) and vector databases (e.g. Chroma, Weaviate, LanceDB).
hegelai/prompttools is an open-source project on GitHub, mainly written in Python. Open-source tools for prompt testing and experimentation, with support for both LLMs (e.g. OpenAI, LLaMA) and vector databases (e.g. Chroma, Weaviate, LanceDB). It currently holds 3,055 stars and 256 forks with 0 open issues, and was last pushed on an unknown date (repository created unknown).
Project Overview
AI Homed tracks it on the AI Prompt Engineering board.
:wrench: Test and experiment with prompts, LLMs, and vector databases. :hammer:
Welcome to prompttools created by Hegel AI! This repo offers a set of open-source, self-hostable tools for experimenting with, testing, and evaluating LLMs, vector databases, and prompts. The core idea is to enable developers to evaluate using familiar interfaces like _code_, _notebooks_, and a local _playground_.
In just a few lines of code, you can test your prompts and parameters across different models (whether you are using
OpenAI, Anthropic, or LLaMA models). You can even evaluate the retrieval accuracy of vector databases.
from prompttools.experiment import OpenAIChatExperiment
messages = [
[{"role": "user", "content": "Tell me a joke."},],
[{"role": "user", "content": "Is 17077 a prime number?"},],
]
If you have any API that you'd like to see being supported soon, please open an issue or
a PR to add it. Feel free to discuss in our Discord channel as well.
Frequently Asked Questions (FAQs)
1. Will this library forward my LLM calls to a server before sending it to OpenAI, Anthropic, and etc.?
No, the source code will be executed on your machine. Any call to LLM APIs will be directly executed from your machine without any forwarding.
2. Does prompttools store my API keys or LLM inputs and outputs to a server?
No, all of those data stay on your local machine. We do not collect any PII (personally identifiable information).
3. How do I persist my results?
To persist the results of your tests and experiments, you can export your Experiment with the methods to_csv,
to_json, to_lora_json, or to_mongo_db. We are building more persistence features and we will be happy to further discuss your use cases, pain points, and what export
options may be useful for you.
Sentry
Usage Tracking
Since we are changing our API rapidly, there are some errors caused by our negligence or out of date documentation.
To improve user experience, we collect data from normal package usage that helps us understand the
errors that are raised. This data is collected and sent to Sentry,
a third-party error tracking service, commonly used in open-source softwares. It only logs this library's own actions.
You can easily opt-out by defining an environment variable called SENTRY_OPT_OUT.
We will be delighted to work with early adopters to shape our designs. Please reach out to us via email if you're
interested in using this tooling for your project or have any feedback.
License
We will be gradually releasing more components to the open-source community. The current license can be found in the LICENSE file. If there is any concern, please contact us and we will be happy to work with you.