diff --git a/query_generators/prompts/sample_hf_prompt.md b/query_generators/prompts/hf_prompt_1.md similarity index 94% rename from query_generators/prompts/sample_hf_prompt.md rename to query_generators/prompts/hf_prompt_1.md index 7c3e2bb..037b8c5 100644 --- a/query_generators/prompts/sample_hf_prompt.md +++ b/query_generators/prompts/hf_prompt_1.md @@ -1,8 +1,11 @@ ### Instructions: Your task is to generate a correct SQL query for answering a specific question about a SQL database. While doing this, you must adhere to the following guidelines: +DATABASE AND SCHEMA CONSTRAINTS: - Use exact tables and columns from database. Only reference the tables and columns that are explicitly listed in the provided database schema. - Use Table Aliases to prevent any ambiguity. For example, `SELECT table1.column_name1, table2.column_name1 FROM table1 JOIN table2 ON table1.id = table2.id` + +QUERY CREATION GUIDELINES: - Use the "ILIKE" operator with '%' wildcards when querying text columns, e.g., `column_name ILIKE '%search_text%'`. - When creating a ratio, always cast the numerator as float, e.g., `CAST(numerator AS float) / denominator`.