> ## Documentation Index
> Fetch the complete documentation index at: https://docs.portkey.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Feedback

> Feedback in Portkey provide a simple way to get weighted feedback from customers on any request you served, at any stage in your app.

You can capture this feedback on a generation or conversation level and analyze it based on custom tags by adding meta data to the relevant request.

The Feedback API allows you to gather weighted feedback from users on any generation or conversation at any stage within your app. By incorporating custom metadata, you can tag and analyze feedback more effectively.

## API Reference

[Create Feedback](/api-reference/admin-api/data-plane/feedback/create-feedback) | [Update Feedback](/api-reference/admin-api/data-plane/feedback/update-feedback)

## SDK Usage

The `feedback.create` method in the Portkey SDK provides a way to capture user feedback programmatically.

### Method Signature

<Tabs>
  <Tab title="NodeJS">
    ```js theme={"system"}
    portkey.feedback.create(feedbackParams);
    ```
  </Tab>

  <Tab title="Python">
    ```py theme={"system"}
    portkey.feedback.create(feedbackParams);
    ```
  </Tab>
</Tabs>

#### Parameters

* *feedbackParams (Object)*: Parameters for the feedback request, including `trace_id`, `value`, `weight`, and `metadata`.

### Example Usage

<Tabs>
  <Tab title="NodeJS">
    ```js theme={"system"}
    import Portkey from 'portkey-ai';

    // Initialize the Portkey client

    const portkey = new Portkey({
        apiKey: "PORTKEY_API_KEY"  // Replace with your Portkey API key
    });

    // Send feedback

    const sendFeedback = async () => {
        await portkey.feedback.create({
            traceID: "REQUEST_TRACE_ID",
            value: 1  // For thumbs up
        });
    }

    await sendFeedback();
    ```
  </Tab>

  <Tab title="Python">
    ```py theme={"system"}
    from portkey_ai import Portkey

    # Initialize the Portkey client

    portkey = Portkey(
        api_key="PORTKEY_API_KEY"  # Replace with your Portkey API key
    )

    # Send feedback

    def send_feedback():
        portkey.feedback.create(
            trace_id= 'REQUEST_TRACE_ID',
            value= 0  # For thumbs down
        )

    send_feedback()
    ```
  </Tab>
</Tabs>

The Update Feedback API allows you to update existing feedback details
