resolve_criteria() — langchain Function Reference
Architecture documentation for the resolve_criteria() function in eval_chain.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD a9d899da_d5d0_329a_f04c_073673c2d5f9["resolve_criteria()"] e476a8f9_5ced_15c1_3631_8a65948b94ed["CriteriaEvalChain"] a9d899da_d5d0_329a_f04c_073673c2d5f9 -->|defined in| e476a8f9_5ced_15c1_3631_8a65948b94ed 3aef6314_cf9d_eed1_2ed3_6139ee744a4c["resolve_criteria()"] 3aef6314_cf9d_eed1_2ed3_6139ee744a4c -->|calls| a9d899da_d5d0_329a_f04c_073673c2d5f9 a41998df_2f6e_21cb_6927_203388623323["from_llm()"] a41998df_2f6e_21cb_6927_203388623323 -->|calls| a9d899da_d5d0_329a_f04c_073673c2d5f9 52373e3f_ed16_e930_78b1_4cfd309eb9b6["from_llm()"] 52373e3f_ed16_e930_78b1_4cfd309eb9b6 -->|calls| a9d899da_d5d0_329a_f04c_073673c2d5f9 3aef6314_cf9d_eed1_2ed3_6139ee744a4c["resolve_criteria()"] a9d899da_d5d0_329a_f04c_073673c2d5f9 -->|calls| 3aef6314_cf9d_eed1_2ed3_6139ee744a4c style a9d899da_d5d0_329a_f04c_073673c2d5f9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/evaluation/criteria/eval_chain.py lines 287–312
def resolve_criteria(
cls,
criteria: CRITERIA_TYPE | str | None,
) -> dict[str, str]:
"""Resolve the criteria to evaluate.
Parameters
----------
criteria : CRITERIA_TYPE
The criteria to evaluate the runs against. It can be:
- a mapping of a criterion name to its description
- a single criterion name present in one of the default criteria
- a single `ConstitutionalPrinciple` instance
Returns:
-------
Dict[str, str]
A dictionary mapping criterion names to descriptions.
Examples:
--------
>>> criterion = "relevance"
>>> CriteriaEvalChain.resolve_criteria(criteria)
{'relevance': 'Is the submission referring to a real quote from the text?'}
"""
return resolve_criteria(criteria)
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does resolve_criteria() do?
resolve_criteria() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/evaluation/criteria/eval_chain.py.
Where is resolve_criteria() defined?
resolve_criteria() is defined in libs/langchain/langchain_classic/evaluation/criteria/eval_chain.py at line 287.
What does resolve_criteria() call?
resolve_criteria() calls 1 function(s): resolve_criteria.
What calls resolve_criteria()?
resolve_criteria() is called by 3 function(s): from_llm, from_llm, resolve_criteria.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free