_resolve_prompt() — langchain Function Reference
Architecture documentation for the _resolve_prompt() function in eval_chain.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD b7bf8076_06ca_7d01_49db_01bbd3e75d24["_resolve_prompt()"] e476a8f9_5ced_15c1_3631_8a65948b94ed["CriteriaEvalChain"] b7bf8076_06ca_7d01_49db_01bbd3e75d24 -->|defined in| e476a8f9_5ced_15c1_3631_8a65948b94ed d7b47090_5602_93cf_8322_76a617b649a4["_resolve_prompt()"] d7b47090_5602_93cf_8322_76a617b649a4 -->|calls| b7bf8076_06ca_7d01_49db_01bbd3e75d24 a41998df_2f6e_21cb_6927_203388623323["from_llm()"] a41998df_2f6e_21cb_6927_203388623323 -->|calls| b7bf8076_06ca_7d01_49db_01bbd3e75d24 52373e3f_ed16_e930_78b1_4cfd309eb9b6["from_llm()"] 52373e3f_ed16_e930_78b1_4cfd309eb9b6 -->|calls| b7bf8076_06ca_7d01_49db_01bbd3e75d24 d7b47090_5602_93cf_8322_76a617b649a4["_resolve_prompt()"] b7bf8076_06ca_7d01_49db_01bbd3e75d24 -->|calls| d7b47090_5602_93cf_8322_76a617b649a4 style b7bf8076_06ca_7d01_49db_01bbd3e75d24 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/evaluation/criteria/eval_chain.py lines 272–284
def _resolve_prompt(
cls,
prompt: BasePromptTemplate | None = None,
) -> BasePromptTemplate:
expected_input_vars = {"input", "output", "criteria"}
prompt_ = prompt or PROMPT
if expected_input_vars != set(prompt_.input_variables):
msg = (
f"Input variables should be {expected_input_vars}, "
f"but got {prompt_.input_variables}"
)
raise ValueError(msg)
return prompt_
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does _resolve_prompt() do?
_resolve_prompt() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/evaluation/criteria/eval_chain.py.
Where is _resolve_prompt() defined?
_resolve_prompt() is defined in libs/langchain/langchain_classic/evaluation/criteria/eval_chain.py at line 272.
What does _resolve_prompt() call?
_resolve_prompt() calls 1 function(s): _resolve_prompt.
What calls _resolve_prompt()?
_resolve_prompt() is called by 3 function(s): _resolve_prompt, from_llm, from_llm.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free