What is RAGAS?
RAGAS (Retrieval Augmented Generation Assessment) provides metrics for evaluating:- Answer correctness - How accurate is the response?
- Answer similarity - How close to the reference answer?
- Faithfulness - Is the answer grounded in the context?
- Context relevance - Is retrieved context useful?
Prerequisites
- Python 3.8+
- Helicone account with API key
- Requests logged in Helicone (see Quick Start)
Setup
1
Install Dependencies
2
Configure Environment
Create a RAGAS uses OpenAI models for evaluation by default.
.env file:Workflow Overview

Complete RAGAS evaluation workflow
Step 1: Export Data from Helicone
Create a Dataset
In your Helicone dashboard:- Navigate to Datasets → Create Dataset
- Filter requests you want to evaluate (e.g., production traffic from last week)
- Add requests to the dataset
- Click “Export Data” to download CSV
id- Request IDmodel- Model usedmessages- Input promptchoices- Model responseheliconeMetadata- Custom properties and metadata
Export via API
Alternatively, export programmatically:Step 2: Add Ground Truth Labels
RAGAS evaluation requires reference answers (“ground truth”) to compare against.Manual Labeling
Create a script to help with manual annotation:ground_truth column with correct answers.
Automated Labeling
For testing, generate synthetic labels:Step 3: Prepare Evaluation Dataset
Convert Helicone export to RAGAS format:Step 4: Run RAGAS Evaluation
Evaluate responses using RAGAS metrics:Step 5: Push Scores to Helicone
Sync evaluation scores back to Helicone for unified tracking:Step 6: Analyze Results
Identify patterns in low-scoring responses:Complete Evaluation Pipeline
Put everything together:Automated Evaluation
Run evaluations on a schedule:Best Practices
Start Small
Start Small
Begin with 20-50 examples to validate your pipeline. Scale up once confident in your labeling and metrics.
Use Representative Data
Use Representative Data
Evaluate on data that matches your production distribution. Include edge cases and common queries.
Multiple Metrics
Multiple Metrics
Don’t rely on a single metric. Use correctness, similarity, and relevancy together for comprehensive assessment.
Track Over Time
Track Over Time
Monitor score trends weekly. Sudden drops indicate quality regressions that need immediate attention.
Investigate Failures
Investigate Failures
When scores drop, filter in Helicone by score range to find and fix problematic cases.
Next Steps
Experiments
Use evaluation results to guide A/B testing
Fine-Tuning
Build training datasets from high-scoring examples
Custom Properties
Tag requests for targeted evaluation
RAGAS Docs
Deep dive into RAGAS metrics and configuration
