---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://mixpeek.com/.well-known/search?q={query}"
  method: GET
  documentation: "https://mixpeek.com/llms.txt"
---

Video Understanding

8 min read

Updated 2026-11-07

# How Do I Find Failed Grasps and Handoffs Across Thousands of Robot Episodes?

Cut each episode's camera video into 2 to 5 second windows, search them in plain language, confirm every match by sending the clip to a vision model with a yes-or-no question, and merge what survives into timestamped moments per episode. Then export the segments, embeddings and lineage as Parquet and count failures by task, robot and camera in DuckDB.

![Ethan Steininger](/people/ethan.webp)

By [Ethan Steininger](/blog/authors/ethan), Founder & CEO, Mixpeek

Robotics

Physical AI

Egocentric Video

Video Search

Moment Search

DuckDB

Parquet

Training Data

[Search your episode archive where it already sits. Try it as you read.Index your episodes →](https://studio.mixpeek.com/namespaces/create?mode=managed&utm_source=homepage&utm_medium=guide&utm_campaign=guide_cta&utm_content=robot_episodes)

[One-click templateAI data curationFind the data your model is missing. Turn model failures into training and evaluation datasets with multimodal search and sampling.Deploy it](/templates/ai-data-curation)

## How do I find failed grasps and handoffs across thousands of robot episodes?

  
  
Index each episode's camera video in short windows, 2 to 5 seconds, with the episode's metadata (task, robot, camera, operator) on every window. Search the windows in plain language, such as "gripper closes but the cup slips out" or "person takes the screwdriver from the robot's hand". Then send each top match to a vision-language model as video with a yes-or-no question, keep the ones it confirms, and merge neighboring windows into one moment per episode with a start and end time. Export what you kept to your own bucket as Parquet and answer the counting questions ("which task fails most, on which robot") in SQL.  
  

## Why are manipulation episodes harder to search than dashcam footage?

  
  
The event is short and the episode is short. A failed grasp lasts about a second inside an episode of a few seconds to a few minutes. DROID, a public robot manipulation dataset, holds 76,000 trajectories and 350 hours of interaction ([DROID](https://droid-dataset.github.io/)), which works out to about 17 seconds per trajectory. A 30 second segment would hold the whole episode, and a search would return the episode with no idea where the slip happened.  
  
The words that matter describe motion and outcome: "slips", "misses", "drops", "hands over", "regrasps". A single frame shows a gripper near a cup whether the grasp worked or not. And there are often several cameras. DROID records with two external stereo cameras and one on the wrist, and a slip that is plain from the wrist camera can be invisible from across the table.  
  
Egocentric video brings the same problems at a larger scale. Ego4D has 3,670 hours of first-person video from 923 participants in 74 locations across 9 countries ([Ego4D](https://ego4d-data.org/)), and the moments people search for there are hand-object interactions of a second or two.  
  
For telemetry-first search over long continuous recordings, such as a fleet's dashcams or a robot running all day, see [How do I find specific moments across thousands of hours of robot or dashcam recordings?](https://mixpeek.com/guides/how-to-find-moments-in-thousands-of-hours-of-dashcam-or-robot-footage) This guide covers short, task-shaped episodes.  
  

## What does the pipeline look like?

  
  

Step

What it does

Why

1\. One video file per camera per episode

Each file carries episode ID, task, robot, camera and operator as metadata

Every later filter and SQL query groups on these fields

2\. Short fixed windows

Split by time every 2 to 5 seconds, with a written description of each window

Puts the event in its own window instead of averaging it into the episode

3\. Search by meaning, filtered by task

Text query against the window embeddings, limited to one task or robot

Ranks thousands of windows instead of the whole archive

4\. Confirm with a vision model

Send each top window as video with a yes-or-no question

Similarity search always returns a best match, even when nothing failed

5\. Merge into moments

Adjacent confirmed windows become one moment with start and end times

One row per event instead of one per window

6\. Export and count

Parquet with embeddings and lineage, queried in DuckDB

Failure rates by task, robot and camera, and a training set you can trace

  
  

## How do I set it up in Mixpeek?

  
  
Upload each camera file as an object in a bucket, with its metadata, then create a collection that splits video by time. The [multimodal extractor](https://mixpeek.com/docs/processing/extractors/multimodal) takes `time_split_interval` in seconds and writes `start_time` and `end_time` on every segment. `field_passthrough` copies your episode fields onto each segment:

{
  "collection\_name": "robot-episodes",
  "source": { "type": "bucket", "bucket\_ids": \["bkt\_episodes"\] },
  "feature\_extractor": {
    "feature\_extractor\_name": "multimodal\_extractor",
    "version": "v1",
    "input\_mappings": { "video": "video\_url" },
    "field\_passthrough": \[
      { "source\_path": "metadata.episode\_id" },
      { "source\_path": "metadata.task" },
      { "source\_path": "metadata.robot\_id" },
      { "source\_path": "metadata.camera" }
    \],
    "parameters": {
      "split\_method": "time",
      "time\_split\_interval": 3,
      "run\_multimodal\_embedding": true,
      "run\_video\_description": true,
      "enable\_thumbnails": true
    }
  }
}

For egocentric video with narration, also set `run_transcription` so a search can match what the wearer said as well as what the camera saw.  
  
Then build a [retriever](https://mixpeek.com/docs/retrieval/retrievers) with four stages: search the windows, keep one task, confirm each match with [LLM Filter](https://mixpeek.com/docs/retrieval/stages/llm-filter), and merge with [Moment Group](https://mixpeek.com/docs/retrieval/stages/moment-group):

{
  "retriever\_name": "failed-grasps",
  "collection\_identifiers": \["robot-episodes"\],
  "input\_schema": {
    "query": { "type": "text", "required": true },
    "task": { "type": "text", "required": true }
  },
  "stages": \[
    { "stage\_name": "search", "stage\_type": "filter",
      "config": { "stage\_id": "feature\_search", "parameters": {
        "final\_top\_k": 100,
        "searches": \[ { "feature\_uri": "mixpeek://multimodal\_extractor@v1/vertex\_multimodal\_embedding",
          "query": { "input\_mode": "text", "value": "{{INPUT.query}}" }, "top\_k": 100 } \] } } },
    { "stage\_name": "one\_task", "stage\_type": "filter",
      "config": { "stage\_id": "attribute\_filter", "parameters": {
        "field": "metadata.task", "operator": "eq", "value": "{{INPUT.task}}" } } },
    { "stage\_name": "confirm", "stage\_type": "filter",
      "config": { "stage\_id": "llm\_filter", "parameters": {
        "criteria": "Keep only clips where the gripper closes on the object and the object falls or slips out",
        "include\_media": true,
        "include\_reasoning": true } } },
    { "stage\_name": "moments", "stage\_type": "reduce",
      "config": { "stage\_id": "moment\_group", "parameters": {
        "parent\_field": "source\_object\_id",
        "time\_field": "start\_time",
        "merge\_tolerance\_ms": 1000,
        "max\_moments\_per\_parent": 3,
        "score\_strategy": "max",
        "output\_mode": "annotated" } } }
  \]
}

Three settings are easy to get wrong:  
  
*   **`include_media: true` on the filter.** Without it the model judges each window by its text
fields only. With it, a video segment goes to Gemini as video, which is what you need to tell a slip from a clean grasp.*   **`time_field: "start_time"` for a text query.** Moment Group's default reads intervals that
exist only when the query is a file. With a text query and the default, the moments come back empty.*   **Keep the filter's input small.** LLM Filter calls a model per document, and its docs advise
narrowing first when more than 100 documents reach it. Filter by task or robot, or lower `final_top_k`, before the confirm stage.  
  
For a handoff, change the query and the criteria: "a person's hand takes the object from the gripper" and "Keep only clips where the object passes from the robot to a person's hand". The same retriever then finds handoffs instead of drops.  
  

## How do I count failures by task and robot in DuckDB?

  
  
Export the collection as Parquet into a storage connection you own. The [export endpoint](https://mixpeek.com/docs/api-reference/collections/export-collection) writes Parquet by default. `include_vectors` adds a second Parquet file of embeddings, and `include_lineage` adds each segment's processing steps and the SHA-256 of its source file:

POST /v1/collections/robot-episodes/export
{
  "format": "parquet",
  "include\_vectors": true,
  "include\_lineage": true,
  "destination": { "connection\_id": "conn\_training\_bucket", "prefix": "exports/2026-11-07/" }
}

The destination must be an S3 or GCS connection with write access turned on (`PATCH /v1/organizations/connections/{connection_id}` with `{"write_enabled": true}`). The export writes a `manifest.json` under the prefix that lists every file with its size and checksum. Read the file names from it.  
  
Nested fields are flattened with dots, so `metadata.task` becomes a column named `"metadata.task"`. The vectors file has a `document_id` column and one `vector_N` column per embedding. Run `DESCRIBE` once to see the exact names:

INSTALL httpfs;
LOAD httpfs;
CREATE OR REPLACE SECRET s3 (TYPE s3, PROVIDER credential\_chain);

-- File names come from manifest.json under the export prefix.
CREATE VIEW segments AS
  SELECT \* FROM read\_parquet('s3://training-bucket/exports/2026-11-07/<documents file>.parquet');
CREATE VIEW vectors AS
  SELECT \* FROM read\_parquet('s3://training-bucket/exports/2026-11-07/<vectors file>.parquet');
DESCRIBE segments;

-- How much indexed video each task and robot has
SELECT "metadata.task" AS task, "metadata.robot\_id" AS robot,
       count(\*) AS windows, round(sum(end\_time - start\_time) / 3600, 1) AS hours
FROM segments
GROUP BY ALL
ORDER BY hours DESC;

The retriever's confirmed moments are not part of the collection export. Save each run's results (document ID, episode, start and end time, and the filter's reasoning) to a CSV or Parquet file and join it in:

CREATE VIEW failures AS SELECT \* FROM read\_csv('failed\_grasps\_2026-11-07.csv');

-- Failure rate per task and robot, counted by episode
SELECT s."metadata.task" AS task, s."metadata.robot\_id" AS robot,
       count(DISTINCT f.episode\_id) AS failed\_episodes,
       count(DISTINCT s."metadata.episode\_id") AS episodes,
       round(100.0 \* count(DISTINCT f.episode\_id) / count(DISTINCT s."metadata.episode\_id"), 1) AS pct
FROM segments s
LEFT JOIN failures f ON f.document\_id = s.document\_id
GROUP BY ALL
ORDER BY pct DESC;

The embeddings also answer "find more like this one" in SQL. DuckDB's `array_cosine_similarity` needs fixed-size arrays, so cast the vector column to its dimension. The multimodal embedding is 1,408 floats; check which `vector_N` holds it with `len(vector_0)`:

WITH v AS (SELECT document\_id, vector\_0::FLOAT\[1408\] AS e FROM vectors),
     q AS (SELECT e FROM v WHERE document\_id = 'doc\_a\_confirmed\_slip')
SELECT s."metadata.episode\_id", s.start\_time, s.end\_time,
       array\_cosine\_similarity(v.e, q.e) AS similarity
FROM v JOIN segments s USING (document\_id), q
ORDER BY similarity DESC
LIMIT 50;

The lineage columns make the kept set traceable. `source_content_hash` ties each row to the exact bytes of its source video, so a training run can pin this export and check later that nothing under it changed.  
  

## What does it cost?

  
  
At the rates in Mixpeek's public features API on 2026-11-22: video search is $0.045 a minute ($2.70 an hour) and multimodal understanding $0.3186 a minute. Rates apply per camera stream, so a dataset's hours multiply by its camera count.  
  

Archive

Camera hours

At $2.70 an hour

DROID, 350 hours, three cameras

1,050

$2,835

DROID, wrist camera only

350

$945

Ego4D, 3,670 hours, one camera

3,670

$9,909

  
  
Indexing only the camera that sees the gripper is the biggest saving. The LLM Filter stage is a separate model call per window that reaches it, which is another reason to filter by task first. The short-window pipeline above uses the multimodal extractor, so run the preflight estimate on a sample of episodes before you index the archive.  
  

## What does Mixpeek not do here?

  
  
Mixpeek reads video, images, audio and documents. It does not parse MCAP, ROS bag or LeRobot files, so convert each camera topic to a video file and carry the episode fields as object metadata. It has no synchronized multi-sensor timeline viewer and no pixel, mask or 3D labeling. Teams that need those use a labeling tool on the episodes this pipeline selects. Our [comparison with FiftyOne](https://mixpeek.com/comparisons/mixpeek-vs-voxel51) covers where each tool fits.  
  

## Frequently Asked Questions

  
  

### How do I find failed grasps in robot demonstration videos?

  
  
Split each episode's video into 2 to 5 second windows, embed them, and search with a sentence that describes the failure, such as "gripper closes and the object slips out". Then ask a vision-language model a yes-or-no question about each top match, sending the clip itself, and keep only the ones it confirms. Filter by task first so the model checks a few hundred windows instead of the whole archive.  
  

### What segment length works for robot manipulation video?

  
  
Two to five seconds. Grasps, slips and handoffs take about a second, and episodes are often under a minute: DROID averages about 17 seconds per trajectory. Thirty second segments, the usual default for long video, would put most episodes in a single segment and lose the timestamp of the event.  
  

### Can I search egocentric video for hand-object interactions?

  
  
Yes, with the same windows and a query about the hands, such as "cuts the onion" or "picks up the phone". If the wearer narrates, add transcription so the search can match speech as well as the image.  
  

### How do I query video features with SQL?

  
  
Export the collection as Parquet with embeddings and lineage, then read the files with DuckDB, Spark, BigQuery or Snowflake. DuckDB reads Parquet straight from S3 through its httpfs extension, and `array_cosine_similarity` ranks segments by embedding similarity inside a query.  
  

### Does Mixpeek read MCAP or LeRobot datasets?

  
  
No. Export each camera topic to a video file, keep the episode's timestamps, and attach the episode ID, task and robot as metadata on the object. The search then filters and groups on those fields.  
  

## Related reading

  
  
*   [How do I find specific moments across thousands of hours of robot or dashcam recordings?](https://mixpeek.com/guides/how-to-find-moments-in-thousands-of-hours-of-dashcam-or-robot-footage)
*   [How to find one specific moment in hours of footage](https://mixpeek.com/guides/how-to-find-one-specific-moment-in-hours-of-footage)
*   [Why does my video search keep returning the wrong scene?](https://mixpeek.com/guides/why-does-my-video-search-return-the-wrong-scene)
*   [Mixpeek vs. FiftyOne (Voxel51)](https://mixpeek.com/comparisons/mixpeek-vs-voxel51)

## Search your episode archive where it already sits

Mixpeek reads robot and egocentric video from S3, GCS or any bucket, indexes short timestamped windows with your episode metadata, and exports the results to your own bucket as Parquet.

[Index your episodes](https://studio.mixpeek.com/namespaces/create?mode=managed&utm_source=homepage&utm_medium=guide&utm_campaign=guide_cta&utm_content=robot_episodes)[See pricing](/pricing)

[Explore MVS](/mvs)[See pricing](/pricing)

## Related guides

[

Video Understanding

### How Do I Find the Robot Episodes Worth Labeling?

Search robot and egocentric episodes where they sit in S3 or GCS before labeling any of them: index short windows with the episode fields, search for failed grasps, handoffs and off-task stretches, confirm each match with a vision model, and drop near-duplicate demonstrations by comparing episode embeddings in DuckDB. The output is a list of episodes and time ranges for your labeling tool.

Read guide →](/guides/how-to-find-robot-episodes-worth-labeling)[

Video Understanding

### How Do I Find Specific Moments Across Thousands of Hours of Robot or Dashcam Recordings?

Narrow by telemetry first, skip idle footage, then search what is left by meaning. Cut continuous recordings into fixed 10 to 30 second segments, embed each segment, store its timestamps next to the vehicle or robot's sensor data, and filter before you rank. For 10,000 hours, that is 1.2 million vectors and about 15 GB of index, next to 36 TB of footage.

Read guide →](/guides/how-to-find-moments-in-thousands-of-hours-of-dashcam-or-robot-footage)[

Video Understanding

### How Do I Search a Backlog of Creator UGC Video?

Find clips in a brand's backlog of creator uploads and social videos by what they show, say and put on screen: upload each file with the creator, product and usage rights as metadata, index it in short windows with transcript and on-screen text, and run one retriever that searches the picture and the words, keeps only clips you are licensed to use, and returns the seconds to cut.

Read guide →](/guides/how-to-search-a-backlog-of-creator-ugc-video)