Skip to content

Commit e7824b6

Browse files
committed
added code summary and additional notes
1 parent b301d19 commit e7824b6

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

articles/search/includes/quickstarts/search-get-started-rag-dotnet.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ To access the completed sample app for this article:
222222
```
223223

224224
1. Navigate into the `quickstart-rag` folder.
225-
1. Open the project you want to test in Visual Studio code or Visual Studio.
225+
1. Open the project you want to test in Visual Studio Code or Visual Studio.
226226

227227
### Create the sample app
228228

@@ -256,10 +256,21 @@ Complete the following steps to create a .NET console app to connect to an AI mo
256256

257257
## Set up the query and chat thread
258258

259-
Add the following code to connect to and query the Azure AI Search and Azure OpenAI services.
259+
If you are following along with the completed sample repo, open the project in the `minimal-query` folder. If you created the project yourself, add the following code to connect to and query the Azure AI Search and Azure OpenAI services:
260+
261+
> [!NOTE]
262+
> Make sure to replace the placeholders for the Azure OpenAI endpoint and model name, as well as the Azure AI Search endpoint and index name.
260263

261264
:::code language="csharp" source="~/azure-search-dotnet-samples/quickstart-rag/minimal-query/Program.cs" :::
262265

266+
The preceding code accomplishes the following:
267+
268+
- Searches an Azure Search index for hotels matching a user query about complimentary breakfast, retrieving hotel name, description, and tags.
269+
- Formats the search results into a structured list to serve as contextual sources for the generative AI model.
270+
- Constructs a prompt instructing the Azure OpenAI model to answer using only the provided sources.
271+
- Sends the prompt to the AI model and streams the generated response.
272+
- Outputs the AI’s response to the console, displaying both the role and content as it streams.
273+
263274
The output from Azure OpenAI consists of recommendations for several hotels, such as the following example:
264275

265276
```output

0 commit comments

Comments
 (0)