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

# Custom Embeddings

> Learn how to import custom embeddings using the Encord SDK.

Encord enables the use of custom embeddings for images, image sequences, image groups, and individual video frames. Custom embeddings allow you to incorporate your own feature representations into Encord's platform, enhancing capabilities like similarity search, visualizations, and data filtering. This flexibility supports more advanced workflows and deeper insights tailored to your specific use cases.

<Info>Support for videos (in their entirety) is coming soon.</Info>

## Custom Embeddings Support

We currently support embeddings of dimensions ranging from 1 to 4096 for Index, and 1 to 2000 for Active, following on from our in-house clip Embeddings.

## Import Custom Embeddings

To bring your custom embeddings into Encord, you first need to create a key in your metadata schema. After the key is in your schema, you can import your custom embeddings.

### Step 1: Create a New Embedding Type

A key is required in your custom metadata schema for your embeddings. You can use any string as the key for your embeddings. We strongly recommend that you use a string that is meaningful.

If you do not include a key in your metadata schema, your imported embeddings are treated as strings.

<Tip>Embedding key names can contain alphanumeric (a-z, A-Z, 0-1) characters, hyphens, and underscores.</Tip>

Use `add_embedding` to add an embedding to your metadata schema.

<Info>
  We currently support embeddings of:

  * 1 to 4,096 dimensions for data curation.
  * 1 to 2,000 dimensions for label validation.
</Info>

<CodeGroup>
  ```python Import schema template theme={"dark"}

  # Import dependencies
  from encord import EncordUserClient
  from encord.metadata_schema import MetadataSchema

  SSH_PATH = "<file-path-to-ssh-private-key>"

  # Authenticate with Encord using the path to your private key
  user_client: EncordUserClient = EncordUserClient.create_with_ssh_private_key(
      ssh_private_key_path=SSH_PATH
  )

  # Create the schema
  metadata_schema = user_client.metadata_schema()


  # Add embedding fields
  metadata_schema.add_embedding('my-test-active-embedding', size=512)
  metadata_schema.add_embedding('my-test-index-embedding', size=<values-from-1-to-4096>)

  # Save the schema
  metadata_schema.save()

  # Print the schema for verification
  print(metadata_schema)

  ```

  ```python Example theme={"dark"}

  # Import dependencies
  from encord import EncordUserClient
  from encord.metadata_schema import MetadataSchema

  SSH_PATH = "/Users/chris-encord/ssh-private-key.txt"

  # Authenticate with Encord using the path to your private key
  user_client: EncordUserClient = EncordUserClient.create_with_ssh_private_key(
      ssh_private_key_path=SSH_PATH
  )

  # Create the schema
  metadata_schema = user_client.metadata_schema()


  # Add embedding fields
  metadata_schema.add_embedding('active-embedding-01', size=512)
  metadata_schema.add_embedding('active-embedding-02', size=512)
  metadata_schema.add_embedding('index-embedding-100', size=100)
  metadata_schema.add_embedding('index-embedding-1000', size=1000)

  # Save the schema
  metadata_schema.save()

  # Print the schema for verification
  print(metadata_schema)

  ```
</CodeGroup>

### Step 2: Upload Embeddings

With the key in the custom metadata schema ready, we can now import our embeddings.

Custom embedding sizes are flexible and can be set anywhere between 1 and 4096.

You can import embeddings after you have added your data or during your data registration.

<Note>Your key frames (frames specified with or without embeddings) always appear in Encord, regardless of what sampling rate you specify.</Note>

<Tip>Embedding key names can contain alphanumeric (a-z, A-Z, 0-1) characters, hyphens, and underscores.</Tip>

If `config` is not specified, the `sampling_rate` is 1 frame per second, and the `keyframe_mode` is `frame`.

<Info>Specifying a `sampling_rate` of `0` only imports the first frame and all keyframes of your video.</Info>

