You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v0.2 is the start of the transition for Ragas from an evaluation library for RAG pipelines to a more general library that you can use to evaluate any LLM applications you build. The meant we had to make some fundamental changes to the library that will break your workflow. Hopeful this guide will make that transition as easy as possible.
4
+
5
+
## Outline
6
+
7
+
1. Evaluation Dataset
8
+
2. Metrics
9
+
3. Testset Generation
10
+
4. Prompt Object
11
+
12
+
## Evaluation Dataset
13
+
14
+
We have moved from using HuggingFace [`Datasets`](https://huggingface.co/docs/datasets/v3.0.1/en/package_reference/main_classes#datasets.Dataset) to our own [`EvaluationDataset`][ragas.dataset_schema.EvaluationDataset] . You can read more about it from the core concepts section for [EvaluationDataset](../../concepts/components/evaluation-dataset.md) and [EvaluationSample](../../concepts/components/eval_sample.md)
15
+
16
+
You can easily translate
17
+
18
+
```python
19
+
from ragas import EvaluationDataset, SingleTurnSample
20
+
21
+
hf_dataset =...# your huggingface evaluation dataset
All the default metrics are still supported and many new metrics have been added. Take a look at the [documentation page](../../concepts/metrics/available_metrics/index.md) for the entire list.
34
+
35
+
How ever there are a couple of changes in how you use metrics
36
+
37
+
Firstly it is now preferred to initialize metrics with the evaluator LLM of your choice as oppose to using the initialized version of the metrics into [`evaluate()`][ragas.evaluation.evaluate] . This avoids a lot of confusion regarding which LLMs are used where.
38
+
39
+
```python
40
+
from ragas.metrics import faithfullness # old way, not recommended but still supported till v0.3
Second is that [`metrics.ascore`][ragas.metrics.base.Metric.ascore] is now being deprecated in favor of [`metrics.single_score`][ragas.metrics.base.SingleTurnMetric.single_turn_ascore] . You can make the transition as such
[Testset Generation](../../concepts/test_data_generation/rag.md) has been redesigned to be much more cost efficient. If you were using the end-to-end workflow checkout the [getting started](../../getstarted/rag_testset_generation.md).
67
+
68
+
**Notable Changes**
69
+
70
+
- Removed `Docstore` in favor of a new `Knowledge Graph`
71
+
- Added `Transforms` which will convert the documents passed into a rich knowledge graph
72
+
- More customizable with `Synthesizer` objects. Also refer to the documentation.
73
+
- New workflow makes it much cheaper and intermediate states can be saved easily
74
+
75
+
This might be a bit rough but if you do need help here, feel free to chat or mention it here and we would love to help you out 🙂
76
+
77
+
## Prompt Object
78
+
79
+
All the prompts have been rewritten to use [`PydanticPrompts`][ragas.prompt.pydantic_prompt.PydanticPrompt] which is based on [`BasePrompt`][ragas.prompt.base.BasePrompt] object. If you are using the old `Prompt` object you will have to upgrade it to the new one, check the docs to learn more on how to do it
80
+
81
+
-[How to Guide on how to create new prompts](../../howtos/customizations/metrics/modifying-prompts-metrics.md)
82
+
-[Github PR for the changes](https://github.com/explodinggradients/ragas/pull/1462)
83
+
84
+
!!! note "Need Further Assistance?"
85
+
86
+
If you have any further questions feel free to post them in this [github issue](https://github.com/explodinggradients/ragas/issues/1486) or reach out to us on [cal.com](https://cal.com/shahul-ragas/30min)
0 commit comments