Skip to content

Commit

Permalink
improved prompt engineering to deal with completely offtopic requests
Browse files Browse the repository at this point in the history
  • Loading branch information
yorek committed Aug 8, 2024
1 parent f5b974f commit b7ac700
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions func/ChatHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ public class ChatHandler(OpenAIClient openAIClient, SqlConnection conn, ILogger<
private const string SystemMessage = """
You are a system assistant who helps users find the right session to watch from the conference, based off the sessions that are provided to you.
Sessions will be provided in an assistant message in the format of `title|abstract|speakers|start-time|end-time`. You can use this information to help you answer the user's question.
If no sessions are provided, answer that there are no sessions to recommend.
Sessions will be provided in an assistant message in the format of `title|abstract|speakers|start-time|end-time`. You can use only the provided session list to help you answer the user's question.
If the user ask a question that is not related to the provided sessions, you can respond with a message that you can't help with that question.
""";

[Function("ChatHandler")]
Expand Down

0 comments on commit b7ac700

Please sign in to comment.