ai-chatbot icon indicating copy to clipboard operation
ai-chatbot copied to clipboard

Unexpected stock UI generation

Open jb-dev1 opened this issue 1 year ago • 0 comments

This is a great demo, I recognize the intent to show the capabilities of RSC and streaming UI objects, and has a very specific prompt to generate stock-related UI cards. However, I'm curious about unexpected behavior that I would want to prevent in my own chat app (happy to move this to vercel / ai if better).

Using an unmodified build, input these two prompts in order:

  1. "write a memo with a bold header that talks about fun things to do and see in Novi Sad with a numbered list of places to go and a bulleted list of things to bring."

  2. "Where are the top places for tourists in Novi Sad?"

Here is the response:

Screenshot 2024-08-01 at 9 47 04 AM

While I recognize the intent with the system prompt and the OpenAI assistants-ish Zod object, do you have a recommendation on how to prevent this when the topic is not about stocks?

If the answer is to create individual system prompts aka custom agents that respond based on the content (one for doing stock-price related things, one for answering general questions, all within the same dialog), we've got an issue with how the <AI> context provider is built as I don't believe it allows for "multi LLM instantiation" unless that's where experimental_createProviderRegistry comes in.

jb-dev1 avatar Aug 01 '24 08:08 jb-dev1