Hello Team ,
I’m developing an interactive chatbot which answers general user queries and also can give details from custom knowledge base (postgres SQL).
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.
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