spring-projects / spring-ai

An Application Framework for AI Engineering
https://docs.spring.io/spring-ai/reference/1.0-SNAPSHOT/index.html
Apache License 2.0
3k stars 744 forks source link

Support hybrid search #579

Closed impactCn closed 3 weeks ago

impactCn commented 5 months ago

image During search, hybrid search, similar search and keyword search will be supported and submitted to LLM.

I am willing to submit this feature. Does the community have any better suggestions for my feature?

markpollack commented 5 months ago

We are working on this feature now in an Agent model. It allows for multiple retrievers and then post processing those results. I hope to have it released in the 1.0 M1 next week, if not by a M2 release. Either way when there is a branch or PR to share, I’ll post back here.

impactCn commented 5 months ago

@markpollack Hi, I have implemented a hybrid search for PG that uses full-text retrieval and vector similarity. If the community needs me to implement it, I can submit it.

alessiobertazzo88 commented 1 month ago

Hello everyone, I have also developed this feature that enables the user to define within the SearchRequest whether to use similarity search (vector-based, enabled by default), full-text search, or both (hybrid search). Additionally, it provides the possibility of using reranking approaches.

This implementation is applied to the vector store Azure SearchAI, and the implementation done by @impactCn can be seamlessly integrated as well.

The PR is #1227

csterwa commented 3 weeks ago

Duplicate #517