0xPlaygrounds / rig

A library for developing LLM-powered Rust applications.
https://rig.rs
MIT License
81 stars 3 forks source link

feat(datastore): add Qdrant data store #2

Open joshua-mo-143 opened 3 weeks ago

joshua-mo-143 commented 3 weeks ago

Hey there!

I think adding Qdrant as a possible data store would be quite beneficial for the library as they're fairly well known within the RAG community, so adding it would increase the amount of potential use cases by quite a lot.

I'm happy to implement this for you as it looks like the scope of this is quite clear (just adding a new crate and implementing relevant traits, then adding it to the list whenever you need to release), but wanted to reach out first and make sure it's OK to add.

cvauclair commented 3 weeks ago

Hey @joshua-mo-143, excellent idea, we're always looking to add support for more vector data stores! Qdrant was not in our immediate implementation roadmap but if you want to integrate it, go for it! If you have any questions, we're more than happy to help out as well!

The integration should follow the same strategy as the MongoDB integration that is already part of the repo. As you mentioned, integration is pretty straightforward with you just having to implement the traits for whatever Qdrant client you want to use. If you could also include an example or two that would be perfect! In case you were wondering, the reason we're packaging the vector store integrations in separate crates is to keep the rig-core crate as lightweight as possible.

Note that we are still tweaking the Rig API and the traits mentioned above will most likely change over time. Additionally, if you find that the existing traits could be improved (e.g.: if they are not expressive enough to capture all of Qdrant's functionality) please let us know, Rig is still very early in its development and we're always looking for feedback!

Happy coding!