BazaarLinkBazaarLink
登入
文件API 参考SDK 参考Agent 应用AI Skills
账户

提交 Tavily 反馈

提交搜索请求或会话的相关性和实用性反馈。BazaarLink 会接受请求并返回 Tavily 成功格式,但目前只接受反馈,尚未处理反馈内容。至少需要提供 request_id 或 session_id;可使用 X-Session-Id 标识会话。

POST/v1/feedback

验证

Authorization必填
string · header

在 Authorization 标头以 Bearer token 传入 API 密钥。

Body

request_id
string

要反馈的搜索请求 ID;提供后反馈将应用于该请求。

maxLength: 200
Example: 8442d8d0-8b74-4fca-a89e-5b1b6dd33295
session_id
string

要反馈的会话 ID;未提供 request_id 时,反馈将应用于整个会话。

maxLength: 200
Example: 5874812a-2e9b-43ea-8978-6cc9225b587b
agent_score
number | string

代理对结果相关性和实用性的整体评分。

string maxLength: 64
Example: 1
human_score
number | string

如果收集终端用户意见,填写用户评分。

string maxLength: 64
Example: 1
extra_scores
array<object>

自定义评分维度列表;每项需要 label 和 value。

maxItems: 50
label必填
string

评分维度的名称。

maxLength: 64
Example: freshness
value必填
number | string

数值评分或不超过 64 个字符的短文本标签。

string maxLength: 64
Example: 0.8
comment
string

反馈的自由文本说明。

maxLength: 10000
Example: Results were authoritative but several were old.
response_delivered
string

你使用搜索结果生成的最终答案。

maxLength: 50000
Example: The results show that ...
used_ids
string[]

实际用于答案的结果 ID;与 used_urls 二选一。

maxItems: 100; item maxLength: 200
Example: ["a3f9c2-04"]
used_urls
string[]

实际用于答案的结果 URL;与 used_ids 二选一。

maxItems: 100; item maxLength: 2000
Example: ["https://example.com/article"]
used_citations
string[]

答案中引用的具体来源片段。

maxItems: 100; item maxLength: 2000
Example: ["A cited sentence."]
urls_scores
array<object>

逐条结果反馈;每项必须包含 id 或 url。

maxItems: 100
id
string

搜索响应中的结果 ID;与 url 至少提供一个。

maxLength: 200
Example: a3f9c2-04
url
string

搜索结果的 URL;没有结果 ID 时使用,与 id 至少提供一个。

maxLength: 2000
Example: https://example.com/article
agent_score
number | string

此结果对代理的评分,可为数字或短文本。

string maxLength: 64
Example: 1
scores
array<object>

此结果的额外标签评分,每项包含 label 和 value。

maxItems: 20
label必填
string

评分维度的名称。

maxLength: 64
Example: freshness
value必填
number | string

数值评分或不超过 64 个字符的短文本标签。

string maxLength: 64
Example: 0.8
comment
string

针对该结果的文字说明。

maxLength: 2000
Example: Directly answered the question.
POST /v1/feedback
curl -X POST https://api.bazaarlink.ai/v1/feedback \
  -H "Authorization: Bearer $BAZAARLINK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"request_id":"8442d8d0-8b74-4fca-a89e-5b1b6dd33295","agent_score":1,"used_ids":["a3f9c2-04"]}'
响应示例

反馈已接受;响应包含 feedback_id 和 response_time。反馈内容目前尚未处理。

{
  "success": true,
  "feedback_id": "f1c0f0a5-0f9b-4a62-9e0e-1b6b2f0a6d31",
  "response_time": 0.05
}
客服
客服
您好!有什么可以协助?
请留下消息,我们会尽快回复。