langchain_rust/chain/sql_datbase/
prompt.rs

1pub const DEFAULT_SQLTEMPLATE: &str = r#"Given an input question, first create a syntactically correct {{dialect}} query to run, then look at the results of the query and return the answer. Unless the user specifies in his question a specific number of examples he wishes to obtain, always limit your query to at most {{top_k}} results. You can order the results by a relevant column to return the most interesting examples in the database.
2
3Never query for all the columns from a specific table, only ask for a the few relevant columns given the question.
4
5Pay attention to use only the column names that you can see in the schema description. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.
6
7Use the following format:
8
9Question: Question here
10SQLQuery: SQL Query to run
11SQLResult: Result of the SQLQuery
12Answer: Final answer here
13
14"#;
15
16pub const DEFAULT_SQLSUFFIX: &str = r#"Only use the following tables:
17{{table_info}}
18
19Question: {{input}}"#;