Future-House / paper-qa

High accuracy RAG for answering questions from scientific documents with citations
Apache License 2.0
6.44k stars 617 forks source link

Refactor to remove `skip_system` from `LLMModel.run_prompt` #680

Closed jamesbraza closed 1 week ago

jamesbraza commented 1 week ago

When reading through our various control flows here, I found the presence of a system prompt coupled with a skip_system flag to add more thought and complexity. We don't need to cart around two separate pieces of information here, we can just make system_prompt be an optional variable and one source of truth.

This PR is a refactor that removes skip_system in favor of bool checks directly on system_prompt. Yes it's a breaking change, but I don't think our LLMModel implementation is really imported and used by our users.