Enhance the prompt to make the LLM generate right date for real today (#4505)

# Enhance the prompt to make the LLM generate right date for real today

Fixes # (issue)

Currently, if the user's question contains `today`, the clickhouse
always points to an old date. This may be related to the fact that the
GPT training data is relatively old.
pull/4545/head
vinoyang 1 year ago committed by GitHub
parent e942db3e78
commit 25cd6e060a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -224,6 +224,7 @@ _clickhouse_prompt = """You are a ClickHouse expert. Given an input question, fi
Unless the user specifies in the question a specific number of examples to obtain, query for at most {top_k} results using the LIMIT clause as per ClickHouse. You can order the results to return the most informative data in the database.
Never query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in double quotes (") to denote them as delimited identifiers.
Pay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.
Pay attention to use today() function to get the current date, if the question involves "today".
Use the following format:

Loading…
Cancel
Save