Skip to content

Conversation

jamesbraza
Copy link
Collaborator

@jamesbraza jamesbraza commented Sep 24, 2025

This PR fixes a bunch of minor issues with our prompts, removing thought burden:

  • Standardizes use of system prompt setting across the repo
  • Standardizes JSON-mode and non-JSON-mode Context generation prompts
  • Removes extra whitespace from text summarization prompt

This PR also updates the settings cheatsheet, to make it easier to understand our prompts.

Edit: this is a breaking change w.r.t. user configs, so be warned ⚠️ 🤓

@jamesbraza jamesbraza self-assigned this Sep 24, 2025
@Copilot Copilot AI review requested due to automatic review settings September 24, 2025 17:32
@jamesbraza jamesbraza added the enhancement New feature or request label Sep 24, 2025
Copy link

cursor bot commented Sep 24, 2025

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on October 5.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 24, 2025
Copy link
Contributor

@Copilot 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 standardizes prompt handling across the repository by consolidating system_prompt usage and improving the structure of JSON-mode and non-JSON-mode context generation prompts.

  • Standardizes use of system prompt setting across the repo
  • Refactors JSON-mode and non-JSON-mode Context generation prompts to use consistent structure
  • Removes extra whitespace from text summarization prompt and updates settings documentation

Reviewed Changes

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

Show a summary per file
File Description
src/paperqa/settings.py Updates prompt field types to support both string and list formats, consolidates JSON prompt structure
src/paperqa/prompts.py Removes summary_json_prompt, adds include_text_prompt_template for consistent formatting
src/paperqa/core.py Refactors message handling to support multiple user prompts with proper system message placement
src/paperqa/docs.py Simplifies prompt template handling logic
tests/test_paperqa.py Updates test to work with new list-based prompt structure
src/paperqa/configs/*.json Updates configuration files to use new list-based JSON prompt format
docs/tutorials/* Updates documentation to reflect new prompt structure
README.md Updates settings cheatsheet with improved descriptions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@whitead
Copy link
Collaborator

whitead commented Sep 24, 2025

I think this is good, but we'll have to merge in v6 since it's breaking change.

@jamesbraza jamesbraza force-pushed the clearer-summary-prompts branch from 69921d7 to befeb6e Compare September 24, 2025 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants