Skip to content

Conversation

@jqnatividad
Copy link
Collaborator

also better DuckDB error display

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 enhances the describegpt command's SQL generation capabilities by adding configurable random sampling of the input dataset and improving DuckDB error message display.

Key Changes

  • Adds a new --sample-size flag (default: 100) to control the number of rows sampled from the input dataset when using prompt mode
  • Updates the Mini Jinja template to include the random sample data in the LLM prompt, providing additional context for SQL query generation
  • Improves DuckDB error display by showing only stderr content instead of the full debug output

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/cmd/describegpt.rs Adds flag_sample_size parameter, integrates it into the sampling logic and template context, and improves DuckDB error message parsing to display only stderr
resources/describegpt_defaults.toml Updates documentation comments for the new sample_size template variable and adds a new template section to include sample data in the SQL generation prompt

jqnatividad and others added 2 commits December 17, 2025 11:35
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jqnatividad jqnatividad merged commit 324ad6a into master Dec 17, 2025
16 checks passed
@jqnatividad jqnatividad deleted the describegpt-sampling-better-duckdb-error-display branch December 17, 2025 16:56
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