Skip to content

Conversation

@jqnatividad
Copy link
Collaborator

  • 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
@jqnatividad jqnatividad marked this pull request as draft September 1, 2025 18:11
@jqnatividad jqnatividad requested a review from Copilot September 1, 2025 18:12

This comment was marked as outdated.

@jqnatividad jqnatividad requested a review from Copilot September 1, 2025 23:48

This comment was marked as outdated.

@jqnatividad jqnatividad requested a review from Copilot September 2, 2025 00:41

This comment was marked as outdated.

- 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
@jqnatividad jqnatividad requested a review from Copilot September 2, 2025 11:57
Copy link
Contributor

Copilot AI left a 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-examples flag 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_block line 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_block is 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>
@jqnatividad jqnatividad marked this pull request as ready for review September 2, 2025 12:00
- add {DUCKDB_VERSION} parameter
- add fallback to INPUT_TABLE_NAME parsing
@jqnatividad jqnatividad merged commit 4bc0db6 into master Sep 2, 2025
12 of 13 checks passed
@jqnatividad jqnatividad deleted the describegpt-prompt-file-fewshot-option branch September 2, 2025 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants