Skip to main content
POST
/
v1
/
knowledge
/
feedback
Submit feedback
curl --request POST \
  --url https://api.example.com/v1/knowledge/feedback \
  --header 'Content-Type: application/json' \
  --data '
{
  "incidentId": "<string>",
  "patternId": "<string>",
  "type": "<string>",
  "comment": "<string>"
}
'

Overview

Submits human feedback on an AI-generated root cause analysis. Feedback directly influences the confidence scores of existing patterns and may generate new patterns over time. This is the primary mechanism for closing the learning loop — confirmed root causes strengthen pattern confidence, while rejections reduce it. Required role: admin or member

Request body

incidentId
string
required
The identifier of the incident whose investigation result you are providing feedback on.
patternId
string
The identifier of the specific pattern you are confirming, rejecting, or correcting. Omit if no pattern was matched or if you are providing free-form feedback only.
type
string
required
The type of feedback. One of:
  • confirm_rca — the AI’s root cause analysis was correct
  • reject_rca — the AI’s root cause analysis was incorrect
  • correct_rca — the AI was partially correct; use comment to describe the true root cause
comment
string
Optional free-form text. Required when type is correct_rca — describe the actual root cause so the system can learn from the correction.

Response

Returns 201 Created confirming the feedback was recorded and indicating the updated confidence score.
{
  "feedbackId": "fbk_01HX9VTPQR3KF8MZWBYD5N6JCE",
  "incidentId": "inc_01HX9VTPQR3KF8MZWBYD5N6JCE",
  "patternId": "pat_01HX9VTPQR3KF8MZWBYD5N6JCE",
  "type": "confirm_rca",
  "updatedConfidence": 0.97,
  "createdAt": "2024-04-01T15:00:00Z"
}
FieldTypeDescription
feedbackIdstringUnique identifier for the submitted feedback record
incidentIdstringThe incident this feedback applies to
patternIdstringThe pattern whose confidence was updated. null if no pattern matched
typestringThe feedback type as submitted
updatedConfidencenumberNew confidence score for the pattern after applying this feedback
createdAtstringISO 8601 timestamp when the feedback was recorded

Error responses

StatusError codeDescription
400validation_errorincidentId or type is missing, or type is not a valid value
400comment_requiredtype is correct_rca but no comment was provided
404not_foundThe specified incidentId or patternId does not exist
Submitting correct_rca feedback with a detailed comment is the most valuable signal you can provide. The AI uses correction comments to refine its understanding of failure signatures that it previously misclassified.

Examples

# Confirm a correct root cause analysis
curl https://api.causeflow.ai/v1/knowledge/feedback \
  -X POST \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "incidentId": "inc_01HX9VTPQR3KF8MZWBYD5N6JCE",
    "patternId": "pat_01HX9VTPQR3KF8MZWBYD5N6JCE",
    "type": "confirm_rca"
  }'