Skip to content

Commit 342b23f

Browse files
jjmachanJithin James
andauthored
name change belar => ragas (#15)
* readme init * new logo * new logo * new logo * fix height * change belar -> ragas * fix ci * Update README.md * added quickstart * lint changes --------- Co-authored-by: Jithin James <[email protected]>
1 parent d5d0310 commit 342b23f

File tree

16 files changed

+109
-52
lines changed

16 files changed

+109
-52
lines changed

β€Ž.gitignoreβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,4 @@ cython_debug/
160160
#.idea/
161161
belar/_version.py
162162
**/tmp.ipynb
163+
ragas/_version.py

β€ŽMakefileβ€Ž

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ help: ## Show all Makefile targets
55

66
.PHONY: format lint type style clean run-benchmarks
77
format: ## Running code formatter: black and isort
8+
@echo "(isort) Ordering imports..."
9+
@isort .
810
@echo "(black) Formatting codebase..."
9-
@black --config pyproject.toml belar tests examples
11+
@black --config pyproject.toml ragas tests examples
1012
@echo "(black) Formatting stubs..."
11-
@find belar -name "*.pyi" ! -name "*_pb2*" -exec black --pyi --config pyproject.toml {} \;
12-
@echo "(isort) Reordering imports..."
13-
@isort .
13+
@find ragas -name "*.pyi" ! -name "*_pb2*" -exec black --pyi --config pyproject.toml {} \;
1414
@echo "(ruff) Running fix only..."
15-
@ruff check belar examples tests --fix-only
15+
@ruff check ragas examples tests --fix-only
1616
lint: ## Running lint checker: ruff
1717
@echo "(ruff) Linting development project..."
18-
@ruff check belar examples tests
18+
@ruff check ragas examples tests
1919
type: ## Running type checker: pyright
2020
@echo "(pyright) Typechecking codebase..."
21-
@pyright -p belar
21+
@pyright -p ragas
2222
clean: ## Clean all generated files
2323
@echo "Cleaning all generated files..."
2424
@cd $(GIT_ROOT)/docs && make clean

β€ŽREADME.mdβ€Ž

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,36 @@
1-
# BeLAR
2-
Benchmarking LLM Augmented Retrieval
1+
<h1 align="center">
2+
<img style="vertical-align:middle" height="200"
3+
src="./docs/assets/logo.png">
4+
</h1>
5+
<p align="center">
6+
<i>SOTA metrics for evaluating Retrieval Augmented Generation (RAG)</i>
7+
</p>
8+
9+
<p align="center">
10+
<a href="https://github.com/beir-cellar/beir/releases">
11+
<img alt="GitHub release" src="https://img.shields.io/github/release/beir-cellar/beir.svg">
12+
</a>
13+
<a href="https://www.python.org/">
14+
<img alt="Build" src="https://img.shields.io/badge/Made%20with-Python-1f425f.svg?color=purple">
15+
</a>
16+
<a href="https://github.com/beir-cellar/beir/blob/master/LICENSE">
17+
<img alt="License" src="https://img.shields.io/github/license/beir-cellar/beir.svg?color=green">
18+
</a>
19+
<a href="https://colab.research.google.com/drive/1HfutiEhHMJLXiWGT8pcipxT5L2TpYEdt?usp=sharing">
20+
<img alt="Open In Colab" src="https://colab.research.google.com/assets/colab-badge.svg">
21+
</a>
22+
<a href="https://github.com/beir-cellar/beir/">
23+
<img alt="Downloads" src="https://badges.frapsoft.com/os/v1/open-source.svg?v=103">
24+
</a>
25+
</p>
26+
27+
<h4 align="center">
28+
<p>
29+
<a href="#beers-installation">Installation</a> |
30+
<a href="#beers-quick-example">Quick Example</a> |
31+
<a href="https://huggingface.co/BeIR">Hugging Face</a>
32+
<p>
33+
</h4>
34+
35+
## What
36+

β€Žbelar/metrics/__init__.pyβ€Ž

Lines changed: 0 additions & 18 deletions
This file was deleted.

β€Ždocs/assets/logo.pngβ€Ž

33.2 KB
Loading

β€Žexamples/quickstart.ipynbβ€Ž

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,32 @@
1010
},
1111
{
1212
"cell_type": "code",
13-
"execution_count": 30,
13+
"execution_count": 1,
1414
"id": "22c7dd25",
1515
"metadata": {},
16-
"outputs": [
17-
{
18-
"name": "stdout",
19-
"output_type": "stream",
20-
"text": [
21-
"The autoreload extension is already loaded. To reload it, use:\n",
22-
" %reload_ext autoreload\n"
23-
]
24-
}
25-
],
16+
"outputs": [],
2617
"source": [
18+
"# only run this if your have an editable install\n",
2719
"%load_ext autoreload\n",
2820
"%autoreload 2"
2921
]
3022
},
23+
{
24+
"cell_type": "markdown",
25+
"id": "40258397",
26+
"metadata": {},
27+
"source": [
28+
"## Load the Data\n",
29+
"\n",
30+
"For this quickstart we are going to be using a dataset that we prepared from [eli5](https://huggingface.co/datasets/eli5) dataset with the models response. \n",
31+
"\n",
32+
"prompt: str\n",
33+
"context: str\n",
34+
"references: list[str]\n",
35+
"ground_truth: list[str]\n",
36+
"generated_text: str"
37+
]
38+
},
3139
{
3240
"cell_type": "code",
3341
"execution_count": 2,
@@ -85,7 +93,9 @@
8593
"cell_type": "code",
8694
"execution_count": 28,
8795
"id": "a77c805d",
88-
"metadata": {},
96+
"metadata": {
97+
"scrolled": true
98+
},
8999
"outputs": [
90100
{
91101
"name": "stderr",

β€Žpyproject.tomlβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[project]
2-
name = "belar"
2+
name = "ragas"
33
dependencies = [
44
"Levenshtein",
55
"rouge-score",
@@ -19,4 +19,4 @@ readme = {file = ["README.md"], content-type = "text/plain"}
1919
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
2020
build-backend = "setuptools.build_meta"
2121
[tool.setuptools_scm]
22-
write_to = "belar/_version.py"
22+
write_to = "ragas/_version.py"
File renamed without changes.

β€Žragas/metrics/__init__.pyβ€Ž

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from ragas.metrics.base import Evaluation, Metric
2+
from ragas.metrics.factual import EntailmentScore
3+
from ragas.metrics.similarity import SBERTScore
4+
from ragas.metrics.simple import BLUE, EditDistance, EditRatio, Rouge1, Rouge2, RougeL
5+
6+
__all__ = [
7+
"Evaluation",
8+
"Metric",
9+
"EntailmentScore",
10+
"SBERTScore",
11+
"BLUE",
12+
"EditDistance",
13+
"EditRatio",
14+
"RougeL",
15+
"Rouge1",
16+
"Rouge2",
17+
]
File renamed without changes.

0 commit comments

Comments
Β (0)