Guides
Feedback
Report a result or an answer that was wrong, missing or out of date, with reasons from a fixed list, and rate answers with votes.
Feedback tells the Sprouts Data team when an answer was wrong: a record that does not belong, one that is missing, details that are out of date, results in the wrong order. Reports and flags join a review queue, and each report keeps a status that changes as it is reviewed. Reports are kept for one year.
There are two kinds of feedback:
- A report (
POST /v1/feedback) describes a problem in detail: which answer, which record, what went wrong and what you expected. - A vote (
PUT /v1/feedback/votes) is a quick rating of one answer: a like or dislike of the whole set, or a flag on one record.
Both need dsp.search.read or dsp.usage.read, and both are free. Every field is in the feedback reference. In the dashboard, your reports and their review are at /feedback.
The reasons#
Reports and votes give their reasons from one closed list, so that the same complaint is always counted the same way. GET /v1/feedback/tags returns it, with a label, a description and the level each reason applies to:
| Reason | Level | Meaning |
|---|---|---|
irrelevant | result | Not what was asked for. |
wrong_entity | result | The right kind of result, but not the one meant. |
stale | result | True once, but not now. |
data_quality | result | The right record, with something on it incorrect. |
duplicate | result | The same record appears more than once. |
bad_ranking | result_set | The right results, but the best are not near the top. |
missing | result_set | An expected record is not there. |
no_results | result_set | Nothing came back. |
too_few | result_set | There should be more results. |
too_many | result_set | Far broader than what was asked. |
other | either | None of these fit. Needs a comment. |
A reason that does not describe the target's level, or an unknown one, is refused with 422.
Report a problem#
POSThttps://api.sproutsdata.ai/v1/feedback
curl -X POST "https://api.sproutsdata.ai/v1/feedback" \
-H "X-API-Key: $SPROUTS_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"subject_ref": { "kind": "request", "id": "req_7f3a9c2e1b4d" },
"target": { "kind": "result_set" },
"sentiment": "bad",
"tags": ["too_many"],
"comment": "Several results are headquartered outside Germany.",
"expected": { "should_exclude": ["stripe.com"] }
}'| Field | What it says |
|---|---|
target | Required. kind: "result_set" for the answer as a whole, or kind: "result" for one record, named by entity_id (the row's id) and optionally entity_type. |
subject_ref | Which answer: kind: "request" with the call's request_id (from meta.request_id or the X-Request-Id header), or kind: "agent_run" with a run_id. |
sentiment | bad (the default) or good. |
tags | Up to 10 reasons from the list above. |
comment | Up to 5,000 characters in your own words. Required with other. |
expected | What should have been there: should_include and should_exclude (up to 200 each) and a note. |
subject_ref must name a call in your own usage history: one you made, or, for a workspace admin, one the workspace made. Otherwise the answer is 404 with feedback.subject_not_found. When it does, the report's target_verified says whether the record you named was in that answer (a report on the whole set is always verified). A report without subject_ref is accepted too, with target_verified: false.
The answer is 201 with the report, its feedback_id and status: "open". Send an Idempotency-Key (up to 255 characters) to make a retry safe: a repeat with the same key answers 200 with the report already made.
GET /v1/feedback lists your reports, newest first (a workspace admin sees the workspace's), with limit 1 to 100 (default 25) and a cursor from next_cursor.
Vote on an answer#
PUThttps://api.sproutsdata.ai/v1/feedback/votes
curl -X PUT "https://api.sproutsdata.ai/v1/feedback/votes" \
-H "X-API-Key: $SPROUTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"request_id": "req_7f3a9c2e1b4d",
"level": "result_set",
"entity_category": "company",
"vote": "dislike",
"reason_code": "too_many"
}'A vote names the answer by its request_id and the kind of records it held in entity_category. The rules:
- On a whole answer (
level: "result_set"), the vote islikeordislike. - On one record (
level: "result"), the vote isflag, with the record'sentity_id. - A
liketakes no reason. Adislikeor aflagmay give areason_codefrom the list, for its level, and then atextof up to 1,000 characters.
Each voter has one vote per answer and record. Sending a different vote replaces the earlier one; sending the same vote again changes nothing, and the answer says changed: false. GET /v1/feedback/votes?request_id=… returns your current votes on that answer.