From 09a3a9f0b00c1d62a32ee5a23d49d2b3229616b5 Mon Sep 17 00:00:00 2001 From: Carson Date: Mon, 24 Mar 2025 16:01:58 -0500 Subject: [PATCH 1/3] Mention input suggestions in the prompt --- python-package/querychat/prompt/prompt.md | 10 ++++++++++ r-package/inst/prompt/prompt.md | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/python-package/querychat/prompt/prompt.md b/python-package/querychat/prompt/prompt.md index 62d1ea17..fcb00a5e 100644 --- a/python-package/querychat/prompt/prompt.md +++ b/python-package/querychat/prompt/prompt.md @@ -74,6 +74,16 @@ Example of question answering: If the user provides a vague help request, like "Help" or "Show me instructions", describe your own capabilities in a helpful way, including examples of questions they can ask. Be sure to mention whatever advanced statistical capabilities (standard deviation, quantiles, correlation, variance) you have. +### Showing example questions + +If you find yourself offering example questions to the user as part of your response, wrap the text of each prompt in `` tags. For example: + +``` +* Suggestion 1. +* Suggestion 2. +* Suggestion 3. +``` + ## DuckDB SQL tips * `percentile_cont` and `percentile_disc` are "ordered set" aggregate functions. These functions are specified using the WITHIN GROUP (ORDER BY sort_expression) syntax, and they are converted to an equivalent aggregate function that takes the ordering expression as the first argument. For example, `percentile_cont(fraction) WITHIN GROUP (ORDER BY column [(ASC|DESC)])` is equivalent to `quantile_cont(column, fraction ORDER BY column [(ASC|DESC)])`. diff --git a/r-package/inst/prompt/prompt.md b/r-package/inst/prompt/prompt.md index 154ce0cc..9ed80f43 100644 --- a/r-package/inst/prompt/prompt.md +++ b/r-package/inst/prompt/prompt.md @@ -80,6 +80,16 @@ Example of question answering: If the user provides a vague help request, like "Help" or "Show me instructions", describe your own capabilities in a helpful way, including examples of questions they can ask. Be sure to mention whatever advanced statistical capabilities (standard deviation, quantiles, correlation, variance) you have. +### Showing example questions + +If you find yourself offering example questions to the user as part of your response, wrap the text of each prompt in `` tags. For example: + +``` +* Suggestion 1. +* Suggestion 2. +* Suggestion 3. +``` + ## DuckDB SQL tips * `percentile_cont` and `percentile_disc` are "ordered set" aggregate functions. These functions are specified using the WITHIN GROUP (ORDER BY sort_expression) syntax, and they are converted to an equivalent aggregate function that takes the ordering expression as the first argument. For example, `percentile_cont(fraction) WITHIN GROUP (ORDER BY column [(ASC|DESC)])` is equivalent to `quantile_cont(column, fraction ORDER BY column [(ASC|DESC)])`. From 95b9954819cbe5f021d1401057f439e69a6fc735 Mon Sep 17 00:00:00 2001 From: Carson Date: Mon, 24 Mar 2025 16:27:22 -0500 Subject: [PATCH 2/3] Add Bootstrap table CSS classes when exporting pandas table (for better looking tables) --- python-package/querychat/querychat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-package/querychat/querychat.py b/python-package/querychat/querychat.py index 4e492fb1..58bb5607 100644 --- a/python-package/querychat/querychat.py +++ b/python-package/querychat/querychat.py @@ -136,7 +136,7 @@ def df_to_html(df: IntoFrame, maxrows: int = 5) -> str: df_short = nw.from_native(df).head(maxrows) # Generate HTML table - table_html = df_short.to_pandas().to_html(index=False) + table_html = df_short.to_pandas().to_html(index=False, classes="table table-striped") # Add note about truncated rows if needed if len(df_short) != len(ndf): From 2eb0032ec25d27f48f83ed83bc5bfe9615921346 Mon Sep 17 00:00:00 2001 From: Carson Date: Mon, 24 Mar 2025 17:28:51 -0500 Subject: [PATCH 3/3] Get rid of unwanted gray applied to the whole app container --- python-package/querychat/static/css/styles.css | 1 - 1 file changed, 1 deletion(-) diff --git a/python-package/querychat/static/css/styles.css b/python-package/querychat/static/css/styles.css index 7596748f..033ce722 100644 --- a/python-package/querychat/static/css/styles.css +++ b/python-package/querychat/static/css/styles.css @@ -7,7 +7,6 @@ flex-direction: column; height: 100%; width: 100%; - background-color: var(--bslib-sidebar-main-bg); } .querychat-messages {