{"id":18782,"date":"2024-08-18T20:54:43","date_gmt":"2024-08-19T03:54:43","guid":{"rendered":"https:\/\/www.pingcap.com\/?p=18782"},"modified":"2025-11-14T06:38:12","modified_gmt":"2025-11-14T14:38:12","slug":"dify-tidb-build-scalable-ai-agent-with-knowledge-base","status":"publish","type":"post","link":"https:\/\/www.pingcap.com\/ko\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/","title":{"rendered":"Dify.AI x TiDB: Build Scalable AI Agent with Knowledge Base"},"content":{"rendered":"<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Introduction\"><\/span>Introduction<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Building <a href=\"https:\/\/www.pingcap.com\/ko\/ai\/\">AI Agents<\/a> can be an intricate affair, but it doesn\u2019t have to be with the right tools. The combination of TiDB\u2019s new <a href=\"\/ko\/ai\/\">Serverless Vector Search<\/a>, now welcoming users in its Public Beta phase, alongside Dify\u2019s intuitive low-code platform, simplifies the creation of scalable, efficient AI solutions. This guide offers a clear pathway to seamlessly integrating <a href=\"\/ko\/tidb\/\">\ud2f0DB<\/a> and Dify, enabling you to harness robust vector search capabilities to power your AI agents.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why This Matters<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Accelerated Development:<\/strong> Bypass the complexities of traditional coding and fast-track the creation of AI agents with tools designed for speed and simplicity.<\/li>\n\n\n\n<li><strong>Optimized Retrieval:<\/strong> Leverage <a href=\"\/ko\/tidb-cloud-starter\/\">TiDB Serverless<\/a> Vector Search for quick, precise information retrieval that significantly boosts your AI\u2019s responsiveness and relevancy.<\/li>\n\n\n\n<li><strong>Tailored Scalability:<\/strong> Adjust effortlessly to fluctuating data volumes and computational demands thanks to TiDB\u2019s flexible architecture.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">What You\u2019ll Discover<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Effortless Setup:<\/strong> Learn how to establish a TiDB Serverless cluster swiftly.<\/li>\n\n\n\n<li><strong>Seamless Deployment:<\/strong> Explore the steps to deploy Dify using Docker Compose for a smooth start.<\/li>\n\n\n\n<li><strong>Knowledge Base Mastery:<\/strong> Master the art of constructing and managing an effective knowledge base.<\/li>\n\n\n\n<li><strong>AI Agent Innovation:<\/strong> Unleash the potential of AI agents using Dify\u2019s streamlined toolset.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Create a TiDB Serverless Cluster<\/h3>\n\n\n\n<p>First, let&#8217;s create a TiDB Serverless cluster by following the steps below:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to <a href=\"https:\/\/tidbcloud.com\/signup\/\">TiDB Cloud<\/a> console.<\/li>\n\n\n\n<li>Enter <a href=\"https:\/\/tidbcloud.com\/console\/clusters\/create-cluster\">Create Cluster<\/a> page and configure your new cluster:\n<ul class=\"wp-block-list\">\n<li>Choose <code>Serverless<\/code> type of cluster<\/li>\n\n\n\n<li>Select the region closest to where your application is deployed, for example: <code>Tokyo (ap-northest-1)<\/code><\/li>\n\n\n\n<li>Fill in your cluster name<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Click <strong>Create<\/strong> button to complete cluster creation.<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"2048\" height=\"1280\" src=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13021501\/Create-Cluster.jpg\" alt=\"Create Cluster\" class=\"wp-image-18783\" style=\"width:758px;height:auto\" srcset=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13021501\/Create-Cluster.jpg 2048w, https:\/\/static.pingcap.com\/files\/2024\/08\/13021501\/Create-Cluster-300x188.jpg 300w, https:\/\/static.pingcap.com\/files\/2024\/08\/13021501\/Create-Cluster-1024x640.jpg 1024w, https:\/\/static.pingcap.com\/files\/2024\/08\/13021501\/Create-Cluster-768x480.jpg 768w, https:\/\/static.pingcap.com\/files\/2024\/08\/13021501\/Create-Cluster-1536x960.jpg 1536w, https:\/\/static.pingcap.com\/files\/2024\/08\/13021501\/Create-Cluster-1440x900.jpg 1440w\" sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/figure>\n<\/div>\n\n\n<p>After the cluster is created, you need to create a database schema and execute the following SQL statement on the SQL Editor of TiDB Cloud:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE SCHEMA dify;<\/code><\/pre>\n\n\n\n<p>Finally, we can click on the upper right corner of the cluster Overview page <strong>Connect<\/strong> button to obtain the database connection parameters and save them for subsequent steps.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1528\" height=\"1512\" src=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13021722\/Connect.png\" alt=\"Connect\" class=\"wp-image-18784\" style=\"width:759px;height:auto\" srcset=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13021722\/Connect.png 1528w, https:\/\/static.pingcap.com\/files\/2024\/08\/13021722\/Connect-300x297.png 300w, https:\/\/static.pingcap.com\/files\/2024\/08\/13021722\/Connect-1024x1013.png 1024w, https:\/\/static.pingcap.com\/files\/2024\/08\/13021722\/Connect-768x760.png 768w, https:\/\/static.pingcap.com\/files\/2024\/08\/13021722\/Connect-1440x1425.png 1440w\" sizes=\"auto, (max-width: 1528px) 100vw, 1528px\" \/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">Deploy Dify Using Docker Compose<\/h3>\n\n\n\n<p>If individuals want to use Dify, there are two deployment methods: <strong>cloud service<\/strong> \uadf8\ub9ac\uace0 <strong>Self-hosted Community Edition<\/strong>.<\/p>\n\n\n\n<p>Dify Cloud currently does not support the configuration of vector databases, so if you want to use TiDB Cloud Starter as its underlying vector database, you can use the community open source version <strong>Self-hosted<\/strong>. However, the good news is that the TiDB team is in close communication with the Dify team to discuss possible cooperation options.<\/p>\n\n\n\n<p>We recommend using Docker Compose for Dify deployment. Please refer to the <a href=\"https:\/\/docs.dify.ai\/getting-started\/install-self-hosted\/docker-compose\">specific operation steps<\/a>. The following is a brief step:<\/p>\n\n\n\n<p>First, clone Dify\u2019s open source repository locally:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git clone https:\/\/github.com\/langgenius\/dify.git\ncd dify\/docker\ncp .env.example .env\nvi .env<\/code><\/pre>\n\n\n\n<p>In order to store TiDB Serverless as a vector for Dify, we need to modify .env in file Environment variables:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Will VECTOR_STORE change into tidb_vector, the default value is weaviate\nVECTOR_STORE: tidb_vector\n\n# Modify the following environment variables to the previously saved connection TiDB parameter\nTIDB_VECTOR_HOST: gateway01.***.prod.aws.tidbcloud.com\nTIDB_VECTOR_PORT: 4000\nTIDB_VECTOR_USER: ********.root\nTIDB_VECTOR_PASSWORD: ********\nTIDB_VECTOR_DATABASE: dify<\/code><\/pre>\n\n\n\n<p>After the modification is completed, execute the following startup command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker compose up -d<\/code><\/pre>\n\n\n\n<p>After successful deployment, enter http:\/\/localhost in the browser. You can access Dify now.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Build_a_Knowledge_Base_Based_on_TiDB\"><\/span>Build a Knowledge Base Based on TiDB<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In the above preparation work, we have configured TiDB Serverless, so how to use Dify to upload documents and enter them into the vector database, and how to configure the Embedding and Reranker models?<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Configuration Model Provider<\/h3>\n\n\n\n<p>First, in Dify&#8217;s &#8220;Settings -&gt;Mode Provider\u201d, add a new model and configure Token authorization, for example: use OpenAI as the dialogue model and Embedding model, and use Cohere as the Reranker model.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Upload Documents<\/h3>\n\n\n\n<p>Then, visit http:\/\/localhost\/datasets\/create, create a new blank knowledge base, and upload your documents to the knowledge base.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1720\" height=\"1058\" src=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13022043\/Create-Knowledge.jpg\" alt=\"Create Knowledge\" class=\"wp-image-18785\" style=\"width:758px;height:auto\" srcset=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13022043\/Create-Knowledge.jpg 1720w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022043\/Create-Knowledge-300x185.jpg 300w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022043\/Create-Knowledge-1024x630.jpg 1024w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022043\/Create-Knowledge-768x472.jpg 768w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022043\/Create-Knowledge-1536x945.jpg 1536w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022043\/Create-Knowledge-1440x886.jpg 1440w\" sizes=\"auto, (max-width: 1720px) 100vw, 1720px\" \/><\/figure>\n<\/div>\n\n\n<p>Dify will help you automatically build vector indexes for uploaded documents and store them in TiDB Serverless vector storage.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Configure Retrieval Model<\/h3>\n\n\n\n<p>After the document is uploaded, you can further set the Embedding and Reranker models on the settings page of the knowledge base:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1600\" height=\"1417\" src=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13022313\/Configure-retrieval-model.jpg\" alt=\"Retrieval setting\" class=\"wp-image-18787\" style=\"width:758px;height:auto\" srcset=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13022313\/Configure-retrieval-model.jpg 1600w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022313\/Configure-retrieval-model-300x266.jpg 300w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022313\/Configure-retrieval-model-1024x907.jpg 1024w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022313\/Configure-retrieval-model-768x680.jpg 768w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022313\/Configure-retrieval-model-1536x1360.jpg 1536w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022313\/Configure-retrieval-model-1440x1275.jpg 1440w\" sizes=\"auto, (max-width: 1600px) 100vw, 1600px\" \/><\/figure>\n<\/div>\n\n\n<p>On the knowledge base configuration page, we can see that Dify provides three search modes for the knowledge base:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Vector Search<\/strong>: Retrieval based on ANN query, Reranker model is optional.<\/li>\n\n\n\n<li><strong>Full Text Search<\/strong>: Based on BM25 retrieval, the Reranker model is optional (currently not supported by TiDB Vector type data sources)<\/li>\n\n\n\n<li><strong>Hybrid (vector + full text)<\/strong>: ANN + BM25 search, Reranker model is required.<\/li>\n<\/ul>\n\n\n\n<p>In terms of function implementation, Dify has enabled TiDB Serverless <a href=\"https:\/\/docs.pingcap.com\/tidbcloud\/vector-search-index\">Vector Search Index<\/a> function by default, allowing us to complete the search within hundreds of thousands of documents in <strong>millisecond level<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Create_AI_with_Dify_Chatflow\"><\/span>Create AI with Dify Chatflow<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>After configuring the knowledge base settings and uploading the documents, we can start creating our AI chat assistant.<\/p>\n\n\n\n<p>Select to create a blank application in &#8220;Studio&#8221; and select &#8220;Chatflow&#8221; orchestrate method, then set app icon, name and description information:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1354\" height=\"1118\" src=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13022604\/Create-from-blank.jpg\" alt=\"Create from Blank\" class=\"wp-image-18788\" style=\"width:758px;height:auto\" srcset=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13022604\/Create-from-blank.jpg 1354w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022604\/Create-from-blank-300x248.jpg 300w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022604\/Create-from-blank-1024x846.jpg 1024w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022604\/Create-from-blank-768x634.jpg 768w\" sizes=\"auto, (max-width: 1354px) 100vw, 1354px\" \/><\/figure>\n<\/div>\n\n\n<p>After entering the chat assistant Chatflow design page, we can find that Dify has initialized the basic chat workflow for us.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"2048\" height=\"1040\" src=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13022808\/Bot.jpg\" alt=\"Basic chat flow\" class=\"wp-image-18789\" style=\"width:758px;height:auto\" srcset=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13022808\/Bot.jpg 2048w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022808\/Bot-300x152.jpg 300w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022808\/Bot-1024x520.jpg 1024w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022808\/Bot-768x390.jpg 768w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022808\/Bot-1536x780.jpg 1536w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022808\/Bot-1440x731.jpg 1440w\" sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/figure>\n<\/div>\n\n\n<p>Click the &#8220;+&#8221; button between the &#8220;Start&#8221; node and the &#8220;LLM&#8221; node to add a &#8220;Knowledge Retrieval&#8221; node, and add the knowledge base we just created to the &#8220;Knowledge&#8221; option of the node.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"2048\" height=\"678\" src=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13022932\/add-knowledge-base.jpg\" alt=\"\" class=\"wp-image-18790\" style=\"width:758px;height:auto\" srcset=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13022932\/add-knowledge-base.jpg 2048w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022932\/add-knowledge-base-300x99.jpg 300w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022932\/add-knowledge-base-1024x339.jpg 1024w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022932\/add-knowledge-base-768x254.jpg 768w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022932\/add-knowledge-base-1536x509.jpg 1536w, https:\/\/static.pingcap.com\/files\/2024\/08\/13022932\/add-knowledge-base-1440x477.jpg 1440w\" sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/figure>\n<\/div>\n\n\n<p>Click the &#8220;LLM&#8221; node and set its &#8220;Context&#8221; option to the running result of &#8220;Knowledge Retrieval&#8221; (result array). Write the &#8220;SYSTEM&#8221; prompt, insert the &#8220;Context&#8221; variable into the prompt and add the following requirements for response to it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Consider contextual information and answer questions without relying on prior knowledge.<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"2048\" height=\"821\" src=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13023039\/add-requirements.jpg\" alt=\"add requirements\" class=\"wp-image-18791\" style=\"width:758px;height:auto\" srcset=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13023039\/add-requirements.jpg 2048w, https:\/\/static.pingcap.com\/files\/2024\/08\/13023039\/add-requirements-300x120.jpg 300w, https:\/\/static.pingcap.com\/files\/2024\/08\/13023039\/add-requirements-1024x411.jpg 1024w, https:\/\/static.pingcap.com\/files\/2024\/08\/13023039\/add-requirements-768x308.jpg 768w, https:\/\/static.pingcap.com\/files\/2024\/08\/13023039\/add-requirements-1536x616.jpg 1536w, https:\/\/static.pingcap.com\/files\/2024\/08\/13023039\/add-requirements-1440x577.jpg 1440w\" sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/figure>\n<\/div>\n\n\n<p>Click the &#8220;Debug and Preview&#8221; button in the upper right corner, we can open the preview dialog box, in the preview dialog box we ask a question to trigger the AI \u200b\u200bto execute the Chatflow you just designed to answer questions.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1600\" height=\"1303\" src=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13023156\/Debug-and-Preview.jpg\" alt=\"Debug and Preview\" class=\"wp-image-18792\" style=\"width:758px;height:auto\" srcset=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13023156\/Debug-and-Preview.jpg 1600w, https:\/\/static.pingcap.com\/files\/2024\/08\/13023156\/Debug-and-Preview-300x244.jpg 300w, https:\/\/static.pingcap.com\/files\/2024\/08\/13023156\/Debug-and-Preview-1024x834.jpg 1024w, https:\/\/static.pingcap.com\/files\/2024\/08\/13023156\/Debug-and-Preview-768x625.jpg 768w, https:\/\/static.pingcap.com\/files\/2024\/08\/13023156\/Debug-and-Preview-1536x1251.jpg 1536w, https:\/\/static.pingcap.com\/files\/2024\/08\/13023156\/Debug-and-Preview-1440x1173.jpg 1440w\" sizes=\"auto, (max-width: 1600px) 100vw, 1600px\" \/><\/figure>\n<\/div>\n\n\n<p>After completing the above operations, we have used Dify to create a chat assistant that answers questions based on the knowledge base you upload.<\/p>\n\n\n\n<p>If you want to use it on other platforms or websites, you can click &#8220;Publish&#8221; in the upper right corner. Dify supports by &lt;script&gt; or &lt;iframe&gt; tag mode, as well as API calling method to embed the chat on your site.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_Choose_TiDB_Vector_Search\"><\/span>Why Choose TiDB Vector Search?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Dynamic scalability:<\/strong> TiDB provides elastic scalability to help application developers easily deal with the dynamic and unpredictable data growth or workload growth needs of AI applications.<\/li>\n\n\n\n<li><strong>All-in-one database<\/strong>: In addition to supporting Hybrid Transaction\/Analytical Processing (HTAP), TiDB can now also be used as a vector storage, which can meet the complex and diverse data storage and query needs of GenAI applications such as document storage, graph data storage, and conversation message storage.<\/li>\n\n\n\n<li><strong>SQL compatibility<\/strong>: Developers can use familiar SQL CLI tools, application drivers, and GUI tools to manage vector data and perform semantic search queries.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_Choose_Dify\"><\/span>Why Choose Dify?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Low code, high efficiency:<\/strong> Dify provides a visual workflow orchestration system that can help users quickly implement ideas and build customized AI workflows.<\/li>\n\n\n\n<li><strong>Powerful ecology, ready to use out of the box:<\/strong> Dify integrates many model providers, data sources and tools, and users only need simple configuration to complete the docking of different third-party platforms.<\/li>\n\n\n\n<li><strong>Easy to use, collaborative and co-creative:<\/strong> The emergence of Dify lowers the threshold for users to build enterprise-level AI applications, providing enterprises with capabilities from Agent construction to AI workflow orchestration, RAG retrieval, model management, etc., to easily build and operate generative AI native applications.<\/li>\n\n\n\n<li><strong>Model neutral, embrace open source:<\/strong> Dify emphasizes the importance of model neutrality and open source ecosystems, focusing on solving the cost, security and observability challenges that enterprises face when deploying multi-modal and multi-model applications.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Learn_More\"><\/span>\ub354 \uc54c\uc544\ubcf4\uae30<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There are some examples to show how to use the <a href=\"https:\/\/github.com\/pingcap\/tidb-vector-python\/\">pingcap\/tidb-vector-python<\/a> to interact with TiDB Vector in different scenarios.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/github.com\/pingcap\/tidb-vector-python\/blob\/main\/examples\/openai_embedding\/README.md\">OpenAI Embedding<\/a>: use the OpenAI embedding model to generate vectors for text data, store them in TiDB Vector, and search for similar text.<\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/pingcap\/tidb-vector-python\/blob\/main\/examples\/image_search\/README.md\">Image Search<\/a>: use the OpenAI CLIP model to generate vectors for image and text, store them in TiDB Vector, and search for similar images.<\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/pingcap\/tidb-vector-python\/blob\/main\/examples\/llamaindex-tidb-vector-with-ui\/README.md\">LlamaIndex RAG with UI<\/a>: use the LlamaIndex to build an <a href=\"https:\/\/docs.llamaindex.ai\/en\/latest\/getting_started\/concepts\/\">RAG(Retrieval-Augmented Generation)<\/a> application.<\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/pingcap\/tidb-vector-python\/tree\/main\/examples\/llamaindex-tidb-vector\">Chat with URL<\/a>: use LlamaIndex to build an <a href=\"https:\/\/docs.llamaindex.ai\/en\/latest\/getting_started\/concepts\/\">RAG(Retrieval-Augmented Generation)<\/a> application that can chat with a URL.<\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/pingcap\/tidb-vector-python\/blob\/main\/examples\/graphrag-demo\/README.md\">GraphRAG<\/a>: 20 lines code of using TiDB Serverless to build a Knowledge Graph based RAG application.<\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/pingcap\/tidb-vector-python\/blob\/main\/examples\/graphrag-step-by-step-tutorial\/README.md\">GraphRAG Step by Step Tutorial<\/a>: Step by step tutorial to build a Knowledge Graph based RAG application with Colab notebook. In this tutorial, you will learn how to extract knowledge from a text corpus, build a Knowledge Graph, store the Knowledge Graph in TiDB Serverless, and search from the Knowledge Graph.<\/li>\n\n\n\n<li><a href=\"https:\/\/colab.research.google.com\/drive\/1LuJn4mtKsjr3lHbzMa2RM-oroUvpy83y?usp=sharing\">Vector Search Notebook with SQLAlchemy<\/a>: use <a href=\"https:\/\/www.sqlalchemy.org\/\">SQLAlchemy<\/a> to interact with TiDB Serverless: connect db, index&amp;store data and then search vectors.<\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/pingcap\/tidb-vector-python\/blob\/main\/examples\/jina-ai-embeddings-demo\/README.md\">Build RAG with Jina AI Embeddings<\/a>: use Jina AI to generate embeddings for text data, store the embeddings in TiDB Vector Storage, and search for similar embeddings.<\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/pingcap\/tidb-vector-python\/blob\/main\/examples\/semantic-cache\/README.md\">Semantic Cache<\/a>: build a semantic cache with Jina AI and TiDB Vector.<\/li>\n<\/ul>\n\n\n\n<p><strong>Reference<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/docs.pingcap.com\/tidbcloud\/vector-search-overview\">TiDB Vector Search Documentation<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/docs.dify.ai\/\">Dify official Documentation<\/a><\/li>\n<\/ul>\n\n\n\n<p>Join our <a href=\"https:\/\/ask.pingcap.com\/\">channels<\/a> to stay tuned.<\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction Building AI Agents can be an intricate affair, but it doesn\u2019t have to be with the right tools. The combination of TiDB\u2019s new Serverless Vector Search, now welcoming users in its Public Beta phase, alongside Dify\u2019s intuitive low-code platform, simplifies the creation of scalable, efficient AI solutions. This guide offers a clear pathway to [&hellip;]<\/p>\n","protected":false},"author":196,"featured_media":18793,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ub_ctt_via":"","footnotes":""},"categories":[18],"tags":[138,9,208,29],"class_list":["post-18782","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-community","tag-ai","tag-scalability","tag-tidb-serverless","tag-tutorial"],"acf":[],"featured_image_src":"https:\/\/static.pingcap.com\/files\/2024\/08\/13023757\/Blog_DifyTiDB_Banner_EN_20240813-scaled.jpeg","author_info":{"display_name":"Zhiyuan Liang","author_link":"https:\/\/www.pingcap.com\/ko\/blog\/author\/zhiyuan-liang\/"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Dify.AI x TiDB: Build Scalable AI Agent with Knowledge Base | TiDB<\/title>\n<meta name=\"description\" content=\"This guide offers a pathway to seamlessly integrating TiDB and Dify, harnesses robust vector search capabilities to power your AI agents.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pingcap.com\/ko\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dify.AI x TiDB: Build Scalable AI Agent with Knowledge Base | TiDB\" \/>\n<meta property=\"og:description\" content=\"This guide offers a pathway to seamlessly integrating TiDB and Dify, harnesses robust vector search capabilities to power your AI agents.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pingcap.com\/ko\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/\" \/>\n<meta property=\"og:site_name\" content=\"TiDB\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/pingcap2015\" \/>\n<meta property=\"article:published_time\" content=\"2024-08-19T03:54:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-14T14:38:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13204727\/Blog_DifyTiDB_Social_EN_20240813.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"2500\" \/>\n\t<meta property=\"og:image:height\" content=\"1306\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Zhiyuan Liang\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13204727\/Blog_DifyTiDB_Social_EN_20240813.jpeg\" \/>\n<meta name=\"twitter:creator\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:site\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Zhiyuan Liang\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/\"},\"author\":{\"name\":\"Zhiyuan Liang\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/person\/eb40ba298bc36a0f833ac79b7f473b0e\"},\"headline\":\"Dify.AI x TiDB: Build Scalable AI Agent with Knowledge Base\",\"datePublished\":\"2024-08-19T03:54:43+00:00\",\"dateModified\":\"2025-11-14T14:38:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/\"},\"wordCount\":1437,\"publisher\":{\"@id\":\"https:\/\/www.pingcap.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/static.pingcap.com\/files\/2024\/08\/13023757\/Blog_DifyTiDB_Banner_EN_20240813-scaled.jpeg\",\"keywords\":[\"AI\",\"Scalability\",\"TiDB Serverless\",\"Tutorial\"],\"articleSection\":[\"Community\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/\",\"url\":\"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/\",\"name\":\"Dify.AI x TiDB: Build Scalable AI Agent with Knowledge Base | TiDB\",\"isPartOf\":{\"@id\":\"https:\/\/www.pingcap.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/static.pingcap.com\/files\/2024\/08\/13023757\/Blog_DifyTiDB_Banner_EN_20240813-scaled.jpeg\",\"datePublished\":\"2024-08-19T03:54:43+00:00\",\"dateModified\":\"2025-11-14T14:38:12+00:00\",\"description\":\"This guide offers a pathway to seamlessly integrating TiDB and Dify, harnesses robust vector search capabilities to power your AI agents.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/#primaryimage\",\"url\":\"https:\/\/static.pingcap.com\/files\/2024\/08\/13023757\/Blog_DifyTiDB_Banner_EN_20240813-scaled.jpeg\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2024\/08\/13023757\/Blog_DifyTiDB_Banner_EN_20240813-scaled.jpeg\",\"width\":2560,\"height\":853,\"caption\":\"Dify X TiDB\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pingcap.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Dify.AI x TiDB: Build Scalable AI Agent with Knowledge Base\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pingcap.com\/#website\",\"url\":\"https:\/\/www.pingcap.com\/\",\"name\":\"TiDB\",\"description\":\"TiDB | SQL at Scale\",\"publisher\":{\"@id\":\"https:\/\/www.pingcap.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pingcap.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pingcap.com\/#organization\",\"name\":\"PingCAP\",\"url\":\"https:\/\/www.pingcap.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png\",\"width\":811,\"height\":232,\"caption\":\"PingCAP\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/facebook.com\/pingcap2015\",\"https:\/\/x.com\/PingCAP\",\"https:\/\/linkedin.com\/company\/pingcap\",\"https:\/\/youtube.com\/channel\/UCuq4puT32DzHKT5rU1IZpIA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/person\/eb40ba298bc36a0f833ac79b7f473b0e\",\"name\":\"Zhiyuan Liang\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg\",\"caption\":\"Zhiyuan Liang\"},\"description\":\"Senior Software Engineer\",\"url\":\"https:\/\/www.pingcap.com\/ko\/blog\/author\/zhiyuan-liang\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Dify.AI x TiDB: Build Scalable AI Agent with Knowledge Base | TiDB","description":"This guide offers a pathway to seamlessly integrating TiDB and Dify, harnesses robust vector search capabilities to power your AI agents.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pingcap.com\/ko\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/","og_locale":"ko_KR","og_type":"article","og_title":"Dify.AI x TiDB: Build Scalable AI Agent with Knowledge Base | TiDB","og_description":"This guide offers a pathway to seamlessly integrating TiDB and Dify, harnesses robust vector search capabilities to power your AI agents.","og_url":"https:\/\/www.pingcap.com\/ko\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/","og_site_name":"TiDB","article_publisher":"https:\/\/facebook.com\/pingcap2015","article_published_time":"2024-08-19T03:54:43+00:00","article_modified_time":"2025-11-14T14:38:12+00:00","og_image":[{"width":2500,"height":1306,"url":"https:\/\/static.pingcap.com\/files\/2024\/08\/13204727\/Blog_DifyTiDB_Social_EN_20240813.jpeg","type":"image\/jpeg"}],"author":"Zhiyuan Liang","twitter_card":"summary_large_image","twitter_image":"https:\/\/static.pingcap.com\/files\/2024\/08\/13204727\/Blog_DifyTiDB_Social_EN_20240813.jpeg","twitter_creator":"@PingCAP","twitter_site":"@PingCAP","twitter_misc":{"Written by":"Zhiyuan Liang","Est. reading time":"8\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/#article","isPartOf":{"@id":"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/"},"author":{"name":"Zhiyuan Liang","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/eb40ba298bc36a0f833ac79b7f473b0e"},"headline":"Dify.AI x TiDB: Build Scalable AI Agent with Knowledge Base","datePublished":"2024-08-19T03:54:43+00:00","dateModified":"2025-11-14T14:38:12+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/"},"wordCount":1437,"publisher":{"@id":"https:\/\/www.pingcap.com\/#organization"},"image":{"@id":"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/#primaryimage"},"thumbnailUrl":"https:\/\/static.pingcap.com\/files\/2024\/08\/13023757\/Blog_DifyTiDB_Banner_EN_20240813-scaled.jpeg","keywords":["AI","Scalability","TiDB Serverless","Tutorial"],"articleSection":["Community"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/","url":"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/","name":"Dify.AI x TiDB: Build Scalable AI Agent with Knowledge Base | TiDB","isPartOf":{"@id":"https:\/\/www.pingcap.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/#primaryimage"},"image":{"@id":"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/#primaryimage"},"thumbnailUrl":"https:\/\/static.pingcap.com\/files\/2024\/08\/13023757\/Blog_DifyTiDB_Banner_EN_20240813-scaled.jpeg","datePublished":"2024-08-19T03:54:43+00:00","dateModified":"2025-11-14T14:38:12+00:00","description":"This guide offers a pathway to seamlessly integrating TiDB and Dify, harnesses robust vector search capabilities to power your AI agents.","breadcrumb":{"@id":"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/"]}]},{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/#primaryimage","url":"https:\/\/static.pingcap.com\/files\/2024\/08\/13023757\/Blog_DifyTiDB_Banner_EN_20240813-scaled.jpeg","contentUrl":"https:\/\/static.pingcap.com\/files\/2024\/08\/13023757\/Blog_DifyTiDB_Banner_EN_20240813-scaled.jpeg","width":2560,"height":853,"caption":"Dify X TiDB"},{"@type":"BreadcrumbList","@id":"https:\/\/www.pingcap.com\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pingcap.com\/"},{"@type":"ListItem","position":2,"name":"Dify.AI x TiDB: Build Scalable AI Agent with Knowledge Base"}]},{"@type":"WebSite","@id":"https:\/\/www.pingcap.com\/#website","url":"https:\/\/www.pingcap.com\/","name":"\ud2f0DB","description":"TiDB | SQL at Scale","publisher":{"@id":"https:\/\/www.pingcap.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pingcap.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/www.pingcap.com\/#organization","name":"PingCAP","url":"https:\/\/www.pingcap.com\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/","url":"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png","contentUrl":"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png","width":811,"height":232,"caption":"PingCAP"},"image":{"@id":"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/pingcap2015","https:\/\/x.com\/PingCAP","https:\/\/linkedin.com\/company\/pingcap","https:\/\/youtube.com\/channel\/UCuq4puT32DzHKT5rU1IZpIA"]},{"@type":"Person","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/eb40ba298bc36a0f833ac79b7f473b0e","name":"Zhiyuan Liang","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/image\/","url":"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg","contentUrl":"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg","caption":"Zhiyuan Liang"},"description":"Senior Software Engineer","url":"https:\/\/www.pingcap.com\/ko\/blog\/author\/zhiyuan-liang\/"}]}},"grav_blocks":[{"acf_fc_layout":"resources","block_title":"Related Resources","block_title_desc":"","view_all_enabled":false,"view_all_text":"View All","view_all_link_type":"","relationship_source":"custom","num_results":3,"custom_tag":false,"custom_category":false,"custom_resource_ids":[17824,15610,16085],"fill_remaining_resources":true,"block_background":"block-bg-none","block_background_video_type":"url","block_background_video_url":"","block_background_video_file":false,"block_background_image":false,"block_background_overlay":false,"unique_id":"","block_option_custom_class":"","block_option_padding":[],"block_option_hide":[],"block_add_top_arc":false,"block_increase_bottom_padding":false}],"card_markup":"<a class=\"card-resource bg-white\" href=\"https:\/\/www.pingcap.com\/ko\/blog\/dify-tidb-build-scalable-ai-agent-with-knowledge-base\/\"><div class=\"card-resource__image-container\"><img class=\"card-resource__image\" alt=\"Dify X TiDB\" src=\"https:\/\/static.pingcap.com\/files\/2024\/08\/13023757\/Blog_DifyTiDB_Banner_EN_20240813-scaled.jpeg\" loading=\"lazy\" width=2560 height=853 \/><\/div><div class=\"card-resource__content-container\"><div class=\"card-resource__content-head\"><div class=\"card-resource__category\">Community<\/div><\/div><h5 class=\"card-resource__title\">Dify.AI x TiDB: Build Scalable AI Agent with Knowledge Base<\/h5><\/div><\/a>","_links":{"self":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/18782","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/users\/196"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/comments?post=18782"}],"version-history":[{"count":12,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/18782\/revisions"}],"predecessor-version":[{"id":30522,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/18782\/revisions\/30522"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media\/18793"}],"wp:attachment":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media?parent=18782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/categories?post=18782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/tags?post=18782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}