【LangChain学习之旅】—(5) 提示工程(上):用少样本FewShotTemplate和ExampleSelector创建应景文案
在提示模板的构建过程中加入了 partial_variables,也就是输出解析器指定的 format_instructions 之后,为什么能够让模型生成结构化的输出?
用 print 语句打印出最终传递给大模型的提示
您是一位专业的鲜花店文案撰写员。
对于售价为 50 元的 玫瑰 ,您能提供一个吸引人的简短描述吗?
The output should be a markdown code snippet formatted in the following schema, including the leading and trailing "```json" and "```":
```json
{
"description": string // 鲜花的描述文案