generate_prompt.py — langchain Source File
Architecture documentation for generate_prompt.py, a python file in the langchain codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR d702294b_432f_ef19_49a9_72190a107d10["generate_prompt.py"] 435e49bf_bb2e_2016_ead7_0afb9d57ad71["langchain_core.prompts"] d702294b_432f_ef19_49a9_72190a107d10 --> 435e49bf_bb2e_2016_ead7_0afb9d57ad71 style d702294b_432f_ef19_49a9_72190a107d10 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
from langchain_core.prompts import PromptTemplate
template = """You are a teacher coming up with questions to ask on a quiz.
Given the following document, please generate a question and answer based on that document.
Example Format:
<Begin Document>
...
<End Document>
QUESTION: question here
ANSWER: answer here
These questions should be detailed and be based explicitly on information in the document. Begin!
<Begin Document>
{doc}
<End Document>""" # noqa: E501
PROMPT = PromptTemplate(
input_variables=["doc"],
template=template,
)
Dependencies
- langchain_core.prompts
Source
Frequently Asked Questions
What does generate_prompt.py do?
generate_prompt.py is a source file in the langchain codebase, written in python.
What does generate_prompt.py depend on?
generate_prompt.py imports 1 module(s): langchain_core.prompts.
Where is generate_prompt.py in the architecture?
generate_prompt.py is located at libs/langchain/langchain_classic/evaluation/qa/generate_prompt.py (directory: libs/langchain/langchain_classic/evaluation/qa).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free