Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swiftide integration #1165

Open
timonv opened this issue Aug 4, 2024 · 3 comments
Open

Swiftide integration #1165

timonv opened this issue Aug 4, 2024 · 3 comments

Comments

@timonv
Copy link

timonv commented Aug 4, 2024

Hey everyone, amazing work on Ragas! Recently I've been working on Swiftide, and I'm looking to integrate with an evaluation framework. Rust is great at performance, Python is king at data anytics.

We don't have python bindings yet, but I'd be happy to do everything on the Swiftide side to put down something cool.

@jjmachan
Copy link
Member

jjmachan commented Aug 5, 2024

@timonv thanks for raising this suggestion - would love to do it, Swiftide looks great!
How should we do this though? One way could be with #1011 and making some rust bindings?

but I think the easiest would be to create a notebook/documentation with utils code that makes it easier

  1. create the dataframe needed by ragas with swiftide
  2. evaluate with ragas
  3. show results

would love to hear your suggestions 🙂

@timonv
Copy link
Author

timonv commented Aug 6, 2024

@jjmachan Is the dataset basically question, contexts (retrieved documents?) and an answer? #1011 would be amazing, my guess is that most users would prefer to start out with a python notebook so they can analyze and compare different setups.

Any ideas on how we would run it from a notebook? Full python bindings are a bit of an effort as we are heavy on the less trivial features. Maybe I can create a tiny wrapper support library that can call a fully constructed pipeline from python.

An even simpler poc approach could be to simply call a compiled binary and have the dataframe output to a file or stdout.

@jjmachan
Copy link
Member

jjmachan commented Aug 7, 2024

alrighty maybe lets start with the notebook then and take it up from there? would love to have a quick chat with you before so we can plan?

timonv added a commit to bosun-ai/swiftide that referenced this issue Aug 29, 2024
Work in progress on support for ragas as per
explodinggradients/ragas#1165 and #232

Add an optional evaluator to a pipeline. Evaluators need to handle
transformation events in the query pipeline. The Ragas evaluator
captures the transformations as per
https://docs.ragas.io/en/latest/howtos/applications/data_preparation.html.

You can find a working notebook here
https://github.com/bosun-ai/swiftide-tutorial/blob/c510788a625215f46575415161659edf26fc1fd5/ragas/notebook.ipynb
with a pipeline using it here
bosun-ai/swiftide-tutorial#1



TODO:
- [x] Test it with Ragas
- [x] Add more tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants