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

# Prompt library

> Ready-to-use AI agent prompts for every stage of an Edge Impulse project.

A collection of example prompts you can use directly with the `edge-impulse` skill or any AI agent with Edge Impulse API context. Prompts are grouped by example tasks. Copy them as-is or adapt them to your project.

<Tip>
  Not sure where to start? Ask your agent: *"What can I do with the Edge Impulse API?"*
</Tip>

## Data management

<AccordionGroup>
  <Accordion title="Upload and ingest">
    <Prompt description="Upload every CSV file in ./data/idle as training samples with label &#x22;idle&#x22;, then do the same for ./data/wave and ./data/punch">
      Upload every CSV file in ./data/idle as training samples with label "idle", then do the same for ./data/wave and ./data/punch
    </Prompt>

    <Prompt description="Upload every .wav file in ./recordings as testing samples with label &#x22;noise&#x22;">
      Upload every .wav file in ./recordings as testing samples with label "noise"
    </Prompt>

    <Prompt description="Upload the image at ./capture.jpg as a training sample with label &#x22;person&#x22; to my Edge Impulse project">
      Upload the image at ./capture.jpg as a training sample with label "person" to my Edge Impulse project
    </Prompt>

    <Prompt description="Read all CSV files in ./inbox, convert each to Edge Impulse JSON format with 3-axis IMU data at 62.5 Hz, and upload them as training samples with label &#x22;running&#x22;">
      Read all CSV files in ./inbox, convert each to Edge Impulse JSON format with 3-axis IMU data at 62.5 Hz, and upload them as training samples with label "running"
    </Prompt>

    <Prompt description="Generate 30 synthetic accelerometer samples for each of the labels &#x22;idle&#x22;, &#x22;walking&#x22;, and &#x22;running&#x22; and upload them as training data. Use 3-axis (accX, accY, accZ) at 62.5 Hz for 2 seconds per sample, with randomised values intended to approximate sensor noise.">
      Generate 30 synthetic accelerometer samples for each of the labels "idle", "walking", and "running" and upload them as training data. Use 3-axis (accX, accY, accZ) at 62.5 Hz for 2 seconds per sample, with randomised values intended to approximate sensor noise.
    </Prompt>
  </Accordion>

  <Accordion title="Inspect and audit">
    <Prompt description="List all training samples in my Edge Impulse project grouped by label, with counts">
      List all training samples in my Edge Impulse project grouped by label, with counts
    </Prompt>

    <Prompt description="Show me all samples in my project where the label is &#x22;unknown&#x22; or empty">
      Show me all samples in my project where the label is "unknown" or empty
    </Prompt>

    <Prompt description="List all testing samples and show the filename and label for each">
      List all testing samples and show the filename and label for each
    </Prompt>

    <Prompt description="Show me which labels have fewer than 20 training samples">
      Show me which labels have fewer than 20 training samples
    </Prompt>

    <Prompt description="Find any training samples whose filename contains &#x22;test&#x22; — these may have been uploaded to the wrong category">
      Find any training samples whose filename contains "test" — these may have been uploaded to the wrong category
    </Prompt>

    <Prompt description="Show me the 10 most recently uploaded samples and their labels">
      Show me the 10 most recently uploaded samples and their labels
    </Prompt>
  </Accordion>

  <Accordion title="Clean and relabel">
    <Prompt description="Relabel all training samples whose filename starts with &#x22;idle_&#x22; to &#x22;idle&#x22;">
      Relabel all training samples whose filename starts with "idle\_" to "idle"
    </Prompt>

    <Prompt description="Delete all training samples with label &#x22;unknown&#x22;">
      Delete all training samples with label "unknown"
    </Prompt>

    <Prompt description="Delete all samples shorter than 1 second from the training set">
      Delete all samples shorter than 1 second from the training set
    </Prompt>

    <Prompt description="Move all training samples with label &#x22;background&#x22; to the testing set">
      Move all training samples with label "background" to the testing set
    </Prompt>

    <Prompt description="Find training samples whose label is &#x22;walking&#x22; but whose filename contains &#x22;run&#x22;, and ask me before relabelling each one">
      Find training samples whose label is "walking" but whose filename contains "run", and ask me before relabelling each one
    </Prompt>

    <Prompt description="Deduplicate the training set — list any samples with identical filenames and ask me which to keep">
      Deduplicate the training set — list any samples with identical filenames and ask me which to keep
    </Prompt>
  </Accordion>

  <Accordion title="Split and balance">
    <Prompt description="Move 20% of training samples for each label to the testing set, picking them at random, making sure each label is represented proportionally">
      Move 20% of training samples for each label to the testing set, picking them at random, making sure each label is represented proportionally
    </Prompt>

    <Prompt description="Check the training/testing split for each label and tell me if any label has fewer than 15% of its samples in the testing set">
      Check the training/testing split for each label and tell me if any label has fewer than 15% of its samples in the testing set
    </Prompt>

    <Prompt description="Show me the class balance across my training set and flag any label with fewer than half the samples of the largest class">
      Show me the class balance across my training set and flag any label with fewer than half the samples of the largest class
    </Prompt>
  </Accordion>
</AccordionGroup>

## Training jobs

<AccordionGroup>
  <Accordion title="Start and monitor">
    <Prompt description="Start a training job in my Edge Impulse project and wait for it to finish, then print the accuracy and loss">
      Start a training job in my Edge Impulse project and wait for it to finish, then print the accuracy and loss
    </Prompt>

    <Prompt description="Start a training job and give me the job URL so I can monitor it while it runs">
      Start a training job and give me the job URL so I can monitor it while it runs
    </Prompt>

    <Prompt description="Start training, poll until it finishes, and if it fails show me the last 30 lines of the job log">
      Start training, poll until it finishes, and if it fails show me the last 30 lines of the job log
    </Prompt>

    <Prompt description="Check whether there is a training job currently running in my project and show its status">
      Check whether there is a training job currently running in my project and show its status
    </Prompt>

    <Prompt description="Show me all jobs in my project from the last 24 hours, with their status and duration">
      Show me all jobs in my project from the last 24 hours, with their status and duration
    </Prompt>
  </Accordion>

  <Accordion title="Diagnose failures">
    <Prompt description="The last training job failed — fetch the job log and show me the error lines">
      The last training job failed — fetch the job log and show me the error lines
    </Prompt>

    <Prompt description="List all failed jobs in my project in the last 7 days and show the error message from each log">
      List all failed jobs in my project in the last 7 days and show the error message from each log
    </Prompt>
  </Accordion>
</AccordionGroup>

## Model evaluation

<AccordionGroup>
  <Accordion title="Evaluate and compare">
    <Prompt description="Run model testing on my Edge Impulse project and show the confusion matrix and per-class F1 scores">
      Run model testing on my Edge Impulse project and show the confusion matrix and per-class F1 scores
    </Prompt>

    <Prompt description="Show me all samples that were misclassified in the last model test, with their predicted and actual labels">
      Show me all samples that were misclassified in the last model test, with their predicted and actual labels
    </Prompt>

    <Prompt description="Which class has the lowest F1 score in my current test results? Show me the misclassified samples for that class.">
      Which class has the lowest F1 score in my current test results? Show me the misclassified samples for that class.
    </Prompt>

    <Prompt description="Compare the test accuracy of the last three training runs and tell me which performed best">
      Compare the test accuracy of the last three training runs and tell me which performed best
    </Prompt>

    <Prompt description="Show me the on-device performance estimates from the latest trained model — RAM, flash, and inference time">
      Show me the on-device performance estimates from the latest trained model — RAM, flash, and inference time
    </Prompt>
  </Accordion>
</AccordionGroup>

## EON Tuner

