Skip to content

Commit 711d4a3

Browse files
committed
Enhance chat responses and update package versions
Updated `ChatService.cs` to improve user guidance for unavailable information responses. Added multiple phrases to ensure clarity and context relevance. Modified `SqlDatabaseVectorSearch.csproj` to upgrade `Microsoft.SemanticKernel` from `1.45.0` to `1.47.0`, and incremented versions for `Swashbuckle.AspNetCore.SwaggerUI` and `TinyHelpers.AspNetCore` to `8.1.1` and `4.0.25`, respectively, for bug fixes and improvements.
1 parent d8e6997 commit 711d4a3

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

SqlDatabaseVectorSearch/Services/ChatService.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,13 @@ private ChatHistory CreateChatAsync(IEnumerable<string> chunks, string question)
114114
{
115115
var chat = new ChatHistory("""
116116
You can use only the information provided in this chat to answer questions. If you don't know the answer, reply suggesting to refine the question.
117-
For example, if the user asks "What is the capital of France?" and in this chat there isn't information about France, you should reply something like "This information isn't available in the given context".
117+
For example, if the user asks "What is the capital of France?" and in this chat there isn't information about France, you should reply something like:
118+
- This information isn't available in the given context
119+
- I'm sorry, I don't know the answer to that question
120+
- I don't have that information
121+
- I don't know
122+
- Given the context, I can't answer that question
123+
- I'my sorry, I don't have enough information to answer that question
118124
Never answer to questions that are not related to this chat.
119125
You must answer in the same language of the user's question. For example, it the user asks a question in English, the answer must be in English.
120126
""");

SqlDatabaseVectorSearch/SqlDatabaseVectorSearch.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
<PackageReference Include="Microsoft.ML.Tokenizers" Version="1.0.2" />
2424
<PackageReference Include="Microsoft.ML.Tokenizers.Data.Cl100kBase" Version="1.0.2" />
2525
<PackageReference Include="Microsoft.ML.Tokenizers.Data.O200kBase" Version="1.0.2" />
26-
<PackageReference Include="Microsoft.SemanticKernel" Version="1.45.0" />
26+
<PackageReference Include="Microsoft.SemanticKernel" Version="1.47.0" />
2727
<PackageReference Include="MimeMapping" Version="3.1.0" />
2828
<PackageReference Include="MinimalHelpers.Routing.Analyzers" Version="1.1.3" />
2929
<PackageReference Include="PdfPig" Version="0.1.10" />
30-
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="8.1.0" />
31-
<PackageReference Include="TinyHelpers.AspNetCore" Version="4.0.23" />
30+
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="8.1.1" />
31+
<PackageReference Include="TinyHelpers.AspNetCore" Version="4.0.25" />
3232
</ItemGroup>
3333

3434
</Project>

0 commit comments

Comments
 (0)