少样本提示模板(FewShotPromptTemplate) 适用场景用于少样本学习(Few-Shot Learning),在提示中包含示例(Examples),帮助模型理解任务。适用于复杂任务(如翻译、分类、推理),需要通过示例引导模型行为。特点示例嵌入:通过 examples 参数提供示例输入和输出。动态示例选择:支持 ExampleSelector 动态选择最相关的示例。模板格式:通常包含前缀(Prefix)、示例(Examples)和后缀(Suffix)。示例from langchain_core.promptsimportFewShotPromptTemplate,PromptTemplate# 示例模板example_template="输入:{input}\n输出:{output}"# 少量示例examples=