<AccordionGroup>
  <Accordion title="Run and review">
    <Prompt description="Start an EON Tuner run on my Edge Impulse project targeting the Arduino Nano 33 BLE Sense and wait for it to finish">
      Start an EON Tuner run on my Edge Impulse project targeting the Arduino Nano 33 BLE Sense and wait for it to finish
    </Prompt>

    <Prompt description="Start an EON Tuner run optimising for the smallest model that still achieves at least 90% accuracy">
      Start an EON Tuner run optimising for the smallest model that still achieves at least 90% accuracy
    </Prompt>

    <Prompt description="List all EON Tuner runs for my project and show the top 5 results ranked by accuracy">
      List all EON Tuner runs for my project and show the top 5 results ranked by accuracy
    </Prompt>

    <Prompt description="List all EON Tuner results ranked by inference time, and show only the ones with accuracy above 85%">
      List all EON Tuner results ranked by inference time, and show only the ones with accuracy above 85%
    </Prompt>

    <Prompt description="Take the best EON Tuner result and set it as the active impulse configuration">
      Take the best EON Tuner result and set it as the active impulse configuration
    </Prompt>
  </Accordion>
</AccordionGroup>

## Deployment and export

<AccordionGroup>
  <Accordion title="Export artifacts">
    <Prompt description="Export a C++ library from my Edge Impulse project and save it to ./build">
      Export a C++ library from my Edge Impulse project and save it to ./build
    </Prompt>

    <Prompt description="Export an Arduino library and save it to ./build/arduino-library.zip">
      Export an Arduino library and save it to ./build/arduino-library.zip
    </Prompt>

    <Prompt description="Export a TFLite int8 model and save it as ./build/model.tflite">
      Export a TFLite int8 model and save it as ./build/model.tflite
    </Prompt>

    <Prompt description="Export an ONNX model and save it to ./build/model.onnx">
      Export an ONNX model and save it to ./build/model.onnx
    </Prompt>

    <Prompt description="Export a Linux AARCH64 deployment (.eim) for the Raspberry Pi and save it to ./build">
      Export a Linux AARCH64 deployment (.eim) for the Raspberry Pi and save it to ./build
    </Prompt>

    <Prompt description="Export a deployment for Arduino UNO Q (GPU) and save the .eim file to ./build">
      Export a deployment for Arduino UNO Q (GPU) and save the .eim file to ./build
    </Prompt>

    <Prompt description="Export a WebAssembly deployment and save it to ./build/wasm">
      Export a WebAssembly deployment and save it to ./build/wasm
    </Prompt>
  </Accordion>

  <Accordion title="Automate re-export">
    <Prompt description="Retrain my Edge Impulse project and re-export the C++ library to ./build when training finishes">
      Retrain my Edge Impulse project and re-export the C++ library to ./build when training finishes
    </Prompt>

    <Prompt description="Check if the model has been retrained since the library in ./build was exported. If so, download the latest version.">
      Check if the model has been retrained since the library in ./build was exported. If so, download the latest version.
    </Prompt>
  </Accordion>
</AccordionGroup>

## Application code

These prompts can run even more efficiently with a [companion skill](/tutorials/topics/ai-agents/create-a-companion-skill) for your target.

