JamesPetra I just found something interesting.
This sample built by the Azure SQL team utilizes Azure OpenAI embedding models to generate vectors that represent the data and convert the user search term to a vector. Then, it finds the similarity between the two vectors. See the
Azure-Samples/azure-sql-db-session-recommender: Build a recommender using OpenAI, Azure Functions, Azure Static Web Apps, Azure SQL DB, Data API builder and Text Embeddings (github.com).
Check out these two blogs to learn more about How I built a session recommender in 1 hour using Open AI - DEV Community and Vector Similarity Search with Azure SQL database and OpenAI - Azure SQL Devs’ Corner (microsoft.com).
In Azure OpenAI, you pass an array of dictionaries with different roles in the conversation delineated by system, user, and assistant. see the documentation Quickstart - Get started using GPT-35-Turbo and GPT-4 with Azure OpenAI Service - Azure OpenAI Service | Microsoft Learn.
Everything is being sent back and forth during the conversation. This is how it keeps track of the context of the convo.
Please let me know if this answers your questions.