OpenViSTAI · Agents · Blockchain · Crypto
Menu
RAG & Knowledge Systems

Sqlrag

SQLRAG is a C# SQL Server extension that provides CLR functions for vector-similarity calculations and calls to OpenAI or Azure OpenAI for embeddings and chat completion.

Independent OpenViST project profile, based on linked sources.

Sqlrag — OpenViST project profile in RAG & Knowledge Systems.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when a SQL Server 2022 project needs vector-similarity functions or documented OpenAI and Azure OpenAI calls as part of a RAG workflow.

Who it is for

  • Developers building RAG systems backed by Microsoft SQL Server.
  • SQL Server teams exploring vector similarity and database-side embedding or chat-completion calls.

Documented uses

  • Calculate vector similarity, including cosine similarity and Euclidean distance, within SQL Server.
  • Request embeddings and chat completions through OpenAI or Azure OpenAI functions.
  • Explore a query-intent semantic cache using the included SQL example.
Before you choose

Requirements & limits

The repository describes the project as open source and provides source-based deployment instructions.

  • The documented minimum setup is SQL Server 2022 and Visual Studio 2022 with SSDT.
  • The SQL Server CLR feature must be enabled.
  • The project offers installation through a release SQL script, a DACPAC, or deployment from Visual Studio source.
  • OpenAI or Azure OpenAI credentials are stored in an encrypted database table; Azure OpenAI setup also uses an endpoint and API version.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install SQLRAG from the release SQL script

Deploy SQLRAG to a SQL Server 2022 database using the documented SQL-script option.

Before you start

  • SQL Server 2022
  • SQL Server CLR enabled
  • The SQLRAG_CREATE.sql file provided in the project release

Steps

  1. Enable SQL Server CLR using the documented sp_configure settings and RECONFIGURE statements.

  2. Run SQLRAG_CREATE.sql against the SQLRAG database.

Expected outcome

The project’s documented first-time installation path is to create SQLRAG by running the release script.

Guide limitations

  • The instructions give DACPAC and source-deployment alternatives but do not detail their complete procedures here.
  • OpenAI or Azure OpenAI functions require separate credential configuration.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
18 October 2026
Original website title
AllanYiin/SQLRAG · Official homepage title · retained in its source language