<AccordionGroup>
  <Accordion title="Arduino">
    <Prompt description="Write an Arduino sketch for the Nano 33 BLE Sense that reads the onboard IMU at 62.5 Hz and runs inference every 2 seconds, printing the top label and confidence to Serial">
      Write an Arduino sketch for the Nano 33 BLE Sense that reads the onboard IMU at 62.5 Hz and runs inference every 2 seconds, printing the top label and confidence to Serial
    </Prompt>

    <Prompt description="Write an Arduino sketch that reads from a PDM microphone, fills the feature buffer, runs inference, and blinks the built-in LED when the label &#x22;yes&#x22; is detected with confidence above 0.8">
      Write an Arduino sketch that reads from a PDM microphone, fills the feature buffer, runs inference, and blinks the built-in LED when the label "yes" is detected with confidence above 0.8
    </Prompt>

    <Prompt description="Add error handling to my existing sketch so it prints a message to Serial if `run_classifier()` returns anything other than `EI_IMPULSE_OK`">
      Add error handling to my existing sketch so it prints a message to Serial if `run_classifier()` returns anything other than `EI_IMPULSE_OK`
    </Prompt>
  </Accordion>

  <Accordion title="Linux C++">
    <Prompt description="Write a C++ main.cpp that reads sensor data from a CSV file, runs inference using the Edge Impulse C++ library, and prints each label with its score">
      Write a C++ main.cpp that reads sensor data from a CSV file, runs inference using the Edge Impulse C++ library, and prints each label with its score
    </Prompt>

    <Prompt description="Write a C++ application that captures frames from a USB webcam using OpenCV, runs the image classifier, and overlays the top label and confidence on the video feed">
      Write a C++ application that captures frames from a USB webcam using OpenCV, runs the image classifier, and overlays the top label and confidence on the video feed
    </Prompt>

    <Prompt description="Generate a CMakeLists.txt that links my main.cpp against the Edge Impulse C++ library extracted at ./ei-sdk">
      Generate a CMakeLists.txt that links my main.cpp against the Edge Impulse C++ library extracted at ./ei-sdk
    </Prompt>
  </Accordion>

  <Accordion title="Python">
    <Prompt description="Write a Python script that loads the .eim model at ./build/model.eim and runs inference on every image in ./test-images, printing the top label for each">
      Write a Python script that loads the .eim model at ./build/model.eim and runs inference on every image in ./test-images, printing the top label for each
    </Prompt>

    <Prompt description="Write a Python script using the Edge Impulse Linux Python SDK that captures audio from the default microphone and runs keyword spotting inference in a loop, printing results to the console">
      Write a Python script using the Edge Impulse Linux Python SDK that captures audio from the default microphone and runs keyword spotting inference in a loop, printing results to the console
    </Prompt>
  </Accordion>

  <Accordion title="Web app">
    <Prompt description="Export my Edge Impulse C++ library, then write a small Node.js Express server that loads the .eim model, accepts a POST request with raw sensor data as JSON, runs inference, and returns the label and confidence scores as JSON">
      Export my Edge Impulse C++ library, then write a small Node.js Express server that loads the .eim model, accepts a POST request with raw sensor data as JSON, runs inference, and returns the label and confidence scores as JSON
    </Prompt>

    <Prompt description="Build a simple HTML + JavaScript dashboard that calls my inference server every second, displays the latest predicted label, and shows a bar chart of confidence scores for each class using Chart.js">
      Build a simple HTML + JavaScript dashboard that calls my inference server every second, displays the latest predicted label, and shows a bar chart of confidence scores for each class using Chart.js
    </Prompt>

    <Prompt description="Write a Python Flask app that accepts image uploads, runs them through the Edge Impulse image classifier .eim, and returns the results as a JSON response with label and confidence">
      Write a Python Flask app that accepts image uploads, runs them through the Edge Impulse image classifier .eim, and returns the results as a JSON response with label and confidence
    </Prompt>

    <Prompt description="Write a Python Flask app that ingests my computer's web camera feed, runs the feed through the Edge Impulse object detection  .eim, and outputs the results over the camera feed as bounding boxes or circles for FOMO models">
      Write a Python Flask app that ingests my computer's web camera feed, runs the feed through the Edge Impulse object detection  .eim, and outputs the results over the camera feed as bounding boxes or circles for FOMO models
    </Prompt>
  </Accordion>
</AccordionGroup>

## Automation and scripting

