# Workflow Steps

## Step 1: Adding Data to Vaults

### **Option A: From the Data Hub**

1. **Browse Data Hub:**

* Navigate to the Data Hub within the Sahara platform.
* Explore available datasets by filtering by domain, size, or licensing terms. (Some explore features coming in Beta)

<figure><img src="/files/pTiLG5mJscml8FfRZYJ8" alt=""><figcaption></figcaption></figure>

2. **Purchase Dataset:**

* Select a dataset and click Purchase.
* Complete the payment process using the supported token or currency.

<figure><img src="/files/N0b38dciIp73Fb36VmW0" alt=""><figcaption></figcaption></figure>

3. **Add Dataset to Vault:**

* A Screen will pop up and you will select the Vault you want to import to and click Import.
* Navigate to your Vaults Tab and see the imported data set.

<figure><img src="/files/XEFe6x74vd3kFJZpQoGI" alt=""><figcaption></figcaption></figure>

### **Option B: Upload Personal Data**

1. **Navigate to Vaults:**

* Go to the Vaults Tab in the Sahara dashboard.

<figure><img src="/files/Z0aUukbvyD6MYZ9rddki" alt=""><figcaption></figcaption></figure>

2. **Create a New Vault:**

* Click Create Vault and provide a name and description.

3. **Upload Data:**

* Click Upload Files and select files from your local storage.
* Supported formats include CSV, JSON, and Parquet.

<figure><img src="/files/sZ3JdgYbPERjRxWydlnW" alt=""><figcaption></figcaption></figure>

4. **Configure Metadata:**

* Add metadata tags for better discoverability and provenance tracking.

## Step 2: Setting Up an Endpoint in the Compute Hub

1. **Access My Submissions:**

* Open the My Submissions on the Sahara dashboard after you purchase a model.

<figure><img src="/files/rmVc4Lw2ISIzUY3PcKbK" alt=""><figcaption></figcaption></figure>

2. **Initiate:**

* Click the New Endpoint button on the My Submissions home page.

3. **Configuration:**

* Fill out the form with the following details:
* Select Provider: Select Provider from list (Lepton, Predibase, Sagemaker, Bedrock, OpenAI)
* Select Model: Opens a popup and allows users to select from available models on platform. Search and press “Select” when you have chosen a model.
* Name: Assign a unique name to the instance.

<figure><img src="/files/NP7tIxsoL5mc4vFVw5Gj" alt=""><figcaption></figcaption></figure>

4. **Review and Create:**

* Review the configuration.
* Click Create Instance to launch the instance.

## Step 3: Creating and Deploying Pipelines

### **A. Create a Pipeline in Model Hub**

1. **Open Model Hub:**

* Navigate to the Model Hub Tab.

2. **Click Create Pipeline:**

* Choose between:
* RAG Pipeline: Requires Vault integration for retrieval tasks.
* Prompt-Based Pipeline: For conversational or structured AI tasks.

<figure><img src="/files/pZiI7vqFDmwVN0PGttxe" alt=""><figcaption></figcaption></figure>

3. **Configure Pipeline:**

* Upload an avatar for the pipeline.
* Provide the following:
* Pipeline Name.
* Description.
* Instructions (prompt).
* Conversation Starter (optional).
* Select an AI model.
* (RAG only) Choose Vaults for data retrieval.

### **B. Deploy the Pipeline**

1. **Publish Pipeline:**

* Click Publish and select a compute provider matching your pipeline’s requirements.

<figure><img src="/files/3SednCSgaLPxxkPjQEKb" alt=""><figcaption></figcaption></figure>

2. **Generate API Endpoint:**

* Upon deployment, an API endpoint is generated for integration.

## Step 4: Integration and Monitoring

### **A. Test the Endpoint**

1. **Test the API:**

* Use the generated endpoint to send sample requests.

Example payload:

<figure><img src="/files/zhMhXMIg5zWQOwwEVrSj" alt=""><figcaption></figcaption></figure>

* Review the AI response and refine configurations as needed.

### **B. Monitor Metrics**

1. **Open Dashboard Tab:**

* Navigate to the Metrics Tab in your pipeline’s details page.

2. **Review Usage**:

* Monitor token usage, API calls, and system performance metrics.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.saharaai.com/developer-docs-ai-developer-portal/workflow-steps.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
