Skip to content

The agent engineering platform.

DOC: Improve human input prompt in FewShotChatMessagePromptTemplate example (#29023)

UVb9db8e99210a
diff --git a/libs/core/langchain_core/prompts/few_shot.py b/libs/core/langchain_core/prompts/few_shot.py
index 96e70c17d9..40f1d86a64 100644
--- a/libs/core/langchain_core/prompts/few_shot.py
+++ b/libs/core/langchain_core/prompts/few_shot.py
@@ -282,7 +282,7 @@ class FewShotChatMessagePromptTemplate(
]
example_prompt = ChatPromptTemplate.from_messages(
- [('human', '{input}'), ('ai', '{output}')]
+ [('human', 'What is {input}?'), ('ai', '{output}')]
)
few_shot_prompt = FewShotChatMessagePromptTemplate(