Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 0 additions & 117 deletions LAB_NOTES.md

This file was deleted.

37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Python Version](https://img.shields.io/badge/python-3.9%2B-blue.svg)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![PyPI](https://img.shields.io/pypi/v/llm-eval-kit-v1.svg)](https://pypi.org/project/llm-eval-kit-v1/)

`llm-eval-kit` is a lightweight, fully offline Python library designed to evaluate the quality of LLM responses. It runs evaluation checks locally—requiring **no external APIs, no internet connection (after setup), and no paid subscriptions**.

Expand All @@ -25,13 +26,29 @@ Designed to fit seamlessly into CI/CD pipelines, this library helps automate pro
Install the package via `pip` (requires Python 3.9+):

```bash
pip install llm-eval-kit
pip install llm-eval-kit-v1
```

*Note: On first run, the library will automatically download the local embedding model `all-MiniLM-L6-v2` (approx. 90MB) to your local cache. All subsequent executions run entirely offline.*

---

## Dependencies

`llm-eval-kit` requires **Python 3.9+** and uses the following dependencies:

### Core Dependencies
- **[`sentence-transformers`](https://pypi.org/project/sentence-transformers/) (`>=2.2.0`)**: Generates local dense semantic embeddings via `all-MiniLM-L6-v2` for cosine similarity, relevance, and grounding checks.
- **[`scikit-learn`](https://pypi.org/project/scikit-learn/) (`>=1.0.0`)**: Powers vector computations and similarity metrics.
- **[`typer`](https://pypi.org/project/typer/) (`>=0.9.0`)**: Provides the developer-friendly CLI interface (`llm-eval`).

### Development & Testing Dependencies (Optional)
Install via `pip install "llm-eval-kit-v1[dev]"`:
- **[`pytest`](https://pypi.org/project/pytest/) (`>=7.0.0`)**: Test discovery and execution.
- **[`pytest-cov`](https://pypi.org/project/pytest-cov/) (`>=4.0.0`)**: Test suite coverage analysis and reporting.

---

## Quick Start (Python API)

Here is a 4-line example demonstrating how to run the evaluator:
Expand Down Expand Up @@ -194,3 +211,21 @@ Because `Evaluator.evaluate()` defaults to executing all registered criteria whe
1. **Semantic Similarity != Factual Accuracy:** Grounding checks reflect semantic alignment with the provided context passage. A response can score high simply by repeating the vocabulary and structure of the context even if a key detail is wrong (mitigated by the numeric mismatch check).
2. **Directional Refusals:** The `refusal_check` only identifies *whether* a refusal happened. It does not judge if the refusal was appropriate (e.g. refusing harmful prompts).
3. **Implicit Aspects:** Heuristic aspect-splitting for completeness checks may miss implicit sub-questions in complex prompts.

---

## Authors & Maintainers

- **Authors:**
- Mahrukh Baig (Lead Engineer)
- Muhammad Maaz (Research & Implementation Engineer)
- Warisha Arshad (Integration & Evaluation Engineer)
- **Maintainer:** [INFERENCE Lab](https://github.com/Inference-LAB)

> **Note:** Developed under the **INFERENCE Lab Engineering Cohort 01**.

---

## License

This project is licensed under the [MIT License](LICENSE).
20 changes: 15 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,23 @@ requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "llm-eval-kit"
version = "0.1.0"
name = "llm-eval-kit-v1"
version = "0.1.2"
authors = [
{ name = "Mahrukh Baig", email = "mahrukh@example.com" }
{ name = "Mahrukh Baig" },
{ name = "Muhammad Maaz" },
{ name = "Warisha Arshad" },
]
description = "A lightweight, offline Python library for scoring LLM response quality."
maintainers = [
{ name = "INFERENCE Lab" },
]
description = "A lightweight, offline Python library for scoring LLM response quality. This project is made under the INFERENCE Lab engineering cohort 01."
readme = "README.md"
license = "MIT"
requires-python = ">=3.9"
keywords = ["llm", "evaluation", "offline", "inference-lab", "cohort-01"]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
Expand All @@ -31,6 +37,10 @@ dev = [
[project.scripts]
llm-eval = "llm_eval_kit.cli:app"

[project.urls]
"Homepage" = "https://github.com/Inference-LAB/llm-eval-kit"
"Repository" = "https://github.com/Inference-LAB/llm-eval-kit.git"

[tool.setuptools.packages.find]
where = ["."]
include = ["llm_eval_kit*"]
Expand Down
Loading