
That is a pure genius idea, it solves the main problem of the embeddings based search: bad user input.
And it requires minimal changes from our existing setup, as you only need to add a small step “enriching” the search query ![]()
On this topic, something that we can also do is doing a hybrid search:
- Search using existing PG full text search
- Search using embeddings
- Gather both best 50 results
- Pass to a search re-ranker service
- Show the re-ranked results
We already ship a super capable re-ranked in our existing embeddings API under a separate endpoint, this has all the necessary pieces ready to happen.
Example here:
https://github.com/pgvector/pgvector-python/blob/master/examples/hybrid_search.py#L67-L70