# How does RAGAS work?

**URL:** <https://discuss.huggingface.co/t/how-does-ragas-work/73910>\
**Category:** Beginners\
**Created:** [February 20, 2024, 5:02am UTC](https://discuss.huggingface.co/t/how-does-ragas-work/73910 "2024-02-20T05:02:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christian2901](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@Christian2901](https://discuss.huggingface.co/u/Christian2901)\
**Post date:** [February 20, 2024, 5:02am UTC](https://discuss.huggingface.co/t/how-does-ragas-work/73910/1 "2024-02-20T05:02:26Z")

</div>

Hello everybody,

I take a look in the [RAGAS library](https://github.com/explodinggradients/ragas/tree/main) and my question is, **how do they handle the response of the evaluation language models and based on them, how do they calculate the metrics**?

If I implement RAGAS by myself, I prompt the (evaluation) language model like Llama-2. In the next step I extract the results with the help of regular expression. As last step I calculate the values that RAGAS describe in their paper.

But, I take a look in the [RAGAS library](https://github.com/explodinggradients/ragas/tree/main) and I can’t find a process to handle the responses.

How do they do that?

Best regards  
Christian

---

<div class="post-metadata">

**Author:** ![dkoterwa](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@dkoterwa](https://discuss.huggingface.co/u/dkoterwa)\
**Post date:** [March 4, 2024, 12:31pm UTC](https://discuss.huggingface.co/t/how-does-ragas-work/73910/2 "2024-03-04T12:31:01Z")

</div>

Hi,  
You can see more detailed explanations of how the metrics are calculated on [their website](https://docs.ragas.io/en/stable/concepts/metrics/index.html).
