LLM中什么是模板定义、提示工程和文档处理链
- 定义提示模板(
prompt_template
):
prompt_template = """Use the following pieces of context to answer the question at the end. If you don't know the answer, just say that you don't know, don't try to make up an answer.
{context}
Question: {question}
Answer:"""
这是一个字符串模板,用于定义向语言模型(LLM)提问的格式。其中包含两个占位符{context}
和{question}
。{context}