sdac-store-feedback
Purpose
Stores user feedback (category, free-text comment, and optional numeric rating) for a specific SDAC agent response or full conversation. Every call appends a new row so repeated or revised submissions remain available as separate evidence.
Tool type
Deterministic (append-only write)
Tool ID
sdac-store-feedback
Inputs
conversation_sk(number, required) --conversationSKof the agent response being rated (fromsdac-log-conversation-turn)report_id(string, required, UUID) -- Cost report GUIDuser_id(string, required) -- User identifier from authenticationsession_id(string, required) -- Browser session IDagent_id(string, required) -- Agent that produced the responsefeedback_scope(response|conversation, default:response) -- Whether feedback applies to a single response or the full conversationturn_number(number, required) -- Turn number of the rated responserating(number, optional) -- Numeric rating on a 1-5 scalecategory(accuracy|clarity|relevance|helpfulness|tone|other| null, required) -- Feedback categorycomment(string, required) -- Free-text explanation (1-2000 characters)
Outputs
feedback_sk(number) -- Database primary key of the inserted feedback recordsuccess(boolean) -- Alwaystrueon successmessage(string) -- Always"Feedback recorded"
Example output
{
"feedback_sk": 9021,
"success": true,
"message": "Feedback recorded"
}
Functional details
- Uses a SQL
INSERT; there is no(ConversationSK, UserId)unique constraint and no update-in-place behavior. ratingis optional; a category and comment are sufficient.feedback_scopeis accepted by the tool schema for caller intent but is not currently passed intoinsertFeedback()or stored inSDAC.fact_UserFeedback.
Usage notes
- Pass the
conversationSKreturned bysdac-log-conversation-turnasconversation_sk. - Although the tool schema accepts an omitted
rating, the deployed SQL table currently declaresRatingasNOT NULL; callers should supply a 1-5 rating until those contracts are reconciled. - Feedback is consumed by the Prompt Tuner workflow via
sdac-read-feedback.
Implementation details
- Writes to
SDAC.fact_UserFeedbackviainsertFeedbackinpackages/domain-sdac/src/tools/feedback/feedback-db.ts.
Code Location: packages/domain-sdac/src/tools/store-feedback.tool.ts