## 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.

AI is currently a cutting-edge field, attracting many developers eager to learn about it. However, several obstacles often hinder their learning process, such as:

- A lack of foundational AI knowledge;
- Overly complex underlying infrastructures;
- The absence of comprehensive, step-by-step documentation for AI applications.

To address these issues, we have developed this lab, through which you will learn:

- How to use **TiDB Cloud Starter** as a data storage layer for AI applications to accelerate your AI development process.
- What Embedding is and its capabilities.
- How to utilize Embedding vectors after they have been obtained.
- How to use Hybrid Search for the extra recall channel.
- How to employ RAG / GraphRAG for data retrieval when dealing with large volumes of data.

### Tasks

- **RAG (Retrieval-Augmented Generation)**

  - Use Amazon Bedrock Embedding model for text embedding.
  - Store Embedding vectors and the original text in TiDB Cloud Starter.
  - Utilize `pytidb` and TiDB Cloud Starter to perform vector similarity searches and retrieve text data most relevant to user queries.
  - Use Amazon Bedrock LLM for generating result.

- **Image Search**

  - Use the Amazon Bedrock Titan Multimodal Embeddings G1 model for feature extraction on images to obtain Embeddings.
  - Store Embedding vectors and original image IDs in TiDB Cloud Starter via `pytidb`.
  - Utilize `pytidb` and TiDB Cloud Starter to perform vector similarity searches and retrieve images that are most similar in features to the given image.

- **Hybrid RAG**

  - Utilize `pytidb` to add an extra channel, which is BM25, for retrieve more relevent data.

- **GraphRAG Tutorial**

  - Conduct searches on graphs preconstructed in TiDB Cloud Starter.
  - Retrieve text data most relevant to user queries using the graph.

> [!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.
