> For the complete documentation index, see [llms.txt](https://docs.raga.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.raga.ai/ragaai-catalyst/human-feedback-and-annotations/corrections-as-few-shot-examples.md).

# Corrections as Few-Shot Examples

This page follows from the "[Add Metric Corrections](/ragaai-catalyst/human-feedback-and-annotations/add-metric-corrections.md)" section. Refer to the same as a pre-requisite step for the following instructions.

### Integrating Feedback into Custom Metrics

Enhance your custom metrics by incorporating the human feedback (scores and explanations) you provide:

<figure><img src="/files/OzlAIwdLUrI3bM0LaE5z" alt=""><figcaption></figcaption></figure>

1. **New Input Type:**
   * When defining custom metrics, users can now find a new input type called "**`Few shot examples"`** in the Custom Prompt format, alongside existing options (“system”, “user”, etc)
2. **Configuration:**
   * Click the **Configure** button to select the dataset and specific columns containing any feedback you may have added using the corrections flow previously.
   * Imported variables are displayed using double square brackets (e.g., `[[response]]`), indicating they are sampled from an existing dataset.
3. **Sample Size Control:**
   * Adjust the number of few-shot examples to include using a stepper (currently supporting values between 1 and 5).

<figure><img src="/files/szyTinpw7yqWp79FC0qF" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/I8NAkeBdRN4gPBXEVloJ" alt=""><figcaption></figcaption></figure>

Once you define a custom metric containing few-shot examples and deploy it on the platform, you can run it from the "Evaluate" button, similar to our out-of-the-box metrics. These will have the following data for your reference:

* A **“Contains Feedback”** tag against such custom metrics.
* A configuration table displaying the source dataset and corrected metric, ensuring you know where the feedback originated.

<figure><img src="/files/Lb5WngdwoH1owcLrT3Zj" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/eEdCe09VzwHKq9ZJJhDR" alt=""><figcaption></figcaption></figure>

Once triggered, these metrics will be sent to the LLM with your few-shot examples attached to them, helping the LLMs respond better. Our enterprise customers will be able to apply the above corrections to our inbuilt metrics as well, in addition to custom metrics.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.raga.ai/ragaai-catalyst/human-feedback-and-annotations/corrections-as-few-shot-examples.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