<AccordionGroup>
  <Accordion title="Import while registering videos">
    #### Import while importing videos

    This JSON file imports embeddings while registering your data with Encord from a cloud integration.

    `config` is optional when importing your custom embeddings:

    ```json theme={"dark"}
    "config": {
        "sampling_rate": "<samples-per-second>",
        "keyframe_mode": "frame" or "seconds",
    },
    ```

    If `config` is not specified, the `sampling_rate` is 1 frame per second, and the `keyframe_mode` is `frame`.

    <Info>Specifying a `sampling_rate` of `0` only imports the first frame and all keyframes of your video.</Info>

    <CodeGroup>
      ```json Import Embeddings Template theme={"dark"}

      {
          "videos": [
              {
                  "objectUrl": "<cloud-file-path-to-your-video-1>",
                  "title": "<title-for-your-video-1>",
                  "clientMetadata": {
                      "$encord": {
                          "config": {
                              "sampling_rate": "<samples-per-second>",
                              "keyframe_mode": "frame" or "seconds",
                          },
                          "frames": {
                              "<frame-number-or-seconds>": {
                                  "<my-embedding>": [1.0, 2.0, 3.0]
                              },
                              "<frame-number-or-seconds>": {
                                  "<my-embedding>": [1.0, 2.0, 3.0]
                              }
                          }
                      }
                  }
              },
              {
                  "objectUrl": "<cloud-file-path-to-your-video-2>",
                  "title": "<title-for-your-vide-2>",
                  "clientMetadata": {
                      "$encord": {
                          "config": {
                              "sampling_rate": "<frames-per-second>",
                              "keyframe_mode": "frame" or "seconds",
                          },
                          "frames": {
                              "<frame-number-or-seconds>": {
                                  "<my-embedding>": [1.0, 2.0, 3.0]
                              },
                              "<frame-number-or-seconds>": {
                                  "<my-embedding>": [1.0, 2.0, 3.0]
                              }
                          }
                      }
                  }
              },
              {
                  "objectUrl": "<cloud-path-to-your-video-3>",
                  "title": "<title-for-your-video-3>",
                  "clientMetadata": {
                      "$encord": {
                          "config": {
                              "sampling_rate": "<frames-per-second>",
                              "keyframe_mode": "frame" or "seconds",
                          },
                          "frames": {
                              "<frame-number-or-seconds>": {
                                  "<my-embedding>": [1.0, 2.0, 3.0]
                              },
                              "<frame-number-or-seconds>": {
                                  "<my-embedding>": [1.0, 2.0, 3.0]
                              }
                          }
                      }
                  }
              }
          ],
          "skip_duplicate_urls": true
      }

      ```

      ```json Example - Simple theme={"dark"}
      {
          "videos": [
              {
                  "objectUrl": "https://storage.cloud.google.com/my-cloud-bucket/awesome-video-001.mp4",
                  "clientMetadata": {
                      "$encord": {
                          "frames": {
                              "111": {
                                  "embeddings-10": [0.44931257187793305, 0.11303790771089994, 0.9001464760810051, 0.2798273275803421, 0.06879531104035541, 0.8275038481160373, 0.9419277893526817, 0.7294979532997635, 0.18146276890284674, 0.07504156777630822]
                              },
                              "113": {
                                  "embeddings-10": [0.9361826107513869, 0.44445671908774165, 0.3083308253882048, 0.017454463823556754, 0.7765154602640884, 0.39951939694747884, 0.14421315329564477, 0.8533255560056869, 0.3945949167412638, 0.34428458069417656]
                              }
                          }
                      }
                  }
              },
              {
                  "objectUrl": "https://storage.cloud.google.com/my-cloud-bucket/awesome-video-002.mp4",
                  "clientMetadata": {
                      "$encord": {
                          "frames": {
                              "157": {
                                  "embeddings-10": [0.44931257187793305, 0.11303790771089994, 0.9001464760810051, 0.2798273275803421, 0.06879531104035541, 0.8275038481160373, 0.9419277893526817, 0.7294979532997635, 0.18146276890284674, 0.07504156777630822]
                              },
                              "257": {
                                  "embeddings-10": [0.9361826107513869, 0.44445671908774165, 0.3083308253882048, 0.017454463823556754, 0.7765154602640884, 0.39951939694747884, 0.14421315329564477, 0.8533255560056869, 0.3945949167412638, 0.34428458069417656]
                              }
                          }
                      }
                  }
              },
              {
                  "objectUrl": "https://storage.cloud.google.com/my-cloud-bucket/awesome-video-003.mp4",
                  "clientMetadata": {
                      "$encord": {
                          "frames": {
                              "11": {
                                  "embeddings-10": [0.44931257187793305, 0.11303790771089994, 0.9001464760810051, 0.2798273275803421, 0.06879531104035541, 0.8275038481160373, 0.9419277893526817, 0.7294979532997635, 0.18146276890284674, 0.07504156777630822]
                              },
                              "13": {
                                  "embeddings-10": [0.9361826107513869, 0.44445671908774165, 0.3083308253882048, 0.017454463823556754, 0.7765154602640884, 0.39951939694747884, 0.14421315329564477, 0.8533255560056869, 0.3945949167412638, 0.34428458069417656]
                              }
                          }
                      }
                  }
              }
          ],
          "skip_duplicate_urls": true
      }

      ```

      ```json Example - Advanced theme={"dark"}
      {
          "videos": [
              {
                  "objectUrl": "https://storage.cloud.google.com/my-cloud-bucket/awesome-video-001.mp4",
                  "title": "awesome-video-001.mp4",
                  "clientMetadata": {
                      "$encord": {
                          "config": {
                              "sampling_rate": "0",
                              "keyframe_mode": "frame"
                          },
                          "frames": {
                              "111": {
                                  "embeddings-10": [0.44931257187793305, 0.11303790771089994, 0.9001464760810051, 0.2798273275803421, 0.06879531104035541, 0.8275038481160373, 0.9419277893526817, 0.7294979532997635, 0.18146276890284674, 0.07504156777630822]
                              },
                              "113": {
                                  "embeddings-10": [0.9361826107513869, 0.44445671908774165, 0.3083308253882048, 0.017454463823556754, 0.7765154602640884, 0.39951939694747884, 0.14421315329564477, 0.8533255560056869, 0.3945949167412638, 0.34428458069417656]
                              }
                          }
                      }
                  }
              },
              {
                  "objectUrl": "https://storage.cloud.google.com/my-cloud-bucket/awesome-video-002.mp4",
                  "title": "awesome-video-002.mp4",
                  "clientMetadata": {
                      "$encord": {
                          "config": {
                              "sampling_rate": "3",
                              "keyframe_mode": "frame"
                          },
                          "frames": {
                              "157": {
                                  "embeddings-10": [0.44931257187793305, 0.11303790771089994, 0.9001464760810051, 0.2798273275803421, 0.06879531104035541, 0.8275038481160373, 0.9419277893526817, 0.7294979532997635, 0.18146276890284674, 0.07504156777630822]
                              },
                              "257": {
                                  "embeddings-10": [0.9361826107513869, 0.44445671908774165, 0.3083308253882048, 0.017454463823556754, 0.7765154602640884, 0.39951939694747884, 0.14421315329564477, 0.8533255560056869, 0.3945949167412638, 0.34428458069417656]
                              }
                          }
                      }
                  }
              },
              {
                  "objectUrl": "https://storage.cloud.google.com/my-cloud-bucket/awesome-video-003.mp4",
                  "title": "awesome-video-003.mp4",
                  "clientMetadata": {
                      "$encord": {
                          "config": {
                              "sampling_rate": "4",
                              "keyframe_mode": "frame"
                          },
                          "frames": {
                              "11": {
                                  "embeddings-10": [0.44931257187793305, 0.11303790771089994, 0.9001464760810051, 0.2798273275803421, 0.06879531104035541, 0.8275038481160373, 0.9419277893526817, 0.7294979532997635, 0.18146276890284674, 0.07504156777630822]
                              },
                              "13": {
                                  "embeddings-10": [0.9361826107513869, 0.44445671908774165, 0.3083308253882048, 0.017454463823556754, 0.7765154602640884, 0.39951939694747884, 0.14421315329564477, 0.8533255560056869, 0.3945949167412638, 0.34428458069417656]
                              }
                          }
                      }
                  }
              }
          ],
          "skip_duplicate_urls": true
      }

      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>

<AccordionGroup>
  <Accordion title="Update specific videos">
    #### Update specific videos

    <CodeGroup>
      ```python Boilerplate theme={"dark"}
      # Import dependencies
      from encord import EncordUserClient
      from encord.http.bundle import Bundle
      from encord.orm.storage import StorageFolder, StorageItem, StorageItemType, FoldersSortBy

      # Authentication
      SSH_PATH = "<file-path-to-ssh-private-key>"

      # Authenticate with Encord using the path to your private key
      user_client: EncordUserClient = EncordUserClient.create_with_ssh_private_key(
          ssh_private_key_path=SSH_PATH,
      )

      updates = {
          "<data-hash-1>": {
              "$encord": {
                  "frames": {
                      "<frame-number-1>": {
                          "<my-embedding>": [1.0, 2.0, 3.0],  # custom embedding ("embedding") with float values
                      },
                      "<frame-number-2>": {
                          "<my-embedding>": [1.0, 2.0, 3.0],  # custom embedding ("embedding") with float values
                      }
                  }
              }
          },
          "<data-hash-2>": {
              "$encord": {
                  "config": {
                      "sampling_rate": <samples-per-second>,  # VIDEO ONLY (optional default = 1 sample/second)
                      "keyframe_mode": "frame" or "seconds",  # VIDEO ONLY (optional default = "frame")
                  },
                  "frames": {
                      "<frame-number-1>": {
                          "<my-embedding>": [1.0, 2.0, 3.0],  # custom embedding ("embedding") with float values
                      },
                      "<frame-number-2>": {
                          "<my-embedding>": [1.0, 2.0, 3.0],  # custom embedding ("embedding") with float values
                      }
                  }
              }
          },
      }

      # Use the Bundle context manager
      with Bundle() as bundle:
          # Update the storage items based on the dictionary
          for item_uuid, metadata_update in updates.items():
              item = user_client.get_storage_item(item_uuid=item_uuid)

              # Make a copy of the current metadata and update it with the new metadata
              curr_metadata = item.client_metadata.copy()
              curr_metadata.update(metadata_update)

              # Update the item with the new metadata and bundle
              item.update(client_metadata=curr_metadata, bundle=bundle)
      ```

      ```python Example - Simple theme={"dark"}
      # Import dependencies
      from encord import EncordUserClient
      from encord.http.bundle import Bundle
      from encord.orm.storage import StorageFolder, StorageItem, StorageItemType, FoldersSortBy

      # Authentication
      SSH_PATH = "/Users/chris-encord/sdk-ssh-private-key.txt"

      # Authenticate with Encord using the path to your private key
      user_client: EncordUserClient = EncordUserClient.create_with_ssh_private_key(
          ssh_private_key_path=SSH_PATH,
      )

      updates = {
          "f2155fa4-6040-408a-84d5-72bacb4f45db": {
              "$encord": {
                  "frames": {
                      "113": {
                          "embedding-10": [0.9361826107513869, 0.44445671908774165, 0.3083308253882048, 0.017454463823556754, 0.7765154602640884, 0.39951939694747884, 0.14421315329564477, 0.8533255560056869, 0.3945949167412638, 0.34428458069417656],  # custom embedding ("embedding") with float values
                      },
                      "131": {
                          "embedding-10": [0.44931257187793305, 0.11303790771089994, 0.9001464760810051, 0.2798273275803421, 0.06879531104035541, 0.8275038481160373, 0.9419277893526817, 0.7294979532997635, 0.18146276890284674, 0.07504156777630822],  # custom embedding ("embedding") with float values
                      }
                  }
              }
          },
          "f235ad84-f9eb-4dc1-934d-d05e1cd70e59": {
              "$encord": {
                  "frames": {
                      "171": {
                          "embedding-10": [0.9361826107513869, 0.44445671908774165, 0.3083308253882048, 0.017454463823556754, 0.7765154602640884, 0.39951939694747884, 0.14421315329564477, 0.8533255560056869, 0.3945949167412638, 0.34428458069417656],  # custom embedding ("embedding") with float values
                      },
                      "231": {
                          "embedding-10": [0.44931257187793305, 0.11303790771089994, 0.9001464760810051, 0.2798273275803421, 0.06879531104035541, 0.8275038481160373, 0.9419277893526817, 0.7294979532997635, 0.18146276890284674, 0.07504156777630822],  # custom embedding ("embedding") with float values
                      }
                  }
              }
          },
      }

      # Use the Bundle context manager
      with Bundle() as bundle:
          # Update the storage items based on the dictionary
          for item_uuid, metadata_update in updates.items():
              item = user_client.get_storage_item(item_uuid=item_uuid)

              # Make a copy of the current metadata and update it with the new metadata
              curr_metadata = item.client_metadata.copy()
              curr_metadata.update(metadata_update)

              # Update the item with the new metadata and bundle
              item.update(client_metadata=curr_metadata, bundle=bundle)

      ```

      ```python Example - Advanced theme={"dark"}
      # Import dependencies
      from encord import EncordUserClient
      from encord.http.bundle import Bundle
      from encord.orm.storage import StorageFolder, StorageItem, StorageItemType, FoldersSortBy

      # Authentication
      SSH_PATH = "/Users/chris-encord/sdk-ssh-private-key.txt"

      # Authenticate with Encord using the path to your private key
      user_client: EncordUserClient = EncordUserClient.create_with_ssh_private_key(
          ssh_private_key_path=SSH_PATH,
      )

      updates = {
          "6b8d797a-4655-43c3-b251-cbd6cc995bc6": {
              "$encord": {
                  "config": {
                      "sampling_rate": 0,  # VIDEO ONLY (optional default = 1 sample/second)
                  },
                  "frames": {
                      "111": {
                          "embedding-10": [0.9361826107513869, 0.44445671908774165, 0.3083308253882048, 0.017454463823556754, 0.7765154602640884, 0.39951939694747884, 0.14421315329564477, 0.8533255560056869, 0.3945949167412638, 0.34428458069417656],  # custom embedding ("embedding") with float values
                      },
                      "222": {
                          "embedding-10": [0.44931257187793305, 0.11303790771089994, 0.9001464760810051, 0.2798273275803421, 0.06879531104035541, 0.8275038481160373, 0.9419277893526817, 0.7294979532997635, 0.18146276890284674, 0.07504156777630822],  # custom embedding ("embedding") with float values
                      }
                  }
              }
          },
          "d9185f6e-3dbc-443b-bd37-77b2f34f157e": {
              "$encord": {
                  "config": {
                      "sampling_rate": 2,  # VIDEO ONLY (optional default = 1 sample/second)
                      "keyframe_mode": "frame",  # VIDEO ONLY (optional default = "frame")
                  },
                  "frames": {
                      "333": {
                          "embedding-10": [0.9361826107513869, 0.44445671908774165, 0.3083308253882048, 0.017454463823556754, 0.7765154602640884, 0.39951939694747884, 0.14421315329564477, 0.8533255560056869, 0.3945949167412638, 0.34428458069417656],  # custom embedding ("embedding") with float values
                      },
                      "444": {
                          "embedding-10": [0.44931257187793305, 0.11303790771089994, 0.9001464760810051, 0.2798273275803421, 0.06879531104035541, 0.8275038481160373, 0.9419277893526817, 0.7294979532997635, 0.18146276890284674, 0.07504156777630822],  # custom embedding ("embedding") with float values
                      }
                  }
              }
          },
      }

      # Use the Bundle context manager
      with Bundle() as bundle:
          # Update the storage items based on the dictionary
          for item_uuid, metadata_update in updates.items():
              item = user_client.get_storage_item(item_uuid=item_uuid)

              # Make a copy of the current metadata and update it with the new metadata
              curr_metadata = item.client_metadata.copy()
              curr_metadata.update(metadata_update)

              # Update the item with the new metadata and bundle
              item.update(client_metadata=curr_metadata, bundle=bundle)
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>

