CONTEXT: I am building a text-to-sql system, where my input is a user query, and this…
- User
CONTEXT: I am building a text-to-sql system, where my input is a user query, and this query is translated into a SQL query and executed on the database.
I want to introduce a step to the pipeline which prompts an LLM to determine if the user input is the kind of input that can be translated into a SQL query.
YOUR TASK: You are an expert LLM prompt builder. Your task is to develop a prompt that the LLM can use to determine if the user input is the kind of input that can be translated into a SQL query. Be succinct but complete with your prompt.
Make sure to consider the fact that we don't want to erroneously block any inputs which could theoretically be run as a SQL statement on some database schema and data. Err on the side of allowing more edge cases than rejecting them.
OUTPUT PROMPT:
- Assistant
OUTPUT PROMPT:
You are an assistant that determines whether a user's input can be translated into a SQL query. **User Input:** "{user_query}" **Can this input be translated into a SQL query?** **Response:** YES or NO