Hi, we want to allow users to ask questions about the huge data that we have in our backend. For instance we have customers, orders, products etc… Our data is sensitive and cannot leave the company.
Users want to ask questions like
How many customers ordered product “XYZ” in the last month?
Ideally we would get back from OpenAI something like
Intention: COUNTING
Entities: CUSTOMER_ORDERS
Filter: PRODUCT=XYZ, TIMEFRAME=lastmonth
We would use the result to query the backend and show it to the user.
Question: How can we instruct OpenAI to “understand” such questions and know how our data is structured?
P.S.: We cannot simply convert this into SQL query because of how the data is stored.