Skip to content
Prev Previous commit
Next Next commit
Moved context_str_body to use three dashes for prompt delimiter as well
  • Loading branch information
jamesbraza committed Oct 27, 2025
commit e0acf36ccc4c113be2e1d114caaabdf8038320ef
2 changes: 1 addition & 1 deletion src/paperqa/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ async def context_serializer(
)
section = f"{section_header}\n\n" + "\n\n".join(inner_strs)
context_sections.append(section)
context_str_body = "\n\n----\n\n".join(context_sections)
context_str_body = "\n\n---\n\n".join(context_sections)
else:
inner_context_strs = [
context_inner_prompt.format(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_paperqa.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ async def test_aquery_groups_contexts_by_question(docs_fixture) -> None:
assert "Details on how drug discovery leverages AI." in final_context_str
assert "General facts about organic chemistry." in final_context_str

assert "\n\n----\n\n" in final_context_str
assert "\n\n---\n\n" in final_context_str
q1_header_pos = final_context_str.find(
'Contexts related to the question: "Is XAI usable in chemistry?"'
)
Expand Down