Skip to content

Commit 85e4dd7

Browse files
nqbaobnguyenrk
andauthored
Fix wrong prompt in refine chain (#1770)
I got this during testing ``` ValueError: Missing some input keys: {'existing_answer'} ``` Upon review, the initial prompt should be `QUESTION_PROMPT_SELECTOR`. Co-authored-by: Bao Nguyen <bnguyen@roku.com>
1 parent b1b4a40 commit 85e4dd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

langchain/chains/question_answering/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def _load_refine_chain(
155155
**kwargs: Any,
156156
) -> RefineDocumentsChain:
157157
_question_prompt = (
158-
question_prompt or refine_prompts.REFINE_PROMPT_SELECTOR.get_prompt(llm)
158+
question_prompt or refine_prompts.QUESTION_PROMPT_SELECTOR.get_prompt(llm)
159159
)
160160
_refine_prompt = refine_prompt or refine_prompts.REFINE_PROMPT_SELECTOR.get_prompt(
161161
llm

0 commit comments

Comments
 (0)