-
Couldn't load subscription status.
- Fork 779
Simplifying prompt newlines to use --- hrule and removed extra hrules
#1156
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
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 horizontal rule formatting in prompts by replacing ---- and ------------ with the standard Markdown --- hrule, reducing token usage and improving compatibility with Markdown renderers. Additionally, it adds (no text) placeholder when context text is empty to prevent model confusion.
Key changes:
- Standardized all horizontal rules to
---format - Added placeholder text for empty contexts
- Updated test assertions to match new separator format
Reviewed Changes
Copilot reviewed 5 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_paperqa.py |
Updated test assertion to expect --- separator instead of ---- |
tests/cassettes/test_partly_embedded_texts[True].yaml |
Test cassette updated with new prompt format and API version changes |
src/paperqa/settings.py |
Changed context section separator from ---- to --- |
src/paperqa/prompts.py |
Standardized all horizontal rules to --- and reorganized prompt templates |
src/paperqa/core.py |
Added (no text) placeholder for empty text and removed extra separator in table formatting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7120ced to
7895e53
Compare
7895e53 to
9491b9b
Compare
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.
lgtm
---is a basic Markdown hrule (link), which is also enforced byprettierin actual.mdfiles.This PR cleans up our prompting a bunch:
(no text)if aContexthas empty stringtext, to avoid model confusion.---on table creationqa_promptAfter this PR, here is a
Contextcreation prompt involving a table: