## Overview

<!-- markdownlint-disable MD032 -->
> [!IMPORTANT]
> Please be sure to read the following information before starting the lab.
> - This lab only supports Chrome browser.
> - This lab will grant you temporary access to Amazon Bedrock for invoking necessary models. Please adhere strictly to the usage guidelines outlined in the lab materials and refrain from utilizing this access in any other contexts. We reserve the right to hold users legally accountable for any misuse of Amazon Bedrock permissions that results in financial loss.

  ![70%](https://lab-static.pingcap.com/quick-demo/demo_421_en.png)

Generative AI is currently a cutting-edge field that has attracted many developers eager to explore it. However, several barriers often hinder their entry into this domain, such as:

- A lack of foundational AI knowledge, leaving them unsure where to begin.
- The absence of comprehensive, step-by-step, and interactive guides for building generative AI applications.
- Limited access to essential infrastructure needed for learning, such as databases and large model APIs.

To address these challenges, we developed a series of labs:

[Build Simple Vector Search Apps Using Jupyter Notebook](/labs/demo_408)

- What Embedding is and its capabilities.
- How to utilize embedded vectors after they have been obtained.

[Build RAG and Text2SQL AI Apps (Amazon Bedrock)](/labs/demo_421)

- How to employ RAG (Retrieval-Augmented Generation) for information retrieval when dealing with large volumes of data, and working with LLM (Large Language Model).
- How to make a useful Text2SQL AI application to explore the dataset.

[Use TiDB as a Unified Storage for AI Apps (Amazon Bedrock)](/labs/demo_422)

- How to leverage pytidb and **TiDB Cloud Starter** as a unified data storage layer for AI applications to streamline development.

> [!NOTE]
> In this lab, we'll use Streamlit as a rapid application development framework to streamline and accelerate data application building.
> Whether you choose your own TiDB Cloud Starter cluster or the sandbox TiDB Cloud Starter option to start the lab, a dedicated database will be created for this hands-on lab.

### Tasks

- **Build your first Text2SQL application**

  - Use TiDB Cloud Starter cluster as a SQL runner to correct LLM.
  - Start a Streamlit webpage to use your Text2SQL application.
  - Read the code of Text2SQL demo.

- **Build your first RAG application**

  - Save your embedding vector and the other data to TiDB Cloud Starter cluster.
  - Start a Streamlit webpage to test the performance of your RAG application.
  - Read the code of RAG demo.

> [!TIP]
> Click **Start** to launch the lab environment.
> Once the environment is ready, the resources assigned to your hands-on session will be populated with the actual values, so you can follow the lab guide step-by-step to complete the practice.