<AccordionGroup>
  <Accordion title="Batch operations">
    <Prompt description="Write a Python script that watches the ./inbox folder for new CSV files, uploads each one to my Edge Impulse project as a training sample using the filename as the label, then moves it to ./processed">
      Write a Python script that watches the ./inbox folder for new CSV files, uploads each one to my Edge Impulse project as a training sample using the filename as the label, then moves it to ./processed
    </Prompt>

    <Prompt description="Write a shell script that uploads all .wav files in ./recordings to my Edge Impulse project, then starts a training job and waits for it to finish">
      Write a shell script that uploads all .wav files in ./recordings to my Edge Impulse project, then starts a training job and waits for it to finish
    </Prompt>

    <Prompt description="Write a script that checks my Edge Impulse project every hour, and if a new training run has completed, exports the C++ library to ./build and sends a notification to a Slack webhook">
      Write a script that checks my Edge Impulse project every hour, and if a new training run has completed, exports the C++ library to ./build and sends a notification to a Slack webhook
    </Prompt>
  </Accordion>

  <Accordion title="CI/CD">
    <Prompt description="Write a GitHub Actions workflow that triggers on push to main, uploads any new CSV files in ./data to Edge Impulse, retrains the model, and exports the C++ library as a build artifact">
      Write a GitHub Actions workflow that triggers on push to main, uploads any new CSV files in ./data to Edge Impulse, retrains the model, and exports the C++ library as a build artifact
    </Prompt>

    <Prompt description="Write a GitHub Actions workflow that runs model testing after training and fails the build if accuracy drops below 90%">
      Write a GitHub Actions workflow that runs model testing after training and fails the build if accuracy drops below 90%
    </Prompt>
  </Accordion>

  <Accordion title="Multi-project">
    <Prompt description="List all projects in my Edge Impulse account with their IDs and sample counts">
      List all projects in my Edge Impulse account with their IDs and sample counts
    </Prompt>

    <Prompt description="Copy all training samples with label &#x22;idle&#x22; from project 1234 to project 5678">
      Copy all training samples with label "idle" from project 1234 to project 5678
    </Prompt>

    <Prompt description="Compare the test accuracy of the current model in project 1234 versus project 5678 and show which is better">
      Compare the test accuracy of the current model in project 1234 versus project 5678 and show which is better
    </Prompt>

    <Prompt description="Export the best-performing model from project 1234 and import it into project 5678 as a version snapshot">
      Export the best-performing model from project 1234 and import it into project 5678 as a version snapshot
    </Prompt>
  </Accordion>
</AccordionGroup>

## Project snapshots and versions

<AccordionGroup>
  <Accordion title="Snapshots">
    <Prompt description="Create a version snapshot of my Edge Impulse project with the description &#x22;before retraining with new data&#x22;">
      Create a version snapshot of my Edge Impulse project with the description "before retraining with new data"
    </Prompt>

    <Prompt description="List all version snapshots for my project and show their descriptions and creation dates">
      List all version snapshots for my project and show their descriptions and creation dates
    </Prompt>

    <Prompt description="Show me the model accuracy for each saved version in my project">
      Show me the model accuracy for each saved version in my project
    </Prompt>
  </Accordion>
</AccordionGroup>

## Monitoring and reporting

<AccordionGroup>
  <Accordion title="Reports">
    <Prompt description="Show a summary of my Edge Impulse project: sample counts per label, last training date, current accuracy, and deployment status">
      Show a summary of my Edge Impulse project: sample counts per label, last training date, current accuracy, and deployment status
    </Prompt>

    <Prompt description="Generate a markdown report of my project's training history — one row per job with date, accuracy, and loss">
      Generate a markdown report of my project's training history — one row per job with date, accuracy, and loss
    </Prompt>

    <Prompt description="Check whether my project has any samples that haven't been used in training (i.e., uploaded after the last training run)">
      Check whether my project has any samples that haven't been used in training (i.e., uploaded after the last training run)
    </Prompt>

    <Prompt description="Tell me how many samples were added to my project in the last 7 days, broken down by label">
      Tell me how many samples were added to my project in the last 7 days, broken down by label
    </Prompt>

    <Prompt description="Create a report of all of the metadata in my project">
      Create a report of all of the metadata in my project
    </Prompt>
  </Accordion>
</AccordionGroup>
