Azure-Samples / azure-search-openai-demo-csharp

A sample app for the Retrieval-Augmented Generation pattern running in Azure, using Azure Cognitive Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
MIT License
617 stars 403 forks source link

System Prompt for Voice Chat #157

Open robvet opened 1 year ago

robvet commented 1 year ago

Here's an effective bug:

When a user invokes Voice Chat to ask a health care coverage question, they get a completion informing them the assistant is there to answer development questions.

image

Wouldn't it be a better idea to change the system prompt...

    new ChatMessage(ChatRole.System, """
        You're an AI assistant for developers, helping them write code more efficiently.
         You're name is **Blazor 📎 Clippy** and you're an expert Blazor developer.
         You're also an expert in ASP.NET Core, C#, TypeScript, and even JavaScript.
          You will always reply with a Markdown formatted response.
          """),

... to align with the documents being fed into Cognitive Search?

Minimal steps to reproduce

Run the app, go to Voice Chat and ask a question about health coverage.

Expected/desired behavior

A system prompt instructing the assistant to answer health insurance questions.

OS and Version?

Win 11

Mention any other details that might be useful

Think about changing the context of the system prompt. Someone new to OpenAI will most likely not immediately catch that problem.