[QCon Recap] Vector Search Revolution in the MySQL Ecosystem! Quickly Build RAG AI Chatbots Based on TiDB Vector

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 【QCon 回顾】 MySQL 生态的向量搜索革新!快速构建基于 TiDB Vector 的 RAG AI 聊天机器人

| username: YY-ha

First of all, many thanks to InfoQ for the invitation! Huo Hao, Head of Community Application Innovation at TiDB, met with everyone at the QCon Beijing conference. During the Mini Open Talk session in the AI+everything/Foundation Model exhibition area on the afternoon of April 12, Mr. Huo Hao discussed the development and application of the RAG AI chatbot based on TiDB Vector.

Download Materials:
TiDB Database for MySQL Users to Build AI Apps.pptx (36.9 MB)

Let’s Check Out the Demo!

Assistant Ask TiDB Entry: tidb.ai

The Architecture Behind “Ask TiDB”

What is Vector Search

Unlike traditional keyword-based search, vector search operates on the principle of understanding the meaning and context of data. It converts complex data—such as text, images, or audio—into numerical vector embeddings. These embeddings enable the database to perform searches based on semantic understanding rather than just exact word matches. This approach is crucial for AI applications dealing with large amounts of unstructured data, where accuracy and context are key.

Vector search is not just about smarter data interpretation; it also concerns performance and scalability. It optimizes query efficiency, allowing for faster and more accurate searches within large, complex datasets. By adding vector search to TiDB Serverless, we have enhanced its capability to handle AI and machine learning workloads, making it a powerful tool for developers in the MySQL+AI ecosystem.

TiDB Vector Architecture

TiDB Vector is a vector search feature based on TiDB Serverless, combining the powerful functions of traditional databases with advanced vector search capabilities. This feature allows developers to handle and query vector data directly within a familiar MySQL environment.

Architectural Features

  • Horizontal Scalability and Distributed Computing: TiDB Vector inherits the distributed architecture of TiDB Serverless, efficiently handling large-scale datasets.
  • Vector Data Types: By introducing new data types, TiDB Vector can directly store and index vector embeddings in the database.
  • Similarity Search Index: Algorithms like Hierarchical Navigable Small World (HNSW) optimize the storage and retrieval efficiency of vector data.
  • SQL Integration: Developers can use standard SQL statements to perform vector searches without needing additional programming languages or tools.

Exploring the RAG AI Chatbot Based on TiDB Vector

RAG is an AI model that combines retrieval and generation. It first retrieves relevant information from the vector database based on user input, then sends the retrieved information along with the question to a large model to generate coherent and accurate responses. After the release of TiDB Vector, we also developed a RAG (Retrieval-Augmented Generation) AI Conversational Search application based on TiDB Vector.

Demo link: https://tidb.ai
(Interested users can try it out. It is completely open-source, but since it is still under development, there may be some bugs.)

Additionally, we have concluded that: TiDB is the only database MySQL users need to build AI applications.

  • Simplest Architecture: All-in-one database, only requires MySQL skills
  • Avoids Redundant Operations: In traditional database solutions, developers often need to synchronize data between different databases, which not only requires writing additional synchronization scripts but also incurs network I/O overhead and duplicate storage space. TiDB avoids redundant operations through its built-in vector search functionality.
  • Single-turn CRUD is superior to multi-turn conversations
  • Free AI application database, up to 25 GiB storage

Currently Open for Waitlist Experience! Welcome to try it out!

TiDB Vector Experience Waitlist Application: Built-In Vector MySQL Database

| username: tidb菜鸟一只 | Original post link

Applied

| username: 这里介绍不了我 | Original post link

Applied

| username: lmdb | Original post link

Applied

| username: Kamner | Original post link

TiDB is cool.

| username: Kongdom | Original post link

Applied

| username: Mark | Original post link

Applied :+1:

| username: 魔人逗逗 | Original post link

Applied

| username: Aionn | Original post link

What tool did you use to draw the sketch? It looks great.

| username: Aionn | Original post link

| username: YY-ha | Original post link

Use this: Excalidraw