Skip to content

Commit 5ae04d1

Browse files
committed
2 parents ad75263 + f4c7c78 commit 5ae04d1

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

README.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ description: Build a session recommender using Jamstack and Event-Driven archite
2424

2525
This sample demonstrates how to build a session recommender using Jamstack and Event-Driven architecture, using Azure SQL DB to store and search vectors embeddings generated using OpenAI. The solution is built using Azure Static Web Apps, Azure Functions, Azure SQL Database, and Azure OpenAI.
2626

27-
A fully working, production ready, version of this sample, that has been used at [VS Live](https://vslive.com/) conferences, is available here: https://icy-beach-0b0dc380f.5.azurestaticapps.net/
27+
A fully working, production ready, version of this sample, that has been used at [VS Live](https://vslive.com/) conferences, is available here: https://ai.microsofthq.vslive.com/
2828

2929
![Retrieval Augmented Generator flow](./_docs/rag.png)
3030

@@ -52,7 +52,7 @@ Azure SQL database can be used to easily and quickly perform vector similarity s
5252
The **native option** uses the new Vector Functions, recently introduced in Azure SQL database. Vector Functions are a set of functions that can be used to perform vector operations directly in the database.
5353

5454
> [!NOTE]
55-
> Vector Functions are in Early Adopter Preview. Get access to the preview via https://aka.ms/azuresql-vector-eap-announcement
55+
> Vector Functions are in Public Preview. Learn the details about vectors in Azure SQL here: https://aka.ms/azure-sql-vector-public-preview
5656
5757
![](_assets/azure-sql-cosine-similarity-native.gif)
5858

@@ -191,10 +191,10 @@ go
191191

192192
```
193193

194-
immediately the deployed Azure Function will get executed in response to the `INSERT` statement. The Azure Function will call the OpenAI service to generate the text embedding for the session title and abstract, and then store the embedding in the database, specifically in the `web.sessions_embeddings` table.
194+
immediately the deployed Azure Function will get executed in response to the `INSERT` statement. The Azure Function will call the OpenAI service to generate the text embedding for the session title and abstract, and then store the embedding in the database, specifically in the `web.sessions` table.
195195

196196
```sql
197-
select * from web.sessions_embeddings
197+
select * from web.sessions
198198
```
199199

200200
You can now open the URL associated with the created Static Web App to see the session recommender in action. You can get the URL from the Static Web App overview page in the Azure portal.
@@ -216,6 +216,12 @@ once finished, create a `./func/local.settings.json` and `.env` starting from pr
216216

217217
Go back to the sample root folder and then run:
218218

219+
```bash
220+
swa build
221+
```
222+
223+
to build the fronted and then start everything with:
224+
219225
```bash
220226
swa start
221227
```

database/sql/070-find_sessions.sql

+3
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,16 @@ cteSimilar as
4848
web.sessions_speakers ss
4949
inner join
5050
cteSimilarSpeakers sp on sp.speaker_id = ss.speaker_id
51+
order by distance
5152
),
5253
cteSimilar2 as (
5354
select top(@top)
5455
*,
5556
rn = row_number() over (partition by session_id order by distance)
5657
from
5758
cteSimilar
59+
order by
60+
distance
5861
),
5962
cteSpeakers as
6063
(

0 commit comments

Comments
 (0)