Microsoft SQL supports two forms of hybrid search: combining full-text keyword search (BM25-based FREETEXTTABLE) with vector search, and dynamically switching between exact kNN and approximate ANN (DiskANN-based) vector search depending on data scale. The piece covers FREETEXTTABLE() syntax, VECTOR_SEARCH() syntax, model integration via sp_invoke_external_rest_endpoint and AI_GENERATE_EMBEDDINGS, and how Reciprocal Rank Fusion combines full-text and vector rankings into a single RAG-ready retrieval pipeline inside SQL.
Table of contents
Text search Copy linkVector search Copy linkModel integration Copy linkHybrid search Copy linkQuestions this post answers
What is the difference between kNN and ANN vector search in SQL Server's VECTOR_SEARCH function?
kNN is exact vector search that compares a query vector against all available vectors and returns the closest matches, but its cost grows with data set size. ANN, implemented via DiskANN, trades some accuracy for speed and scales to millions or billions of vectors without heavy memory use. SQL dynamically switches between the two based on cost and selectivity. See how daily.dev surfaces practical guidance for engineers tuning vector search performance in SQL.
How do I combine full-text search and vector search results in SQL Server for hybrid search?
Full-text search finds relevant words while vector search finds semantic meaning; each produces its own ranked result set. Reciprocal Rank Fusion (RRF) then merges those two rankings into a single ordered result set, optionally weighting one search type more heavily than the other, enabling a hybrid search workflow entirely inside SQL. daily.dev helps developers compare retrieval techniques like RRF when designing hybrid search pipelines.
How can I call external REST APIs like GPT or Cohere from T-SQL in Azure SQL?
Use the sp_invoke_external_rest_endpoint stored procedure, introduced in Azure SQL in 2022, which lets T-SQL call REST services directly, with credentials protected inside SQL and access limited by an allowlist of approved domains including Microsoft Foundry, Microsoft Graph, Power BI, and major Azure services. Extending beyond the allowlist requires services like API Management. Developers wiring RAG pipelines into SQL often track integration patterns like this on daily.dev.