-
Notifications
You must be signed in to change notification settings - Fork 775
Standardizing system_prompt
usage across the repo
#1101
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
base: main
Are you sure you want to change the base?
Conversation
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. |
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 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.
I think this is good, but we'll have to merge in v6 since it's breaking change. |
69921d7
to
befeb6e
Compare
This PR fixes a bunch of minor issues with our prompts, removing thought burden:
system
prompt setting across the repoContext
generation promptsThis 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⚠️ 🤓