This additional text will be added to each prompt submitted in the chat (although it will not be shown in the UI). To solve this problem, we can include the date and time in each prompt (in the grounding function in DroidconEmbeddingsWrapper.kt). The first issue that the model has answering these types of questions is that it does not automatically know the date and time:įigure 2: The model can’t answer “what’s on now” in part because it does not know the date or time TIP: When testing this demo, open JetchatAI and tap the ‘users’ icon at the top-left to switch from the default OpenAI-chat to the droidcon-chat. The remainder of this post will discuss the obstacles and provide a solution to answering these “time-based” questions using the OpenAI chat API with function calling. However, it can’t answer questions like “what’s on right now?” or “what’s up next?”. The starting point will be the droidcon SF sample we’ve covered previously:įigure 1: droidcon chat and the questions it can answer using the system prompt or embedding similarityĪs you can see, the droidcon chat implementation can answer questions like “when is droidcon SF?” (using grounding in the system prompt) and “are there any AI sessions?” (using embedding similarity comparisons between the question and the session info). This week, we’ll look at how to use function calling to enhance responses when using embeddings to retrieve data isn’t appropriate. Last week’s post introduced the OpenAI chat function calling to implement a live weather response.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |