CREATE VECTOR INDEX works; the skill said it did not - #150
Open
Carlos Robles (croblesm) wants to merge 1 commit into
Open
CREATE VECTOR INDEX works; the skill said it did not#150Carlos Robles (croblesm) wants to merge 1 commit into
Carlos Robles (croblesm) wants to merge 1 commit into
Conversation
azuresql-db-rag told readers the vector index was "still in development" and to not rely on it. Measured on 2026-08-29 against 12.0.2000.8, EngineEdition 5: an index over 2000 rows of VECTOR(3) built in 478 ms, appears in sys.indexes with type_desc VECTOR, and vector_search() returns ranked results against it. Two real obstacles replace the old warning, because neither error names its own cause: SET QUOTED_IDENTIFIER ON is required and is off by default in sqlcmd. Without it the statement fails with Msg 1934, whose text lists indexed views, computed columns, filtered indexes, query notifications, XML methods and spatial indexes, and never mentions the session setting responsible. Once the index exists, vector_search() rejects an explicit TOP_N with Msg 42274. Use SELECT TOP (k) with ORDER BY s.distance. Full-scan top-k stays exact and stays the right choice for a small table, so the guidance to use it is kept rather than removed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
azuresql-db-ragtells readers thatCREATE VECTOR INDEXis "still in development in this preview" and to not rely on it. That is no longer true, and the skill is steering people away from a feature that works.Measured
2026-08-29, against
12.0.2000.8,EngineEdition5, imageazure-sql/db-dev:latest:VECTOR(3)built in 478 ms.sys.indexeswithtype_descofVECTOR.vector_search(...)returns ranked results against it.Two obstacles replace the old warning, and neither error names its own cause
SET QUOTED_IDENTIFIER ONis required, and it is off by default in asqlcmdsession. Without it:Everything that message names is irrelevant here, and the setting that actually caused it is not mentioned. A reader hitting this concludes the feature is broken, which is exactly what the skill already told them to expect.
TOP_Nis rejected once the index exists.vector_search(...)with an explicitTOP_Nfails withMsg 42274, Vector search with newer index version does not support explicit TOP_N parameter. UseSELECT TOP (k)withORDER BY s.distance.What is kept
Full-scan top-k with
ORDER BY VECTOR_DISTANCE(...)is still exact and still the right choice for a small table, so that guidance stays. The index is now presented as the choice once a full scan starts to hurt, rather than as something unavailable.Changed in
skills/azuresql-db-rag/SKILL.md(the description, the indexing section, and the do-not list) and inreferences/vector-schema.md.