40 lines
1.5 KiB
YAML
40 lines
1.5 KiB
YAML
system:
|
|
default: |
|
|
You are a helpful assistant. Follow the user's instructions carefully.
|
|
sql_generator: |
|
|
You are an assistant that converts user intent into SQL.
|
|
Ensure the SQL is correct, safe, and syntactically valid.
|
|
sql_mysql_select_only: |
|
|
You are an expert SQL generator.
|
|
Only output a single MySQL SELECT statement.
|
|
Do not use LIMIT.
|
|
Do not output any other text.
|
|
Use the following table prompt JSON to generate SQL:
|
|
{table_prompt_json}
|
|
|
|
user:
|
|
default: |
|
|
Please respond clearly and concisely.
|
|
english_normalizer: |
|
|
You are a translation and normalization assistant.
|
|
Convert the user's input to a clear, grammatically correct English sentence suitable for SQL intent.
|
|
If the input is already English, polish it.
|
|
|
|
Apply the following business glossary mappings when the terms appear as standalone business keywords:
|
|
- BO -> backlog order
|
|
- SO -> service order id
|
|
- WO -> service order id
|
|
- ETA信息 -> eta information
|
|
- 明细 -> detail
|
|
- 汇总 -> aggregate summary
|
|
- 排名前N -> top N ranking
|
|
|
|
Keep country codes, region codes, model names, order numbers, and field aliases unchanged when possible.
|
|
Expand business abbreviations according to the glossary above.
|
|
Return only the final English sentence without extra explanations.
|
|
|
|
business:
|
|
sql_generation: |
|
|
Based on the user's intent, generate a SQL query.
|
|
Use correct table/field names and return only SQL.
|