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

# feedback

> Python SDK reference for weave.trace.feedback

# API Overview

***

[Source](https://github.com/wandb/weave/blob/v0.54.0/weave/trace/feedback.py#L47)

## <kbd>class</kbd> `Feedback`

A feedback row, as a feedback query returns it.

**Pydantic Fields:**

* `id`: `<class 'str'>`
* `project_id`: `<class 'str'>`
* `weave_ref`: `<class 'str'>`
* `creator`: `str | None`
* `feedback_type`: `<class 'str'>`
* `payload`: `dict[str, typing.Any]`
* `annotation_ref`: `str | None`
* `runnable_ref`: `str | None`
* `call_ref`: `str | None`
* `trigger_ref`: `str | None`
* `queue_id`: `str | None`
* `scorer_tags`: `list[str]`
* `scorer_tag_reasons`: `dict[str, str]`
* `scorer_tag_confidences`: `dict[str, float]`
* `scorer_ratings`: `dict[str, float]`
* `scorer_rating_reasons`: `dict[str, str]`
* `scorer_rating_confidences`: `dict[str, float]`
* `span_agent_name`: `<class 'str'>`
* `span_agent_version`: `<class 'str'>`
* `span_status_code`: `<class 'str'>`
* `span_conversation_id`: `<class 'str'>`
* `span_trace_id`: `<class 'str'>`
* `scorer_trace_id`: `<class 'str'>`
* `wb_user_id`: `str | None`
* `created_at`: `<class 'datetime.datetime'>`

[Source](https://github.com/wandb/weave/blob/v0.54.0/weave/trace/feedback.py#L76)

### <kbd>classmethod</kbd> `warn_on_extra_fields`

```python theme={"system"}
warn_on_extra_fields(values: 'Any') → Any
```

***

[Source](https://github.com/wandb/weave/blob/v0.54.0/weave/trace/feedback.py#L164)

## <kbd>class</kbd> `FeedbackQuery`

Lazy-loading object for fetching feedback from the server.

[Source](https://github.com/wandb/weave/blob/v0.54.0/weave/trace/feedback.py#L177)

### <kbd>method</kbd> `__init__`

```python theme={"system"}
__init__(
    entity: 'str',
    project: 'str',
    query: 'Mapping[str, Any]',
    offset: 'int | None' = None,
    limit: 'int | None' = None,
    show_refs: 'bool' = False
)
```

***

[Source](https://github.com/wandb/weave/blob/v0.54.0/weave/trace/feedback.py#L227)

### <kbd>method</kbd> `execute`

```python theme={"system"}
execute() → Feedbacks
```

***

[Source](https://github.com/wandb/weave/blob/v0.54.0/weave/trace/feedback.py#L206)

### <kbd>method</kbd> `refresh`

```python theme={"system"}
refresh() → Feedbacks
```

***

[Source](https://github.com/wandb/weave/blob/v0.54.0/weave/trace/feedback.py#L233)

### <kbd>method</kbd> `refs`

```python theme={"system"}
refs() → Refs
```

***

[Source](https://github.com/wandb/weave/blob/v0.54.0/weave/trace/feedback.py#L101)

## <kbd>class</kbd> `Feedbacks`

A collection of Feedback objects with utilities.

[Source](https://github.com/wandb/weave/blob/v0.54.0/weave/trace/feedback.py#L106)

### <kbd>method</kbd> `__init__`

```python theme={"system"}
__init__(
    show_refs: 'bool',
    feedbacks: 'Iterable[Feedback] | None' = None
) → None
```

***

[Source](https://github.com/wandb/weave/blob/v0.54.0/weave/trace/feedback.py#L112)

### <kbd>method</kbd> `refs`

```python theme={"system"}
refs() → Refs
```

Return the unique refs associated with these feedbacks.

***

[Source](https://github.com/wandb/weave/blob/v0.54.0/weave/trace/feedback.py#L250)

## <kbd>class</kbd> `RefFeedbackQuery`

Object for interacting with feedback associated with a particular ref.

[Source](https://github.com/wandb/weave/blob/v0.54.0/weave/trace/feedback.py#L256)

### <kbd>method</kbd> `__init__`

```python theme={"system"}
__init__(ref: 'str') → None
```

***

[Source](https://github.com/wandb/weave/blob/v0.54.0/weave/trace/feedback.py#L318)

### <kbd>method</kbd> `add`

```python theme={"system"}
add(
    feedback_type: 'str',
    payload: 'dict[str, Any] | None' = None,
    creator: 'str | None' = None,
    annotation_ref: 'str | None' = None,
    **kwargs: 'dict[str, Any]'
) → str
```

Add feedback to the ref.

feedback\_type: A string identifying the type of feedback. The "wandb." prefix is reserved. creator: The name to display for the originator of the feedback.

***

[Source](https://github.com/wandb/weave/blob/v0.54.0/weave/trace/feedback.py#L351)

### <kbd>method</kbd> `add_note`

```python theme={"system"}
add_note(note: 'str', creator: 'str | None' = None) → str
```

***

[Source](https://github.com/wandb/weave/blob/v0.54.0/weave/trace/feedback.py#L337)

### <kbd>method</kbd> `add_reaction`

```python theme={"system"}
add_reaction(emoji: 'str', creator: 'str | None' = None) → str
```

Add an emoji reaction, written as the type the target's UI renders.

***

[Source](https://github.com/wandb/weave/blob/v0.54.0/weave/trace/feedback.py#L227)

### <kbd>method</kbd> `execute`

```python theme={"system"}
execute() → Feedbacks
```

***

[Source](https://github.com/wandb/weave/blob/v0.54.0/weave/trace/feedback.py#L360)

### <kbd>method</kbd> `purge`

```python theme={"system"}
purge(feedback_id: 'str') → None
```

***

[Source](https://github.com/wandb/weave/blob/v0.54.0/weave/trace/feedback.py#L206)

### <kbd>method</kbd> `refresh`

```python theme={"system"}
refresh() → Feedbacks
```

***

[Source](https://github.com/wandb/weave/blob/v0.54.0/weave/trace/feedback.py#L233)

### <kbd>method</kbd> `refs`

```python theme={"system"}
refs() → Refs
```

***

[Source](https://github.com/wandb/weave/blob/v0.54.0/weave/trace/feedback.py#L381)

### <kbd>function</kbd> `feedback_create_params`

```python theme={"system"}
feedback_create_params(
    project_id: 'str',
    weave_ref: 'str',
    feedback_type: 'str',
    payload: 'dict[str, Any]',
    creator: 'str | None' = None,
    annotation_ref: 'str | None' = None,
    runnable_ref: 'str | None' = None,
    call_ref: 'str | None' = None,
    scorer_tags: 'list[str] | None' = None,
    scorer_tag_reasons: 'dict[str, str] | None' = None,
    scorer_tag_confidences: 'dict[str, float] | None' = None
) → FeedbackCreateParams
```

A feedback create request with every field, in a fixed order.

The scorer and span fields get the server's defaults unless given, and batched feedback goes out in this key order.
