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
}
客服
客服
您好!有什麼可以協助?
請留下訊息,我們會盡快回覆。