Skip to content

Commit 538cc5b

Browse files
authored
improve markdown text (Azure-Samples#82)
1 parent cc8607f commit 538cc5b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Basic_Samples/Embeddings/dotnet/csharp/Question_answering_using_fusion_retriever_architecture.ipynb

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,8 @@
309309
"\n",
310310
"4. It retrieves the content of the first choice from the response and splits it into an array of strings using `Environment.NewLine` as the separator. This array represents the generated search queries.\n",
311311
"\n",
312-
"Finally, the method returns the array of generated search queries.\n",
313-
"\n",
314-
"In terms of improvements, the code is quite efficient and readable as it is. However, you might consider adding comments to explain what each line of code does, especially if this code will be read by others who may not be familiar with the OpenAI API or the concept of query rewriting."
312+
"Finally, it returns the array of generated search queries.\n",
313+
"\n"
315314
]
316315
},
317316
{
@@ -449,7 +448,7 @@
449448
"source": [
450449
"The `SearchAsync` function is used to perform a search given a query and a collection of knowledge. It takes three parameters: `query` which is a string representing the search query, `knowledge` which is a collection of `PageBlockWithEmbeddings` objects representing the knowledge base, and `resultCount` which is an optional parameter that defaults to 5 and represents the number of search results to return.\n",
451450
"\n",
452-
"Inside the method, several operations are performed:\n",
451+
"This is what happens in the function:\n",
453452
"\n",
454453
"1. It retrieves the embedding for the query using the `GetEmbeddingsAsync` method of the `client` object and stores it in `queryEmbedding`.\n",
455454
"\n",
@@ -463,9 +462,7 @@
463462
"\n",
464463
"6. It scores the `retrievedFacts` by similarity to the `queryEmbedding`, filters out items with a score less than 0.8, takes the top `resultCount` items, and transforms them into `SearchResult` objects. This part is usually referred to as re-ranking.\n",
465464
"\n",
466-
"Finally, the method returns the resulting collection of `SearchResult` objects.\n",
467-
"\n",
468-
"In terms of improvements, the code is quite efficient and readable as it is. However, you might consider adding comments to explain what each line of code does, especially if this code will be read by others who may not be familiar with embeddings or query rewriting."
465+
"Finally, it returns the resulting collection of `SearchResult` objects."
469466
]
470467
},
471468
{

0 commit comments

Comments
 (0)