submit_feedback
Record thumbs-up or thumbs-down feedback on a natural-language-to-SQL query result, with optional corrected SQL, to support verified examples and knowledge-base updates.
Instructions
Record user feedback for a query result.
Feedback is stored in ~/.nlqueries/feedback/<agent_id>.jsonl. A thumbs-up
can become a verified example through ``nlqueries promote-feedback``, and a
correction an example query through ``nlqueries export-kb``; feedback sent
here is used only when an operator includes it with ``--include-anonymous``.
Args:
question: The question that was asked.
agent_id: The agent that answered it.
generated_sql: The SQL that was generated (copy from the query result).
rating: ``"up"`` (correct answer) or ``"down"`` (wrong answer).
corrected_sql: Optional corrected SQL when rating is ``"down"``.
Returns:
Confirmation string, or an error message.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"question": "<question>",
"agent_id": "<agent_id>",
"generated_sql": "<generated_sql>",
"rating": "<rating>"
},
"name": "submit_feedback"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rating | Yes | ||
| agent_id | Yes | ||
| question | Yes | ||
| corrected_sql | No | ||
| generated_sql | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |