An open-source toolkit for evaluating Large Language Model (LLM) responses using automated quality metrics, regression testing, prompt comparison, and customizable evaluation pipelines.
LLM Evaluation Platform helps developers measure the quality of AI-generated responses instead of relying solely on manual review.
The project provides reusable evaluation pipelines that score responses based on multiple quality dimensions including:
- Accuracy
- Relevance
- Faithfulness
- Completeness
- Hallucination Risk
- Consistency
- Response Similarity
The toolkit supports automated regression testing, prompt experimentation, and evaluation reporting for AI-powered applications.
Traditional software testing verifies deterministic outputs.
Large Language Models generate probabilistic responses.
Testing LLMs therefore requires a completely different workflow.
Instead of checking:
Input
↓
Expected Output
↓
Pass
LLM evaluation becomes:
Question
│
▼
LLM Response
│
▼
Evaluation Pipeline
│
┌──────┼────────┐
│ │ │
▼ ▼ ▼
Accuracy Relevance Hallucination
│
▼
Quality Score
This project automates that process.
Evaluate AI responses using configurable metrics.
- Accuracy
- Relevance
- Completeness
- Faithfulness
- Fluency
- Hallucination Detection
- Semantic Similarity
Compare multiple prompts against the same dataset.
Example:
| Prompt | Overall Score |
|---|---|
| Prompt A | 81.4 |
| Prompt B | 90.2 |
| Prompt C | 87.1 |
Automatically determine the highest-performing prompt.
Prevent prompt regressions after updates.
Version 1
│
▼
Prompt Tests
Version 2
│
▼
Prompt Tests
↓
Compare Scores
↓
Regression Report
Evaluate hundreds or thousands of prompts automatically.
Supported formats:
- CSV
- JSON
- JSONL
Example CSV
question,expected_answer
What is Python?,Programming language
Capital of Japan?,Tokyo
Largest planet?,JupiterCreate your own evaluation metrics.
Example:
class ToxicityMetric(BaseMetric):
def evaluate(self, response):
return scoreEvaluate entire datasets.
python evaluate.py \
--dataset data/questions.csv \
--model gpt-4 \
--output report.jsonAutomatically generate:
- Markdown Reports
- HTML Reports
- JSON Reports
- CSV Reports
Dataset
│
▼
Prompt Generator
│
▼
LLM Provider
OpenAI / Claude / Gemini
│
▼
Generated Response
│
▼
Evaluation Pipeline
┌─────────┬──────────┬──────────┐
▼ ▼ ▼
Accuracy Relevance Hallucination
│ │ │
└─────────┴──────────┘
▼
Final Quality Score
▼
HTML / JSON Report
- Python 3.11+
- FastAPI
- Pydantic
- Pandas
- NumPy
- OpenAI API
- Anthropic Claude
- Google Gemini
- Ollama
- pytest
- pytest-cov
- SQLite
- PostgreSQL
- Plotly
- Matplotlib
llm-evaluation-platform/
│
├── app/
│ ├── api/
│ ├── evaluation/
│ ├── metrics/
│ ├── prompts/
│ ├── reports/
│ ├── services/
│ └── utils/
│
├── datasets/
├── reports/
├── tests/
├── examples/
├── docs/
├── scripts/
└── README.md
Clone the repository
git clone https://github.com/ForwardAva/llm-evaluation-platform.gitEnter project
cd llm-evaluation-platformCreate virtual environment
python -m venv .venvActivate
Windows
.venv\Scripts\activateLinux / macOS
source .venv/bin/activateInstall dependencies
pip install -r requirements.txtSet your API key
OPENAI_API_KEY=your_keyRun evaluation
python evaluate.pyExpected output
Accuracy ............ 94%
Relevance ........... 96%
Faithfulness ........ 91%
Hallucination ....... Low
Overall Score ....... 93.7
- REST API
- CLI Commands
- Configuration
- Evaluation Metrics
- Screenshots
- Contributing
- Roadmap
- License
- FAQ
Start the server
uvicorn app.main:app --reloadDefault URL
http://localhost:8000
Interactive API Documentation
http://localhost:8000/docs
ReDoc
http://localhost:8000/redoc
GET /health
Response
{
"status": "healthy",
"version": "1.0.0"
}POST /api/v1/evaluate
Request
{
"question": "What is Artificial Intelligence?",
"expected_answer": "Artificial Intelligence is...",
"generated_answer": "AI is..."
}Response
{
"overall_score": 91.8,
"metrics": {
"accuracy": 94,
"relevance": 96,
"faithfulness": 90,
"completeness": 88,
"hallucination": 0.04
}
}POST /api/v1/prompts/compare
Response
{
"winner": "Prompt B",
"scores": [
{
"prompt":"Prompt A",
"score":86.2
},
{
"prompt":"Prompt B",
"score":92.4
}
]
}POST /api/v1/evaluate/batch
Input
[
{
"question":"...",
"expected":"..."
}
]Output
{
"processed":250,
"average_score":90.7
}Evaluate one dataset
python evaluate.py \
--dataset datasets/general.csv \
--model gpt-4Generate HTML report
python evaluate.py \
--dataset datasets/general.csv \
--report htmlCompare prompts
python compare.py \
--prompt prompts/v1.txt \
--candidate prompts/v2.txtGenerate regression report
python regression.pyRun all evaluations
python run_all.pyExample .env
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
GOOGLE_API_KEY=
DEFAULT_MODEL=gpt-4
DATABASE_URL=sqlite:///database.db
REPORT_FORMAT=html
MAX_CONCURRENT_REQUESTS=5| Provider | Supported |
|---|---|
| GPT-4 | ✅ |
| GPT-4.1 | ✅ |
| GPT-4o | ✅ |
| Claude 3 | ✅ |
| Gemini | ✅ |
| Ollama | ✅ |
| Local LLMs | ✅ |
| Metric | Description |
|---|---|
| Accuracy | Measures factual correctness |
| Relevance | Measures whether the answer addresses the question |
| Completeness | Measures coverage of expected information |
| Faithfulness | Measures grounding in supplied context |
| Hallucination | Detects unsupported claims |
| Consistency | Compares repeated generations |
| Semantic Similarity | Embedding similarity score |
Question
"What is Retrieval-Augmented Generation?"
────────────────────────────────────
Model
GPT-4
────────────────────────────────────
Accuracy
96%
Relevance
98%
Faithfulness
93%
Completeness
95%
Hallucination Risk
Low
Overall Score
95.5
Status
PASS
Dataset
↓
Generate Responses
↓
Evaluate Responses
↓
Generate Scores
↓
Generate Reports
↓
Review Failures
↓
Improve Prompt
↓
Run Again
datasets/
├── finance.csv
├── healthcare.csv
├── legal.csv
├── coding.csv
└── general.csv
Generated reports include
-
HTML
-
Markdown
-
CSV
-
JSON
Example
reports/
├── evaluation.html
├── evaluation.md
├── evaluation.csv
└── evaluation.json
Run unit tests
pytestRun coverage
pytest --covRun integration tests
pytest tests/integrationAverage evaluation speed
| Dataset Size | Time |
|---|---|
| 10 | < 5 sec |
| 100 | < 40 sec |
| 500 | < 3 min |
| 1000 | < 7 min |
Replace these placeholders with your own screenshots.
/docs/images/dashboard.png
/docs/images/report.png
/docs/images/evaluation.png
/docs/images/api.png
- Evaluation pipeline
- Prompt comparison
- REST API
- HTML reports
- Batch evaluation
- PDF report export
- Docker support
- Model benchmarking
- Authentication
- Web dashboard
- Team workspaces
- Evaluation history
- Scheduled evaluations
- Plugin system
Contributions are welcome.
-
Fork the repository
-
Create a feature branch
git checkout -b feature/my-feature- Commit changes
git commit -m "Add new evaluation metric"- Push
git push origin feature/my-feature- Open a Pull Request
Distributed under the MIT License.
See the LICENSE file for more information.
This project was inspired by the growing need for reliable evaluation tools for Large Language Models and AI-powered applications.
Special thanks to the open-source AI community for advancing evaluation methodologies and responsible AI engineering.
Oscar Garcia
AI Quality Engineer • LLM Evaluation Specialist • AI Application Developer
If you find this project useful, consider giving it a ⭐ on GitHub.
It helps others discover the project and supports future development.
Built with ❤️ for the AI Engineering and LLM Evaluation community.