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

Optional `AnswerSetting.max_answer_attempts` to allow a new unsure branch #673

Closed jamesbraza closed 1 week ago

jamesbraza commented 2 weeks ago

This PR adds in an optional AnswerSetting.max_answer_attempts so we can declare ourselves as unsure if we attempt gen_answer too many times, with test coverage.

To do so, it tracks a tool names used in environment state as tool_history