Omartificial-Intelligence-Space
commited on
Commit
•
49ebcbb
1
Parent(s):
7603529
update readme.md
Browse files
README.md
CHANGED
@@ -21,13 +21,18 @@ tags:
|
|
21 |
|
22 |
✨ The output score can be transformed into a [0, 1] range using a sigmoid function, providing a clear and interpretable measure of relevance.
|
23 |
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
|
26 |
## Usage
|
27 |
### Using sentence-transformers
|
28 |
|
29 |
```
|
30 |
-
pip
|
31 |
```
|
32 |
```python
|
33 |
from sentence_transformers import CrossEncoder
|
@@ -62,7 +67,31 @@ for i, (candidate, score) in enumerate(ranked_candidates, 1):
|
|
62 |
print(f"Score: {score}\n")
|
63 |
```
|
64 |
## Evaluation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
|
68 |
|
|
|
21 |
|
22 |
✨ The output score can be transformed into a [0, 1] range using a sigmoid function, providing a clear and interpretable measure of relevance.
|
23 |
|
24 |
+
## Arabic RAG Pipeline
|
25 |
+
|
26 |
+
|
27 |
+
![Arabic RAG Pipeline](https://i.ibb.co/z4Fc3Kd/Screenshot-2024-11-28-at-10-17-39-AM.png)
|
28 |
+
|
29 |
|
30 |
|
31 |
## Usage
|
32 |
### Using sentence-transformers
|
33 |
|
34 |
```
|
35 |
+
pip install sentence-transformers
|
36 |
```
|
37 |
```python
|
38 |
from sentence_transformers import CrossEncoder
|
|
|
67 |
print(f"Score: {score}\n")
|
68 |
```
|
69 |
## Evaluation
|
70 |
+
### Dataset
|
71 |
+
|
72 |
+
Size: 3000 samples.
|
73 |
+
|
74 |
+
### Structure:
|
75 |
+
🔸 Query: A string representing the user's question.
|
76 |
+
|
77 |
+
🔸 Candidate Document: A candidate passage to answer the query.
|
78 |
+
|
79 |
+
🔸 Relevance Label: Binary label (1 for relevant, 0 for irrelevant).
|
80 |
+
|
81 |
+
### Evaluation Process
|
82 |
+
|
83 |
+
🔸 Query Grouping: Queries are grouped to evaluate the model's ability to rank candidate documents correctly for each query.
|
84 |
+
|
85 |
+
🔸 Model Prediction: Each model predicts relevance scores for all candidate documents corresponding to a query.
|
86 |
+
|
87 |
+
🔸 Metrics Calculation: Metrics are computed to measure how well the model ranks relevant documents higher than irrelevant ones.
|
88 |
|
89 |
+
| Model | MRR | MAP | nDCG@10 |
|
90 |
+
|-------------------------------------------|------------------|------------------|------------------|
|
91 |
+
| cross-encoder/ms-marco-MiniLM-L-6-v2 | 0.6313333333333334 | 0.6313333333333334 | 0.725444959171438 |
|
92 |
+
| cross-encoder/ms-marco-MiniLM-L-12-v2 | 0.6643333333333332 | 0.6643333333333332 | 0.7500407855785803 |
|
93 |
+
| BAAI/bge-reranker-v2-m3 | 0.9023333333333332 | 0.9023333333333332 | 0.9274971489500038 |
|
94 |
+
| Omartificial-Intelligence-Space/ARA-Reranker-V1 | 0.9335 | 0.9335 | 0.9507001860964314 |
|
95 |
|
96 |
|
97 |
|