<AccordionGroup>
  <Accordion title="Import while registering data units">
    #### Import while importing data units

    This JSON file imports embeddings while registering your data with Encord from a cloud integration.

    <CodeGroup>
      ```json Template theme={"dark"}
      {
        "images": [
          {
            "objectUrl": "file/path/to/data-unit/file-name-01.file-extension",
            "title": "data-unit-title.file-extension",
            "clientMetadata": {"metadata-1": "value", "metadata-2": "value"}
          },
        ],
        "skip_duplicate_urls": true
      }
      ```

      ```json Example - Simple theme={"dark"}
      {
        "images": [
          {
            "objectUrl": "https://encord-integration.s3.eu-west-2.amazonaws.com/images/blueberry-01.jpg",
            "title": "Blueberry 01",
            "clientMetadata": {
              "embeddings-10": [0.44931257187793305, 0.11303790771089994, 0.9001464760810051, 0.2798273275803421, 0.06879531104035541, 0.8275038481160373, 0.9419277893526817, 0.7294979532997635, 0.18146276890284674, 0.07504156777630822]
                }
          },
          {
            "objectUrl": "https://encord-integration.s3.eu-west-2.amazonaws.com/images/blueberry-02.jpg",
            "title": "Blueberry 02",
            "clientMetadata": {
              "embeddings-10": [0.44531257187793305, 0.22303790771089994, 0.1101464760810051, 0.3898273275803421, 0.06879531104035541, 0.8275038481160373, 0.9419277893526817, 0.7294979532997635, 0.18146276890284674, 0.07504156777630822]
            }
          },
          {
            "objectUrl": "https://encord-integration.s3.eu-west-2.amazonaws.com/images/blueberry-01.jpg",
            "title": "Blueberry 03",
            "clientMetadata": {
              "embeddings-10": [0.45631257187793305, 0.23403790771089994, 0.1211464760810051, 0.3678273275803421, 0.06849531104035541, 0.8275038481160373, 0.9419277893526817, 0.7294979532997635, 0.18146276890284674, 0.07504156777630822]
                }
          },
        ],
        "skip_duplicate_urls": true
      }
      ```

      ```json Example - Advanced theme={"dark"}
      {
        "images": [
          {
            "objectUrl": "https://encord-integration.s3.eu-west-2.amazonaws.com/images/cherry-01.jpg",
            "title": "Cherry 01",
            "clientMetadata": {
              "Dark": false,
              "Location": "NY",
              "Date": "2024-06-13",
              "ACME Co ID": "8ada6567-c034-4bd4-91d0-04dab5d729d5",
              "Priority": "1",
              "embeddings-10": [
                0.67831257187793305,
                0.32603790771089994,
                0.4341464760810051,
                0.9748273275803421,
                0.23549531104035541,
                0.8275038481160373,
                0.9419277893526817,
                0.7294979532997635,
                0.18146276890284674,
                0.07504156777630822
              ]
            }
          },
          {
            "objectUrl": "https://encord-integration.s3.eu-west-2.amazonaws.com/images/cherry-02.jpg",
            "title": "Cherry 02",
            "clientMetadata": {
              "Dark": false,
              "Location": "NY",
              "Date": "2024-06-13",
              "ACME Co ID": "1262bf57-402e-427c-8c60-276df65513ea",
              "Priority": "1",
              "embeddings-10": [
                0.42531257187793305,
                0.33403790771089994,
                0.5671464760810051,
                0.3688273275803421,
                0.06849531104035541,
                0.8275038481160373,
                0.9419277893526817,
                0.7294979532997635,
                0.18146276890284674,
                0.07504156777630822
              ]
            }
          },
          {
            "objectUrl": "https://encord-integration.s3.eu-west-2.amazonaws.com/images/cherry-03.jpg",
            "title": "Cherry 03",
            "clientMetadata": {
              "Dark": true,
              "Location": "OH",
              "Date": "2024-06-13",
              "ACME Co ID": "3000919f-01e2-4574-a4fd-a2790c4f7b8b",
              "Priority": "2",
              "embeddings-10": [
                0.22231257187793305,
                0.44503790771089994,
                0.7341464760810051,
                0.8368273275803421,
                0.06849531104035541,
                0.8275038481160373,
                0.9419277893526817,
                0.7294979532997635,
                0.18146276890284674,
                0.07504156777630822
              ]
            }
          }
        ],
        "skip_duplicate_urls": true
      }
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>

<AccordionGroup>
  <Accordion title="Update specific data units">
    #### Import specific data units

    The custom embeddings format for images, text files, PDFs, and audio files follows the same format as [importing custom metadata](/platform-documentation/Curate/custom-metadata/index-custom-metadata#folders-and-custom-metadata).

    ```python theme={"dark"}
    # Import dependencies
    from encord import EncordUserClient
    from encord.http.bundle import Bundle

    # Authentication
    SSH_PATH = "<file-path-to-ssh-private-key>"

    # Authenticate with Encord using the path to your private key
    user_client: EncordUserClient = EncordUserClient.create_with_ssh_private_key(
        ssh_private_key_path=SSH_PATH,
    )

    # Define a dictionary with item UUIDs and their respective metadata updates
    updates = {
        "<data-ID-1>": {"<my-embedding>": [1.0, 2.0, 3.0]},
        "<data-ID-2>": {"<my-embedding>": [1.0, 2.0, 3.0]}
    }

    # Use the Bundle context manager
    with Bundle() as bundle:
        # Update the storage items based on the dictionary
        for item_uuid, metadata_update in updates.items():
            item = user_client.get_storage_item(item_uuid=item_uuid)

            # Make a copy of the current metadata and update it with the new metadata
            curr_metadata = item.client_metadata.copy()
            curr_metadata.update(metadata_update)

            # Update the item with the new metadata and bundle
            item.update(client_metadata=curr_metadata, bundle=bundle)

    ```
  </Accordion>
</AccordionGroup>

## Final Setup for Custom Embeddings

Once you import custom embeddings to your data (during cloud data registration or to existing data in Encord), there is a bit more setup required in Index and Active. These steps can only be performed from the UI.

<div key="1" lang="en">
  <head>
    <meta charSet="UTF-8" />

    <meta content="width=device-width, initial-scale=1.0" name="viewport" />

    <title>Clickable Div</title>
  </head>

  <div className="container">
    <a className="clickable-div" href="/platform-documentation/Curate/custom-embeddings#3-select-your-custom-embeddings">
      Custom Embeddings for Curation
    </a>

    <a className="clickable-div" href="/platform-documentation/Validation/validation-custom-embeddings#3-select-your-custom-embeddings">
      Custom Embeddings for Label Validation
    </a>
  </div>
</div>

## Use Custom Embeddings

Custom embeddings in Index and Active allow you to:

* Perform similarity searches on your data with custom embeddings
* Adjust the similarity distance on similarity searches
* View your data in a 2D embedding plot graph
* Filter your data based on whether it has custom embeddings or not (Index only)
