Skip to content

Commit 648f20a

Browse files
Uvi-12Erick Friis
authored andcommitted
DOC: Improve human input prompt in FewShotChatMessagePromptTemplate example (#29023)
Fixes #29010 This PR updates the example for FewShotChatMessagePromptTemplate by modifying the human input prompt to include a more descriptive and user-friendly question format ('What is {input}?') instead of just '{input}'. This change enhances clarity and usability in the documentation example. Co-authored-by: Erick Friis <[email protected]>
1 parent f5c916d commit 648f20a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/core/langchain_core/prompts/few_shot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ class FewShotChatMessagePromptTemplate(
282282
]
283283
284284
example_prompt = ChatPromptTemplate.from_messages(
285-
[('human', '{input}'), ('ai', '{output}')]
285+
[('human', 'What is {input}?'), ('ai', '{output}')]
286286
)
287287
288288
few_shot_prompt = FewShotChatMessagePromptTemplate(

0 commit comments

Comments
 (0)