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

# Providing Feedback

> Improve model performance through feedback collection and fine-tuning.

## Overview

The VLM Run Feedback API enables you to collect and submit feedback on model predictions to continuously improve accuracy and performance. This feedback data is essential for fine-tuning `vlm-1` models to better serve your specific use cases and domains.

## Why Feedback Matters

Providing feedback on model predictions serves several critical purposes:

* **Model Fine-tuning**: Feedback data is used to fine-tune models for improved accuracy on your specific data patterns
* **Performance Optimization**: Helps identify areas where the model needs improvement
* **Domain Adaptation**: Enables the model to better understand your industry-specific requirements
* **Quality Assurance**: Provides a mechanism to flag incorrect or problematic predictions
* **Evaluations**: Structured corrections (and optionally note-derived JSON) are the ground truth the platform compares against stored model outputs when you run [Evaluations](/platform/observe/evaluations)

<Steps>
  <Step title="Submit Feedback">
    After receiving a prediction, you can submit feedback to help improve future model performance.

    <CodeGroup>
      ```python Python theme={"theme":{"light":"github-light","dark":"dark-plus"}}
      from vlmrun.client import VLMRun

      client = VLMRun(api_key="<your-api-key>")

      feedback_response = client.feedback.submit(
          request_id="<request-id>",
          response={
            "name": "John Doe",
            "date_of_birth": "1955-01-01",
            "email": "john@doe.com"
          },
          notes="The extraction was accurate and captured all key information"
      )
      print(f"Feedback submitted: {feedback_response.id}")
      ```

      ```typescript Node.js SDK theme={"theme":{"light":"github-light","dark":"dark-plus"}}
      import { VlmRun } from "vlmrun";

      const client = new VlmRun({
        apiKey: "<your-api-key>",
      });

      const feedbackResponse = await client.feedback.submit({
        id: "<request-id>",
        response: {
          name: "John Doe",
          date_of_birth: "1955-01-01",
          email: "john@doe.com"
        },
        notes: "The extraction was accurate and captured all key information"
      });
      console.log(`Feedback submitted: ${feedbackResponse.id}`);
      ```
    </CodeGroup>
  </Step>

  <Step title="Retrieve Feedback">
    You can retrieve all feedback associated with a specific prediction.

    <CodeGroup>
      ```python Python theme={"theme":{"light":"github-light","dark":"dark-plus"}}
      feedback_list = client.feedback.get("<request-id>")
      for feedback in feedback_list:
          print(f"Feedback ID: {feedback.id}")
          print(f"Response: {feedback.response}")
          print(f"Notes: {feedback.notes}")
      ```

      ```typescript Node.js SDK theme={"theme":{"light":"github-light","dark":"dark-plus"}}
      const feedbackList = await client.feedback.get("<request-id>");
      feedbackList.forEach(feedback => {
        console.log(`Feedback ID: ${feedback.id}`);
        console.log(`Response: ${JSON.stringify(feedback.response)}`);
        console.log(`Notes: ${feedback.notes}`);
      });
      ```
    </CodeGroup>
  </Step>
</Steps>

## Fine-tuning with Feedback

The feedback you provide is used to create fine-tuned models that perform better on your specific use cases. This process involves:

1. **Data Collection**: Feedback is aggregated across your organization
2. **Model Training**: Fine-tuned models are created using your feedback data
3. **Performance Improvement**: Updated models show improved accuracy on similar tasks

## Best Practices

* **Be Specific**: Provide detailed feedback about what was correct or incorrect

* **Use Structured Data**: Include ratings, categories, and specific metrics when possible

* **Add Context**: Use the notes field to explain your reasoning

* **Consistent Feedback**: Maintain consistent criteria across your team for better model training

<Warning>
  Fine-tuning capabilities are currently only available for our enterprise-tier customers.
  If you are interested in using this feature, please [contact us](mailto:support@vlm.run).
</Warning>
