erincon01 / Vector

Vector type implementation in SQL CLR - before SQL Server 2025
MIT License
0 stars 1 forks source link

Just wanted to say AWESOME! #3

Open mwwhited opened 1 day ago

mwwhited commented 1 day ago

A while back I was playing around with trying to do vector searches in SQL server. At the time I was working with azure instances, so I had to abuse TSQL, user defined functions and storing vectors as vertical tables (ain't nobody got time to make that production ready.) Getting another chance with an on-premises this time and watching SQLCLR crunch though these distance calculations is amazing.

Just wanted to say thanks and awesome work.

erincon01 commented 1 day ago

Glad you like it Matthew! Later tonight I will put chatcompletion samples to Azure Openai and local embeddings calculation stored procedure for Ollama. btw, how did get to the repo? linkedin?

Regards,

mwwhited commented 1 day ago

Good old fashion search. I've started to make a point to make a search for ideas before implementing them. Funny that you just posted this project a few days ago. Cool you are looking into a chat stuff. My current need is just semantic search. I'm using a sentence transformer to embed values for comparisons. I should probably look for or just generate my own model but the vector type with the distant functions works great for my PoC.

It's really nice not having to bust out a second database just for vector persistence or having to do the calculations externally.

erincon01 commented 1 day ago

I have added a CLR function called sp_invoke_ollama_model for local models; you may like it ;) https://github.com/erincon01/Vector/blob/main/sample_queries_embeddings.sql

mwwhited commented 1 day ago

For security reasons we don't want external access (sad I know). I might see about using ONNX and ML.Net to shove a sentence transformer into SQLCLR that will probably be a bit much. For right now I'm just glad I can use sqlclr. The last several years I've been stuck on Azure managed instances.

I will take a look at your other extensions on my own time when I get a chance. It's really a shame that Microsoft is taking so long to add this functionality. And even if you wanted to use the External Language stuff you can use dotnet on Linux.

Next up is figuring out a way to bolt on HNSW to improve search performance.

erincon01 commented 1 day ago

You should have "external access" with other alternatives. What I'd suggest is hardcode in the CLR function the allowed domains. Then put the subdomain as stored procedure parameter. This may convince the auditor that you allow external access to a limited domain.

El jue, 21 nov 2024, 8:10 p. m., Matthew Whited @.***> escribió:

For security reasons we don't want external access (sad I know). I might see about using ONNX and ML.Net to shove a sentence transformer into SQLCLR that will probably be a bit much. For right now I'm just glad I can use sqlclr. The last several years I've been stuck on Azure managed instances.

I will take a look at your other extensions on my own time when I get a chance. It's really a shame that Microsoft is taking so long to add this functionality. And even if you wanted to use the External Language stuff you can use dotnet on Linux.

Next up is figuring out a way to bolt on HNSW to improve search performance.

— Reply to this email directly, view it on GitHub https://github.com/erincon01/Vector/issues/3#issuecomment-2492052175, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABW74J5RT4UP4QDT5YKOAX32BYV2TAVCNFSM6AAAAABSFRUAJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJSGA2TEMJXGU . You are receiving this because you commented.Message ID: @.***>