Are you sure you want to delete this access key?
This project evaluates GPT-4o-mini's zero-shot performance on IMDB movie review sentiment analysis using promptfoo. Each model response includes:
Set your OpenAI API key and run the evaluation:
promptfoo eval
The evaluation uses the IMDB dataset from HuggingFace's datasets library, sampled to 100 reviews. The dataset is preprocessed into a CSV with two columns:
text
: The movie review contentsentiment
: The label ("positive" or "negative")To modify the sample size or generate a new dataset, you can use prepare_data.py
. First, install the Python dependencies:
pip install -r requirements.txt
Then run the preparation script:
python prepare_data.py
The evaluation implements F-score and related metrics using promptfoo's assertion system:
- type: javascript
value: "output.sentiment === 'positive' && context.vars.sentiment === 'positive' ? 1 : 0"
metric: true_positives
- name: precision
value: true_positives / (true_positives + false_positives)
- name: f1_score
value: 2 * true_positives / (2 * true_positives + false_positives + false_negatives)
The evaluation tracks:
Press p or to see the previous file or, n or to see the next file
Browsing data directories saved to S3 is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with AWS S3!
Are you sure you want to delete this access key?
Browsing data directories saved to Google Cloud Storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with Google Cloud Storage!
Are you sure you want to delete this access key?
Browsing data directories saved to Azure Cloud Storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with Azure Cloud Storage!
Are you sure you want to delete this access key?
Browsing data directories saved to S3 compatible storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
promptfoo is now integrated with your S3 compatible storage!
Are you sure you want to delete this access key?