Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions src/paperqa/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
" answer the question, instead summarize to give evidence to help answer the"
" question. Stay detailed; report specific numbers, equations, or direct quotes"
' (marked with quotation marks). Reply "Not applicable" if the excerpt is'
" irrelevant. At the end of your response, provide an integer score from 1-10 on a"
" newline indicating relevance to question. Do not explain your score.\n\nRelevant"
" Information Summary ({summary_length}):"
" irrelevant. At the end of your response,"
"provide an integer score from 1-10 on a newline indicating relevance to question." # Don't use 0-10 since we mention "not applicable" instead # noqa: E501
" Do not explain your score."
"\n\nRelevant Information Summary ({summary_length}):"
)
# This prompt template integrates with `text` variable of the above `summary_prompt`
text_with_tables_prompt_template = (
Expand Down Expand Up @@ -111,12 +112,14 @@
" Your summary, combined with many others,"
" will be given to the model to generate an answer."
" Respond with the following JSON format:"
'\n\n{{\n "summary": "...",\n "relevance_score": "..."\n "used_images"\n}}'
'\n\n{{\n "summary": "...",\n "relevance_score": 0-10,\n "used_images"\n}}'
"\n\nwhere `summary` is relevant information from the text - {summary_length} words."
" `relevance_score` is an integer 1-10 for the relevance of `summary` to the question."
" `relevance_score` is an integer 0-10 for the relevance of `summary` to the question."
" `used_images` is a boolean flag indicating"
" if any images present in a multimodal message were used,"
" and if no images were present it should be false."
"\n\nThe excerpt may or may not contain relevant information."
" If not, leave `summary` empty, and make `relevance_score` be 0."
)

env_system_prompt = (
Expand Down
Loading