10000 added readme · Bubby2015/azure-sql-db-openai@efe0ded · GitHub
[go: up one dir, main page]

Skip to content

Commit efe0ded

Browse files
committed
added readme
1 parent d41465f commit efe0ded

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

python/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Hybrid Search
2+
3+
This sample shows how to combine Fulltext search in Azure SQL database with BM25 ranking and cosine similarity ranking to do hybrid search.
4+
5+
In this sample the local model [multi-qa-MiniLM-L6-cos-v1](https://huggingface.co/sentence-transformers/multi-qa-MiniLM-L6-cos-v1) to generate embeddings. The Python script `./python/hybrid_search.py` shows how to
6+
7+
- use Python to generate the embeddings
8+
- do similarity search in Azure SQL database
9+
- use [Fulltext search in Azure SQL database with BM25 ranking](https://learn.microsoft.com/en-us/sql/relational-databases/search/limit-search-results-with-rank?view=sql-server-ver16#ranking-of-freetexttable)
10+
- do re-ranking applying Reciprocal Rank Fusion (RRF) to combine the BM25 ranking with the cosine similarity ranking
11+
12+
Make sure to setup the database for this sample using the `./python/00-setup-database.sql` script. Database can be either an Azure SQL DB or a SQL Server database.

0 commit comments

Comments
 (0)
0