# Run

By clicking Run,  Bayeslab AI automatically decide what to do with this AI block.  Whether it needs to generate or just re-run previous with latest data.

<figure><img src="https://2463519681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjXlg9zqMASkILutGQsH%2Fuploads%2FWyFzlFl7Dg0ZRRn9DWKF%2Fimage.png?alt=media&#x26;token=84836ac4-48cf-4921-9067-f84804280a58" alt=""><figcaption></figcaption></figure>

## Run Stages

There're several stages during Run

1. Analysis
   1. Prepare context for generation next step
2. Generation
   1. Use latest Generative-AI models to do the heavy work

<figure><img src="https://2463519681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjXlg9zqMASkILutGQsH%2Fuploads%2F4LYw656qsPvdLsbvKzEt%2Fimage.png?alt=media&#x26;token=0d46e1c8-e496-4a44-bcfa-24fb27a5c723" alt=""><figcaption></figcaption></figure>

3. Executing
   1. automatically run the generated code and get results

<figure><img src="https://2463519681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjXlg9zqMASkILutGQsH%2Fuploads%2FU5BhL2w032V6IAJm8kWI%2Fimage.png?alt=media&#x26;token=e59a31d1-4583-4ddc-be07-ce46651222bf" alt=""><figcaption></figcaption></figure>

4. Post-Analysis
   1. analyze the code/result and massage for better visualization/reuse later

## Error and auto-fix

When the code executes with error,&#x20;

<figure><img src="https://2463519681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjXlg9zqMASkILutGQsH%2Fuploads%2FflMxY17OckbyYxbu0beN%2Fimage.png?alt=media&#x26;token=dce10142-e71c-4a3a-b869-4378a63177a7" alt=""><figcaption></figcaption></figure>

## Schedule Run

<figure><img src="https://2463519681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjXlg9zqMASkILutGQsH%2Fuploads%2FbDEXfwREdk6Dz7Hh1bZm%2Fimage.png?alt=media&#x26;token=c1491092-3dc0-4dcc-95c2-56031b49379c" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2463519681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjXlg9zqMASkILutGQsH%2Fuploads%2Fk59xxOQvHGKzytGeSLDZ%2Fimage.png?alt=media&#x26;token=95b86659-af7c-40c3-82b9-c78f1aca435d" alt=""><figcaption></figcaption></figure>
