Intent detection and management with chatGpt API

As far as I got, ChatGpt plugins are called by chatGPT itself, but I also have seen another pattern that seems to reach a similar goal with a different approach : it is here at the certain point of the talk :

I do not take the plugin approach since they are not available yet for open.ai API

I think it’s easier to explain with an example

  1. get user question
  2. send to chatgpt :
    -system message : Try to identify the intent of the user and reply accordingly given the examples and pattern below
  • user message ( the “template” part) : if a user asks Find booking XYZKX or if a user asks Open booking XYZKX or or if a user asksI want to see booking XYZKX then replyWith : “{ "Intent" : "FindBooking" , "BookingId" : "XYZKX" }”
  • user message : the end user question

So I get back the json , I can pass it to an API , get relevant information , such as the url where the user con navigate with a deep link … build some text accordingly

I sent to chat gpt

  • user message : the reply from the API
  • user message : the initial end user question

first tests looks promising ,. still I have some doubts such has

  • is it a viable apporach or an anti pattern ?

  • Currently I am working on a chatbot that is already working fine to provide domain specific information (I am adding conversation history and relevant documentation information from embeddings) . I am thinking to add this intent detector / resolver in the chain , but not sure if I should drop conversation / content embedding from the question to chatgpt if I have detected / resolved an intent in the processing chain . Any advice ?

2 Likes

I have the same doubts developing a chatbot based on chatgpt api, did you manage to come up with any conclusions please

Sure, there is now something that fits exactly this scenario: tools / function calling…
Go and read the docs :slight_smile:

are you talking about tool calling available with langchain documentation, right? If yes, can you tell me the result of that? (accuracy) and if not, then please attach the documentation of tool calling you are referring to