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

# Feedback SDK Reference

> Capture user feedback on LLM outputs with the Node.js and Python SDKs: create and remove feedback and feedback evaluations on generations.

## Feedback

### Remove a Feedback Evaluation

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  from orq_ai_sdk import Orq
  import os

  with Orq(
      api_key=os.getenv("ORQ_API_KEY", ""),
  ) as orq:

      orq.feedback.remove_evaluation()

      # Use the SDK ...

  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import { Orq } from "@orq-ai/node";

  const orq = new Orq({
    apiKey: process.env["ORQ_API_KEY"] ?? "",
  });

  async function run() {
    await orq.feedback.removeEvaluation();

  }

  run();
  ```
</CodeGroup>

<Expandable title="Parameters">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "id": str,  # required
        "trace_id": str,  # required
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      id: string;  // required
      traceId: string;  // required
    }
    ```
  </CodeGroup>
</Expandable>

### Create a Feedback Evaluation

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  from orq_ai_sdk import Orq
  import os

  with Orq(
      api_key=os.getenv("ORQ_API_KEY", ""),
  ) as orq:

      orq.feedback.create_evaluation()

      # Use the SDK ...

  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import { Orq } from "@orq-ai/node";

  const orq = new Orq({
    apiKey: process.env["ORQ_API_KEY"] ?? "",
  });

  async function run() {
    await orq.feedback.createEvaluation();

  }

  run();
  ```
</CodeGroup>

<Expandable title="Parameters">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "id": str,  # required
        "evaluation_type": Literal["human_review"],  # required
        "human_review_id": Optional[str],
        "source": Optional[Literal["orq", "external"]],
        "explanation": Optional[str],
        "reviewed_at": str,  # optional
        "type": Literal["string"],  # required
        "value": str,  # required
        "trace_id": str,  # required
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      id: string;  // required
      evaluationType: "human_review";  // required
      humanReviewId?: string;
      source?: "orq" | "external";
      explanation?: string;
      reviewedAt?: Date;
      type: "string";  // required
      value: string;  // required
      traceId: string;  // required
    }
    ```
  </CodeGroup>
</Expandable>

### Remove Feedback

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  from orq_ai_sdk import Orq
  import os

  with Orq(
      api_key=os.getenv("ORQ_API_KEY", ""),
  ) as orq:

      res = orq.feedback.remove()

      # Handle response
      print(res)

  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import { Orq } from "@orq-ai/node";

  const orq = new Orq({
    apiKey: process.env["ORQ_API_KEY"] ?? "",
  });

  async function run() {
    const result = await orq.feedback.remove();

    console.log(result);
  }

  run();
  ```
</CodeGroup>

<Expandable title="Parameters">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "id": str,  # required
        "trace_id": str,  # required
        "product": Literal["remoteconfigs", "deployments", "experiments", "playgrounds", "spreadsheets", "spreadsheet_run", "llm_evaluator", "knowledge", "router", "workflows", "external_events", "agents", "memory-stores", "generic", "evaluators", "otel", "ai-chat", "mcp_gateway"],  # required
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      id: string;  // required
      traceId: string;  // required
      product: "remoteconfigs" | "deployments" | "experiments" | "playgrounds" | "spreadsheets" | "spreadsheet_run" | "llm_evaluator" | "knowledge" | "router" | "workflows" | "external_events" | "agents" | "memory-stores" | "generic" | "evaluators" | "otel" | "ai-chat" | "mcp_gateway";  // required
    }
    ```
  </CodeGroup>
</Expandable>

<Expandable title="Response">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "id": str,
        "trace_id": str,
        "product": Literal["remoteconfigs", "deployments", "experiments", "playgrounds", "spreadsheets", "spreadsheet_run", "llm_evaluator", "knowledge", "router", "workflows", "external_events", "agents", "memory-stores", "generic", "evaluators", "otel", "ai-chat", "mcp_gateway"],
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      id: string;
      traceId: string;
      product: "remoteconfigs" | "deployments" | "experiments" | "playgrounds" | "spreadsheets" | "spreadsheet_run" | "llm_evaluator" | "knowledge" | "router" | "workflows" | "external_events" | "agents" | "memory-stores" | "generic" | "evaluators" | "otel" | "ai-chat" | "mcp_gateway";
    }
    ```
  </CodeGroup>
</Expandable>

### Create Feedback

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  from orq_ai_sdk import Orq
  import os

  with Orq(
      api_key=os.getenv("ORQ_API_KEY", ""),
  ) as orq:

      res = orq.feedback.create()

      # Handle response
      print(res)

  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import { Orq } from "@orq-ai/node";

  const orq = new Orq({
    apiKey: process.env["ORQ_API_KEY"] ?? "",
  });

  async function run() {
    const result = await orq.feedback.create();

    console.log(result);
  }

  run();
  ```
</CodeGroup>

<Expandable title="Parameters">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "id": Optional[str],
        "field": str,  # required
        "value": Union[str, float, List[str]],  # required
        "trace_id": str,  # required
        "product": Optional[Literal["remoteconfigs", "deployments", "experiments", "playgrounds", "spreadsheets", "spreadsheet_run", "llm_evaluator", "knowledge", "router", "workflows", "external_events", "agents", "memory-stores", "generic", "evaluators", "otel", "ai-chat", "mcp_gateway"]],
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      id?: string;
      field: string;  // required
      value: string | number | string[];  // required
      traceId: string;  // required
      product?: "remoteconfigs" | "deployments" | "experiments" | "playgrounds" | "spreadsheets" | "spreadsheet_run" | "llm_evaluator" | "knowledge" | "router" | "workflows" | "external_events" | "agents" | "memory-stores" | "generic" | "evaluators" | "otel" | "ai-chat" | "mcp_gateway";
    }
    ```
  </CodeGroup>
</Expandable>

<Expandable title="Response">
  <CodeGroup>
    ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
        "id": Optional[str],
        "property": str,
        "value": Union[str, float, List[str]],
        "trace_id": str,
        "product": Optional[Literal["remoteconfigs", "deployments", "experiments", "playgrounds", "spreadsheets", "spreadsheet_run", "llm_evaluator", "knowledge", "router", "workflows", "external_events", "agents", "memory-stores", "generic", "evaluators", "otel", "ai-chat", "mcp_gateway"]],
    }
    ```

    ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    {
      id?: string;
      property: string;
      value: string | number | string[];
      traceId: string;
      product?: "remoteconfigs" | "deployments" | "experiments" | "playgrounds" | "spreadsheets" | "spreadsheet_run" | "llm_evaluator" | "knowledge" | "router" | "workflows" | "external_events" | "agents" | "memory-stores" | "generic" | "evaluators" | "otel" | "ai-chat" | "mcp_gateway";
    }
    ```
  </CodeGroup>
</Expandable>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.