PrompTrace
From building and tracking experiments to productionizing prompts.
Why PrompTrace
Prompt engineering is often done by software engineers with little to no background in ML or Data Science. PrompTrace is designed to simplify the process, enabling easy experiment setup, prompt evaluation, and production tracking.
Key Benefits:
✅ Easy to adopt – No ML or Data Science expertise required.
✅ Self-contained – No need for additional cloud services for tracking or collaboration.
✅ Seamless integration – Works within your existing web, mobile, or backend project.
Core Concepts
Experiment
Experiment is at the center of PrompTrace. An experiment means running a prompt for a dataset and evaluating the outcome against some defined metrics. It is provided as a json file.
Parts of an expriment are -
-
Model: Configuration to connect to an LLM endpoint.
-
Prompt Template: It is a path for a file which contains the prompt text. The prompt template may include placeholders, which are dynamically replaced with data from a dataset.
Prompt template format
<<system>> TEXT FOR SYSTEM PROMPT GOES HERE. <<user>> TEXT FOR USER PROMPT GOES HERE. FOR PLACEHOLDER, USE THIS SYNTAX <PLACEHOLDER>.Make sure
<<system>>and<<user>>are written like this. For placeholders, use this syntax<placeholder>. -
Dataset: It is a path for a json file which contains the evaluation dataset.
Dataset template format
[ [ {"title":"sample_title", "value":"sample_text"}, ... ... {"title":"sample_title", "value":"sample_text"} ], [ {"title":"sample_title", "value":"sample_text"}, ... ... {"title":"sample_title", "value":"sample_text"} ] ] -
Evaluation (optional): It is a list of evaluation metrics.
Tracer
Tracer stores the experiment output.
How to use
-
Install the
promptracelibrary.pip install promptrace -
Create a folder for prompt template and store the prompt template there.
-
Create a folder for dataset and store the dataset there.
Sample code
import json
from promptrace import PrompTrace
# Define the experiment configuration
experiment_config = {
"model": {
"type": "azure_openai",
"api_key": "your_api_key",
"api_version": "your_api_version",
"endpoint": "your_endpoint",
"deployment": "deployment_name"
},
"prompt_template": "prompt_template_path",
"dataset": "dataset_path",
"evaluation": [
{"metric": "metric_name"}
{"metric": "metric_name"}
]
}
# Define the tracer configuration
tracer_config = {
"type": "tracer_type",
"target": "target_folder"
}
# Create a PrompTrace instance and run the experiment
prompt_trace = PrompTrace(tracer=tracer_config)
prompt_trace.run(experiment_config)
Samples
[coming soon]
Metadata
Release files for promptrace 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| promptrace-0.1.3.tar.gz | 8.6 kB | Without provenance | Details for promptrace-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| promptrace-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for promptrace-0.1.3-py3-none-any.whl |
Total release size: 17.9 kB
Release files / promptrace-0.1.3.tar.gz
| Download URL | promptrace-0.1.3.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e277e8685b0bbe055d1a2b2ac21eeab232bfed4c29f1de8492dba2e0cc836af
|
|
BLAKE2b-256 checksum How to use checksums |
09177ef272db5223db079427dfc58d93fcb63dbfbdab28adef1352499d42a972
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|
Release files / promptrace-0.1.3-py3-none-any.whl
| Download URL | promptrace-0.1.3-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc7ee8e9b4c84e4da5aa94536a6f8daaf9d4855b890e855940c73422c5e90c88
|
|
BLAKE2b-256 checksum How to use checksums |
d2f2671cc58880cd672ff3af800b27566297160bf250890338e3f1ef0a9b5f2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|
Security for promptrace 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.