Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions python-package/querychat/prompt/prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<span class="suggestion">` tags. For example:

```
* <span class="suggestion">Suggestion 1.</span>
* <span class="suggestion">Suggestion 2.</span>
* <span class="suggestion">Suggestion 3.</span>
```

## 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)])`.
Expand Down
2 changes: 1 addition & 1 deletion python-package/querychat/querychat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 0 additions & 1 deletion python-package/querychat/static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
flex-direction: column;
height: 100%;
width: 100%;
background-color: var(--bslib-sidebar-main-bg);
}

.querychat-messages {
Expand Down
10 changes: 10 additions & 0 deletions r-package/inst/prompt/prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<span class="suggestion">` tags. For example:

```
* <span class="suggestion">Suggestion 1.</span>
* <span class="suggestion">Suggestion 2.</span>
* <span class="suggestion">Suggestion 3.</span>
```

## 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)])`.
Expand Down