GetEvaluationTemplates - 获取链路评估系统内部使用的模版

链路评估系统通过和大模型交互、来生成对用户应用的评估结果。评估系统和大模型交互时,需要构造特定的提问提交给大模型。这些问题会基于评估系统内部定义的一些模板构造。这个API返回这些评估系统内部预设模板,供调用者参考和理解。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求语法

GET /api/v1/PAILLMTrace/eval/templates HTTP/1.1

请求参数

名称类型必填描述示例值
当前API无需请求参数

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

Id of the request

6A87228C-969A-1381-98CF-AE07AE630FA5
Codestring

内部错误码。只在响应出错时被设置。

ExecutionFailure
Messagestring

响应错误信息。只在响应出错时被设置。

cannot get data back.
EvaluationTemplatesarray

评估系统内部使用的构造 llm 交互信息的一系列模板。

EvaluationTemplatesany

一个模板。

{ 'eval_app_type': constants.EvalAppType.RAG, 'templates': [ { 'metric': "relevance", 'template': '...' }, { 'metric': "faithfulness", 'template': '...' }, { 'metric': 'correctness', 'template': '...' } ] }

示例

正常返回示例

JSON格式

{
  "RequestId": "6A87228C-969A-1381-98CF-AE07AE630FA5",
  "Code": "ExecutionFailure",
  "Message": "cannot get data back.",
  "EvaluationTemplates": [
    "    {\n            'eval_app_type': constants.EvalAppType.RAG,\n            'templates': [\n                {\n                    'metric': \"relevance\",\n                    'template': '...'\n                },\n                {\n                    'metric': \"faithfulness\",\n                    'template': '...'\n                },\n                {\n                    'metric': 'correctness',\n                    'template': '...'\n                }\n            ]\n        }"
  ]
}

错误码

访问错误中心查看更多错误码。