prompt.py — langchain Source File
Architecture documentation for prompt.py, a python file in the langchain codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR a77b0f50_c5fc_de50_29de_2512e6326c17["prompt.py"] 435e49bf_bb2e_2016_ead7_0afb9d57ad71["langchain_core.prompts"] a77b0f50_c5fc_de50_29de_2512e6326c17 --> 435e49bf_bb2e_2016_ead7_0afb9d57ad71 style a77b0f50_c5fc_de50_29de_2512e6326c17 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
from langchain_core.prompts import PromptTemplate
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}
Helpful Answer:""" # noqa: E501
PROMPT = PromptTemplate(
template=prompt_template, input_variables=["context", "question"]
)
Dependencies
- langchain_core.prompts
Source
Frequently Asked Questions
What does prompt.py do?
prompt.py is a source file in the langchain codebase, written in python.
What does prompt.py depend on?
prompt.py imports 1 module(s): langchain_core.prompts.
Where is prompt.py in the architecture?
prompt.py is located at libs/langchain/langchain_classic/chains/retrieval_qa/prompt.py (directory: libs/langchain/langchain_classic/chains/retrieval_qa).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free