> For the complete documentation index, see [llms.txt](https://help.imotions.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.imotions.com/lab/analysis/signal-processing-r-notebooks/my-library/scene-editor.md).

# Scene Editor

Create video, image and website scenes in the Scene editor to cut recordings or gaze map them, then edit, filter and export the scenes.

The Scene editor is a mini video editing tool, that allows you to create 'image scenes', 'video scenes' and 'website scenes' in preparation of the analysis. '**Video scenes**' are a way to isolate a part of a longer video recording ('cutting a scene'), while '**Image scenes**' and '**website scenes**' are an alternative method for gaze mapping onto, respectively, an image (image scenes) or full page screen capture (website scenes) (see also: [**Gaze mapping**](https://help.imotions.com/lab/analysis/eye-tracking/gaze-mapping/gaze-mapping.md)).

## About the Scene editor

The Scene editor is available at the Study level of the iMotions software, and can be accessed in two different ways; from the Recorded data page in the Respondent menu, or by selecting a stimulus in the Stimulus bar (i.e., images, videos, websites). The advantage of the latter, is that the Scene editor can already be accessed *before* the start of the data collection, while the former way of accessing the Scene editor only becomes available as soon as you have recorded (or post-imported) data *for at least one respondent*

If you wish to access the Scene editor for a given stimulus (because you have not yet collected data), this is done in the following way.

![Slide2.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-d93d30f667ab7825dd19bb3d1ce9dfc1605232e9%2F8de10895af_slide2-18-.webp?alt=media)

*How to access the Scene editor for individual stimuli*

Access the scene editor for a given stimulus (only available for images, videos and websites):

1. Click on a stimulus in the Stimulus bar
2. In the section 'Scenes', click 'Edit'

Alternatively, if you wish to access the scene editor from the 'Recorded data' page, this is done like this.

![Slide3.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-65c3dea5c0317540387d1e97966393e99e657594%2F11de12bdb4_slide3-19-.webp?alt=media)

*How to access the Scene editor from the Recorded data page*

Access the scene editor from the Recorded data page:

1. Click on the name of a respondent in the Respondent list (with collected data)
2. Click on the 'Movie' button for a given stimulus.

These Scene editor(s), however, are not identical. Moreover, the Scene editor(s) also look slightly different for images, videos, websites, screen recordings, scene recordings, and the capabilities of the Scene editor(s) differ depending on the stimulus type.

![Slide4.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-99f06c0e3a596d4597ab5a28cf603bc5f9257b8d%2F806672e7ba_slide4-17-.webp?alt=media)

*Nearly identical Scene editors for images. For images, you can only generate 'image scenes'.*

![Slide5.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-7523e335f5ba5a53f89d1e51e3e4e7b412b46325%2Fc3af638e59_slide5-16-.webp?alt=media)

*Different Scene editors for videos. **Before** data collection, it is only possible to generate 'image scenes'. **After** data collection, it is possible to generate 'image scenes' and 'video scenes'.*

![Slide6.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-811fba448aefe9e677fa739e6f951c862d981dde%2F591248b6dc_slide6-17-.webp?alt=media)

*Different Scene editors for websites. **Before** data collection, it is only possible to generate 'website scenes'. **After** data collection, it is possible to generate 'image scenes', 'video scenes' and 'website scenes'.*

![Slide7.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-d9b2ff8719b03c41c636f9504832a3d5a0acb86f%2F0c3a632ddf_slide7-16-.webp?alt=media)

*Only one Scene editor for Screen recordings. It is possible to generate 'image scenes' and 'video scenes'.*

![Slide8.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-4f69383b5bbbe5d728772a42ec4b35a3172382ef%2F6954534952_slide8-12-.webp?alt=media)

*Only one Scene editor for Scene recordings (e.g., eye tracking glasses recordings). It is only possible to generate 'image scenes'.*

Indeed, depending on **(1)** how the Scene editor(s) are accessed and **(2)** the type of stimulus, it will be possible to generate 'Image scenes', 'Video scenes' and/or 'Website scenes'.

#### Video scenes

'Video scenes' save a part of the recording *as a video*. This can be done for videos, websites, and screen recordings, but only from the Scene editor that is accessible *after* having collected data.

It is done in the same way for the different stimulus types.

![Slide9.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-f56db4fa5e28d3feef57a50c0b39215da0b3bee2%2Fe952857f43_slide9-11-.webp?alt=media)

![Slide10.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-b8a5ff98da06b368548417310ddcc420ea5b4f1b%2F91f278b0f9_slide10-8-.webp?alt=media)

*How to generate a video scene*

Generate a video scene:

1. Click 'Add scene'
2. Choose a Fragment allocation policy. For 'video scenes', you must either choose **option 2** ('Fixed sized segments allocated automatically') or **option 3** ('Fixed sized segments allocated manually')
3. It is now possible to tick 'Video' for generating a 'video scene'
4. Finally, use the sliding bar to navigate through the video
5. Define a time-window for the 'video scene' by dragging the borders of the grey bar below the video navigator.
6. Click 'Ok'
7. Rename the video scene

If you chose **option 2** for the Fragment allocation policy, the 'video scene' is now immediately defined for all respondents, and it is no longer possible to change the time interval of the 'video scene' ('Fixed sized segments allocated automatically'). If you chose option 3, the 'video scene' is at this point only defined for one respondent. Hence, you should now navigate to the other respondents and set the time intervals for all respondents individually (by drawing on the timeline). Note that, in this case, it is not possible to alter the duration of the 'video scene' across respondents ('Fixed sized segment'), but it is possible to move around the time interval ('allocated manually').

#### Image scenes

Image scenes save a part of the recording *as an image*, retaining only one frame of the recording. This can be done for images, videos, websites, screen recordings and scene recordings, in one of two possible ways (depending on the specific Scene editor).

For **images** and **videos** (*before* data collection), 'image scenes' are generated in the following way.

![Slide11.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-2fd34e5d06c19cd1a915a0839d2cda2f419882e5%2F581148c01d_slide11-6-.webp?alt=media)

*How to generate an image scene (images, videos before data collection)*

Generate an image scene (images, videos *before* data collection):

1. Use the play, seek forward and seek backward buttons to find the start time for the 'image scene'
2. Click '\[Begin'
3. Drag the border of the scene interval to set the end time
4. Click 'End]'
5. Right-click on the scene interval and click 'Edit scene name'
6. Type a name, and click 'Ok'
7. *For videos*, right-click on the scene interval and click 'Change snapshot'

Note that, once defined, the duration and start/end times of these 'image scenes' can no longer be changed, and that they immediately apply to all respondents; corresponding to the Fragment allocation policy 'Fixed sized segments allocated automatically'.

For **videos** (*after* data collection), **websites**, **screen recordings** and **scene recordings**, 'image scenes' are generated in a slightly different way.

![Slide13.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-41c5f630c9efbc2349fbb975277a9f4086fb2331%2Fba0c3c1f9c_slide13-4-.webp?alt=media) ![Slide14.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-c3f98fb37116d7b420b01026c581f62586285016%2F29e33cdbd9_slide14-3-.webp?alt=media)

*How to generate an image scene (videos after data collection, websites, screen recordings and scene recordings)*

Generate an image scene (videos *after* data collection, websites, screen recordings and scene recordings):

1. Click 'Add scene'
2. Choose a fragment allocation policy
3. Make sure the option 'Image' is ticked (and not 'Video')
4. Use the sliding bar to navigate through the video
5. Define a time-window by dragging the borders of the grey bar below the video navigator. Note that, if you chose the option **'Variable segments allocated manually'**, you should skip this step.
6. Click 'Ok'
7. Rename the image scene
8. Choose a snapshot for the image scene

If you chose the option **'Variable segments allocated manually'**, at this point, the 'image scene' is not yet fully defined. You should now navigate from respondent to respondent and set the time intervals for every respondent individually. In contrast, if you chose the option **'Fixed sized segments allocated automatically'** the 'image scene' is immediately fully defined for all respondents, and the duration and start/end times can no longer be changed. Finally, if you chose the option **'Fixed sized segments allocated manually'**, at this point, the 'image scene' is fully defined for one respondent, but not yet for all other respondents. You should now navigate from respondent to respondent and set the time intervals for every respondent individually. The duration of the time interval can no longer be changed ('Fixed sized segment'), but you can move around the time interval ('allocated manually').

#### Website scenes

Website scenes, finally, are only available for website recordings. Website scenes first generate a full page screen capture of the website page(s), and then save the part of the recording where respondents visited the website page(s) *as part of the full page screen capture.* 'Website scene' could thus be understood as an alternative method for gaze mapping in the case of website recordings (see also: [**Gaze mapping**](https://help.imotions.com/lab/analysis/eye-tracking/gaze-mapping/gaze-mapping.md)).

These 'website scenes' can already be generated *before* having collected data, or *after* collecting data. If you define the 'website scenes' in advance, the full page screen capture will already be generated and saved together with the URL of the website page(s) before collecting data. Later, the URL of the website page(s) will then be used to automatically segment the part of the recording where the respondent visited the respective website page(s). Defining the 'website scenes' in advance, is done in the following way.

![Slide15.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-6f1253f9dc56c8b36c8e99b341f05b6af6ea827c%2F5beccc3c53_slide15-3-.webp?alt=media)

![Slide16.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-d724b2a16cb18369e42f25f1b6454abc3d7cdb7f%2Fb89bf82b65_slide16-3-.webp?alt=media)

![Slide17.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-88d5e2cc039035d9d2000fc14e0a77a8e3ad3172%2Fbfe1b900e1_slide17-4-.webp?alt=media)

*How to generate a website scene (before data collection)*

Generate a website scene *before* data collection:

1. Click 'Start browser'
2. Return to the Scene editor and click 'New web scene'
3. Name the website scene
4. Review the full page screen capture and click 'Save'

Also if you define the 'website scenes' *after* having collected data, you can benefit from the URL of the website page(s) for generating the full page screen captures and time intervals.

![Slide18.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-9ac57858096a9839a02c8be540dc4a244897b2ef%2Fcf860dd35d_slide18-3-.webp?alt=media)

*How to generate a website scene*

Generate a website scene:

1. Display the 'Page ready' events, by clicking 'Event filter'
2. In the pop-up window, click 'Filter'
3. Select the 'Page ready' events
4. Move the cursor to a time immediately after a first 'Page ready' event
5. Click 'Browser' to launch the website page
6. Return to the scene editor, and click 'Add web scene'.
7. Name the website scene
8. Review the full page screen capture and click 'Save'
9. *(Repeat steps 4 to 8 for every website page)*

## What's next? (Replay, aggregate replay, heatmaps, etc.)

After generating 'video scenes', 'image scenes' and 'website scenes', these scenes are saved as separate slides in the Stimulus bar, which means that, from this point onward, the scenes are treated as regular images and videos.

![Slide19.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-4c631783f412e3ff6b9e7c12b1ba443930db6f41%2F52f015eb19_slide19-3-.webp?alt=media)

*Image, video, and website scenes are treated as separate 'stimuli' in the Stimulus bar*

In other words, it is now possible to replay the sensor data associated to these scenes in the Replay (see also: [**Replay**](https://help.imotions.com/lab/analysis/signal-processing-r-notebooks/my-library/respondent-replay.md)) and Aggregate replay editors (see also: [**Aggregate replay**](https://help.imotions.com/lab/analysis/signal-processing-r-notebooks/my-library/aggregate-replay.md)). It is also possible to generate Scan-paths (see also: [**Scan-paths**](https://help.imotions.com/lab/analysis/eye-tracking/scan-paths-and-individual-heatmaps.md)) and Heatmaps (see also: [**Heatmaps**](https://help.imotions.com/lab/analysis/eye-tracking/heatmaps.md)), or to obtain object-related eye tracking statistics using Static AOIs (see also: [**Static AOIs**](https://help.imotions.com/lab/analysis/eye-tracking/areas-of-interest/areas-of-interest-aois.md)) and Moving AOIs (see also: [**Moving AOIs**](https://help.imotions.com/lab/analysis/analysis-archive/eye-tracking-analysis-archive/analysis-moving-aois.md)).

![Slide30.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-7aa23acb283aca8e2dc202a9bf957c934e2356f3%2F3ed042d7da_slide30-2-.webp?alt=media)

![static\_aois\_and\_heatmap\_ediy.JPG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-14213fe05077296df5f2dd0b9005e6cdd51fcdf3%2Fe4d99c93c3_static_aois_and_heatmap_ediy.webp?alt=media)

*Replay scenes, generate heatmaps, draw static AOIs, etc.*

## Good to know (features)

A few more features are good to be aware of when operating the Scene editor.

#### Fragment allocation policy

As part of generating 'video scenes' and 'image scenes', you often need to choose a Fragment allocation policy. The options are **(1)** variable segments allocated manually, **(2)** fixed sized segments allocated automatically, and **(3)** fixed sized segments allocated manually.

![Slide20.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-7bb0be22c90198de095b64c55d02448ddde6ebcd%2Ff567573bda_slide20-3-.webp?alt=media)

*Fragment allocation policy*

The first option, **'variable segments allocated manually'**, allows you to cut 'image scenes' that have a different duration and different start/end times ('variable segments') across respondents. That also means that you need to manually define the time intervals for all respondents ('allocated manually'). This option is only available for website recordings and screen recordings, and only for defining 'image scenes'; not 'video scenes' or 'website scenes'.

In contrast, the second option, **'fixed sized segments allocated automatically'**, allows you to indicate that the scenes have the exact same duration and start/end times ('fixed sized segments') across respondents. In this case, you only need to define the time interval once, after which the same time interval immediately applies to all respondents ('allocated automatically'). This option is available for videos, websites, screen recordings and scene recordings, and both for defining 'image scenes' and 'video scenes'; not for 'website scenes'. This is also the default solution for 'image scenes' generated from images.

The third option, **'fixed sized segments allocated manually'**, allows you to cut 'image scenes' and 'video scenes' that have the same duration across respondents ('fixed sized segments'), but not the same start/end times. That means that you need to manually define the time intervals for all respondents ('allocated manually'), however, in the process of doing so, the exact duration of the time interval will remain constant. This option is only available for websites, screen recordings and scene recordings, and both for defining 'image scenes' and 'video scenes'; not for 'website scenes'.

#### Move intervals, change start/end times

Depending on the Fragment allocation policy, it may or may not be possible to change the scene intervals. If it is possible, this is done by grasping the scene interval and/or the borders of the time interval.

![Slide21.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-10712d2f2beaf2ca1fe758dc5178370a42dbe18b%2Ff382076fd3_slide21-3-.webp?alt=media)

*How to move scene intervals in time, or change start/end times*

#### Rename

For most stimulus types, renaming the 'image scenes', 'video scenes' and 'website scenes' can be done by clicking on the name of the scene, after which you can immediately start typing a different name.

![Slide22.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-c96575979013850a74645ea8ee90646069d512d2%2Fbe74daeafb_slide22-3-.webp?alt=media)

*How to rename scenes*

For images, renaming the 'image scenes' is done slightly differently; by double-clicking on the name of the scene, and then, changing the name of the image scene in the pop-up window.

![Slide23.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-76fa35636b39187bea6fb7cc518a8d51ec40a4bc%2F928bf02df3_slide23-3-.webp?alt=media)

*How to rename scenes (in the case of images)*

For 'website scenes', it is not possible to rename the website scene from within the Scene editor accessed *before* data collection. However, you may rename the website scene later, from within the Scene editor accessed *after* data collection.

#### Set snapshot

Especially if you use 'image scenes' as an alternative method for gaze mapping (see also: [**Gaze mapping**](https://help.imotions.com/lab/analysis/eye-tracking/gaze-mapping/gaze-mapping.md)), it is important to know how to select a snapshot; changing the snapshot can also be done for 'video scenes', but here, it merely changes how the video scene is displayed in the Stimulus bar. This is done in the following way.

![Slide25.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-9eb9a8d8aebef12687e42557e48346bc66624e31%2F02d6913bf3_slide25-3-.webp?alt=media)

*How to set a snapshot (in the case of image scenes)*

![Slide24.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-94ad0714f7adab7d4db24482272bd9b933756a4c%2F49ba6aa7a5_slide24-3-.webp?alt=media)

*How to set a snapshot (in the case of video scenes)*

#### Event filter

The Scene editors for videos (*after* data collection), websites (*after* data collection), screen recordings and scene recordings also have an 'Event filter'. This 'Event filter' allows you to visualize the relevant website (e.g., Page ready) and mouse events (e.g., clicks, scrolls).

![Slide26.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-b8c94c8713b015e7b8f0c074fe96c14b173f10ac%2Ffb04583716_slide26-2-.webp?alt=media)

*How to display website and mouse events*

It is also possible to navigate from event to event on the timeline using the 'Jump to next/previous event' buttons. Note, however, that these buttons always consider *all* events (regardless of the Event filter). Live markers are not part of the Events in the Scene editor.

#### Delete

For most stimuli, it is possible to delete the scenes from within the Scene editor. This is done by right-clicking the name of the scene and then clicking 'delete scene'.

![Slide28.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-a3674e99e0fd94695cd798e7e03df3c8cdff8419%2F549e42082e_slide28-2-.webp?alt=media)

*How to delete a scene from within the Scene editor*

For 'website scenes', deletion is not available in the Scene Editor *before* data collection, but is available in the Scene Editor *after* data collection.

## Export

#### Export scenes as part of sensor data export files (.csv)

![Slide32.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-05bd6a2b66d43640bc6041371680b9affe73c78d%2Fbc6fc13fc0_slide32-1-.webp?alt=media)

*Example of scenes in a sensor data export file (.csv)*

#### Export scenes as part of R-processed export files (.txt)

![Slide33.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-68064321b35e4240477831db5d90e9a61d224ef2%2Fd856a67d94_slide33-1-.webp?alt=media)

#### Example of scenes in an R-processed export file (.txt)

#### Export scenes as images or videos (.png, .wmv, .mp4)

![Slide34.PNG](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-4059f3abea8890391c2d84961cf6355ac40afbca%2F2c16d2cc3b_slide34-1-.webp?alt=media)

*Example of a scene exported as image*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.imotions.com/lab/analysis/signal-processing-r-notebooks/my-library/scene-editor.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
