Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

2
How to build a Text to SQL Model that asks for more information if the query is too vague
Post Body

I am using GPT 3.5-Turbo-Instinct and feeding in my dataschema into the prompt. I am creating my SQL query using create_sql_chain and then running the query in the database through JDBC. So far, it is working okay however, if I am looking to push this to production, I need the model to not return anything if it is not confident in its answer or if the query being asked is too vague.

For instance, if I ask my text to sql model "how many rows are there", it should return back something saying "this query is too vague". Likewise, if I were to ask it a question such as, "Return the GPA and Networth of Nadir", how do I get it to do "WHERE LastName = 'Nadir' rather than "WHERE FirstName = 'Nadir'. I thought that by potentially getting confidence scores I could explore and find a threshold where the human needs to clarify what they meant until the model had a confident enough query

Author
Account Strength
100%
Account Age
7 years
Verified Email
Yes
Verified Flair
No
Total Karma
5,475
Link Karma
2,932
Comment Karma
2,298
Profile updated: 3 days ago
Posts updated: 3 weeks ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
1 year ago