Submit feedback
/tavily/feedback● SupportedRequest body
request_idstringoptionalThe search request to give feedback on, as returned in the
request_idfield of the search response. When provided, the feedback applies to this request.session_idstringoptionalThe session to give feedback on — the value you sent in the
X-Session-Idheader. Whenrequest_idis omitted, the feedback applies to the whole session. Optional ifrequest_idis provided.agent_scorenumber | stringoptionalOverall score for how relevant and useful the results were for your task.
human_scorenumber | stringoptionalFeedback from your end user, if you collect it.
extra_scoresarrayoptionalAdditional labeled scores for the dimensions you care about.
Expand sub-fields (2)
labelstringrequiredName of the dimension being scored.
valuenumber | stringrequiredA numeric score, or a short string label (max 64 characters).
commentstringoptionalFree-text explanation of the feedback.
response_deliveredstringoptionalThe final answer you produced using the results.
used_idsarrayoptionalIDs of the results you actually used in your answer. Alternative to
used_urls.used_urlsarrayoptionalURLs of the results you actually used in your answer. Alternative to
used_ids.used_citationsarrayoptionalThe specific content snippets you quoted from the results.
More parameters (1)
urls_scoresarrayoptionalPer-result feedback. Identify each result by
idorurl.Expand sub-fields (5)
idstringoptionalThe
idof the result, as returned in the search response.urlstringoptionalThe URL of the result. Use instead of
idwhen you don't have the result ID.agent_scorenumber | stringoptionalScore for this specific result.
scoresarrayoptionalAdditional labeled scores for this result.
commentstringoptionalFree-text explanation of the feedback on this result.
Returns
200
Forwarded to Tavily as is and not billed (Tavily's own pricing does not charge for feedback).
Errors follow the Tavily format — see error codes
Request
curl
curl https://api.deepraxis.com/tavily/feedback \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"session_id":"docs-example-session","agent_score":1,"comment":"Search results were relevant and helpful."}'Python
from tavily import TavilyClient
tavily_client = TavilyClient(
api_key="$PRAXIS_API_KEY",
api_base_url="https://api.deepraxis.com/tavily",
)
tavily_client.feedback(
session_id="docs-example-session",
agent_score=1,
comment="Search results were relevant and helpful.",
)TypeScript
import { tavily } from "@tavily/core";
const tvly = tavily({
apiKey: "$PRAXIS_API_KEY",
apiBaseURL: "https://api.deepraxis.com/tavily",
});
await tvly.feedback({
sessionId: "docs-example-session",
agentScore: 1,
comment: "Search results were relevant and helpful.",
});Response 200
{
"success": true,
"feedback_id": "a77783b2-206a-44eb-9277-850ad0f910ea",
"response_time": 0
}Response
HTTP 200
Feedback accepted
application/json
| Name | Type | Description |
|---|---|---|
| success | boolean | Whether the feedback was accepted. |
| feedback_id | string | Unique identifier of this feedback submission. |
| response_time | number | Response time of this feedback request in seconds. |