-
Notifications
You must be signed in to change notification settings - Fork 99
feat: describegpt - refactor default prompt file; add --fewshot-examples option
#2955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
jqnatividad
commented
Sep 1, 2025
- standardize replaceable parameters - enclosed with curly braces and capitaliza
- parameterize both DuckDB and Polars sql guidance
- include fewshot examples for both
- standardize replaceable parameters - enclosed with curly braces and capitaliza - parameterize both DuckDB and Polars sql guidance - include fewshot examples for both
- ensure defaults aligned with docopt defaults - add "Let's think step by step." to trigger step-by-step reasoning - add `---` separator before provided metadata - tuned DuckDB SQL generation guidelines - GENERATED_BY_SIGNATURE formt is now aligned with the standard replacaebles using curly braces
- aligned docopt defaults with default prompt file - tuned SQL prompt generation - GENERATED_BY_SIGNATURE now delimited by curly braces - set Diskcache to sync to disk on change - removed unneeded `cache_prefix_block` from diskcache - formatted SQL generation terminal messages - analysis results are now always cached by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the describegpt command to standardize prompt parameter formatting and introduce few-shot learning capabilities. The main purpose is to improve prompt consistency and add optional few-shot examples to enhance SQL query generation quality.
- Standardized all replaceable parameters to use uppercase with curly braces format (
{STATS},{FREQUENCY}, etc.) - Added
--fewshot-examplesflag to optionally include few-shot learning examples in LLM prompts - Separated SQL guidance for DuckDB and Polars with dedicated sections in the default prompt file
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/cmd/describegpt.rs | Added fewshot examples flag, refactored prompt parameter replacement, updated cache configuration, and improved error handling for SQL guidelines parsing |
| resources/describegpt_defaults.toml | Updated prompt file structure with standardized parameters, added separate DuckDB/Polars SQL guidance sections, and included comprehensive few-shot examples for both engines |
Comments suppressed due to low confidence (2)
src/cmd/describegpt.rs:1
- The
cache_prefix_blockline is being removed but there's no replacement provided. This could cause cache key conflicts or unexpected behavior if the cache prefix was serving a specific purpose.
static USAGE: &str = r#"
src/cmd/describegpt.rs:1
- Similar to the previous cache configuration, the
cache_prefix_blockis being removed without replacement, which could lead to cache key conflicts between different cache instances.
static USAGE: &str = r#"
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- add {DUCKDB_VERSION} parameter
- add fallback to INPUT_TABLE_NAME parsing