mirror of
https://github.com/marcominerva/SqlDatabaseVectorSearch.git
synced 2026-06-20 12:23:10 +00:00
Enhance ChatService response instructions with example
Updated the `AskQuestionAsync` method in `ChatService.cs` to include an additional example in the `ChatHistory` object. This example clarifies how the service should respond when the requested information is not available in the given context, such as responding with "This information isn't available in the given context" if a user asks "What is the capital of France?" and there is no information about France in the chat.
This commit is contained in:
@@ -37,8 +37,8 @@ public class ChatService(IMemoryCache cache, IChatCompletionService chatCompleti
|
|||||||
{
|
{
|
||||||
var chat = new ChatHistory(""""
|
var chat = new ChatHistory(""""
|
||||||
"""
|
"""
|
||||||
You can use only the information provided in this chat to answer questions.
|
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.
|
||||||
If you don't know the answer, reply suggesting to refine the question.
|
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".
|
||||||
Never answer to questions that are not related to this chat.
|
Never answer to questions that are not related to this chat.
|
||||||
You must answer in the same language of the user's question.
|
You must answer in the same language of the user's question.
|
||||||
"""");
|
"""");
|
||||||
|
|||||||
Reference in New Issue
Block a user