Class Feedback

java.lang.Object
com.oracle.database.selectai.model.Feedback

public final class Feedback extends Object
Immutable request payload for DBMS_CLOUD_AI.FEEDBACK.

Use this request object when an application wants to tell Select AI whether generated SQL was useful, provide a correction for a poor NL2SQL answer, or remove previously submitted guidance. Feedback is profile-specific prompt guidance for future SQL generation, not model fine-tuning and not a general rating mechanism for chat or RAG responses. The target profile is supplied by the Profile object used to submit the request. A feedback request identifies one generated SQL statement either by its database SQL identifier or by the SQL text itself.

See Also:
  • Method Details

    • getSqlId

      public String getSqlId()
      Returns the database SQL identifier used to locate the reviewed SQL.
      Returns:
      SQL identifier associated with the feedback, or null when SQL text is used instead
    • getSqlText

      public String getSqlText()
      Returns the generated SQL text being reviewed.
      Returns:
      SQL text associated with the feedback, or null when SQL identifier is used instead
    • getFeedbackType

      Returns whether the generated SQL was marked useful or needing correction.
      Returns:
      normalized feedback type
    • getFeedbackTypeValue

      Returns the lowercase database value for feedback_type.
      Returns:
      positive, negative, or null
    • getResponse

      public String getResponse()
      Returns the expected or corrected response for the reviewed SQL.
      Returns:
      expected SQL response; required for negative ADD feedback
    • getFeedbackContent

      Returns the user's natural-language explanation for the feedback.
      Returns:
      optional natural-language feedback content
    • getOperation

      Returns the normalized action to perform on the feedback store.
      Returns:
      normalized feedback operation enum, or null when DBMS_CLOUD_AI should apply its default operation
    • getOperationValue

      Returns the database value for the requested operation.
      Returns:
      lowercase operation value, or null when DBMS_CLOUD_AI should apply its default operation
    • builder

      public static Feedback.Builder builder()
      Creates a builder for a feedback request.
      Returns:
      new builder for constructing validated Feedback instances