Hello Team
,
Iโm developing an interactive chatbot which answers general user queries and also can give details from custom knowledge base (postgres SQL).
Various scenario it should handle
If I ask it a query like โmy laptop is running slowโ it should show suggestions how to fix it ( like general chat gpt answers to debug and steps to fix/check )
If I ask it query like โwhat is my laptop order status for id 1024โ it should understand and create a sql query for finding order status from postgres SQL table , which can be run in DB and fetch the results.
MY QUESTION
how do I differentiate if the query asked comes under general context or does it come under get from database context. Since if it comes under DB context I have to start separate flow to create query and run operation to get details from DB.
Pls help me with the approaches to identify the context type without making initial prompt large
( I thought of sending table details to check if intent is related to get details from these tables but that is becoming a huge prompt to send details of all tables, also increasing cost of each query).
Iโm using model : gpt-3.5-turbo
Thanks