_prepare_output() — langchain Function Reference
Architecture documentation for the _prepare_output() function in string_run_evaluator.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 463340b6_4fd0_8a0a_5cee_c0ea5a3163a4["_prepare_output()"] 96e174c1_4107_a88b_8d98_3f22e5d7fb20["StringRunEvaluatorChain"] 463340b6_4fd0_8a0a_5cee_c0ea5a3163a4 -->|defined in| 96e174c1_4107_a88b_8d98_3f22e5d7fb20 d3515eaf_6765_8d34_0615_40c3ff4f20d0["_call()"] d3515eaf_6765_8d34_0615_40c3ff4f20d0 -->|calls| 463340b6_4fd0_8a0a_5cee_c0ea5a3163a4 45efc57d_2b9e_96a6_a608_68913f941b40["_acall()"] 45efc57d_2b9e_96a6_a608_68913f941b40 -->|calls| 463340b6_4fd0_8a0a_5cee_c0ea5a3163a4 style 463340b6_4fd0_8a0a_5cee_c0ea5a3163a4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/smith/evaluation/string_run_evaluator.py lines 316–325
def _prepare_output(self, output: dict[str, Any]) -> dict[str, Any]:
evaluation_result = EvaluationResult(
key=self.name,
comment=output.get("reasoning"),
**output,
)
if RUN_KEY in output:
# TODO: Not currently surfaced. Update
evaluation_result.evaluator_info[RUN_KEY] = output[RUN_KEY]
return {"feedback": evaluation_result}
Domain
Subdomains
Source
Frequently Asked Questions
What does _prepare_output() do?
_prepare_output() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/smith/evaluation/string_run_evaluator.py.
Where is _prepare_output() defined?
_prepare_output() is defined in libs/langchain/langchain_classic/smith/evaluation/string_run_evaluator.py at line 316.
What calls _prepare_output()?
_prepare_output() is called by 2 function(s): _acall, _call.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free