diff --git a/TOC-tidb-cloud.md b/TOC-tidb-cloud.md index 439d7a11cf070..d6ba4ecbd2253 100644 --- a/TOC-tidb-cloud.md +++ b/TOC-tidb-cloud.md @@ -10,7 +10,7 @@ - [Roadmap](/tidb-cloud/tidb-cloud-roadmap.md) - Get Started - [Try Out TiDB Cloud](/tidb-cloud/tidb-cloud-quickstart.md) - - [Try Out TiDB + AI](/vector-search-get-started-using-python.md) + - [Try Out TiDB + AI](/vector-search/vector-search-get-started-using-python.md) - [Try Out HTAP](/tidb-cloud/tidb-cloud-htap-quickstart.md) - [Try Out TiDB Cloud CLI](/tidb-cloud/get-started-with-cli.md) - [Perform a PoC](/tidb-cloud/tidb-cloud-poc.md) @@ -241,27 +241,27 @@ - Explore Data - [Chat2Query (Beta) in SQL Editor](/tidb-cloud/explore-data-with-chat2query.md) - Vector Search (Beta) - - [Overview](/vector-search-overview.md) + - [Overview](/vector-search/vector-search-overview.md) - Get Started - - [Get Started with SQL](/vector-search-get-started-using-sql.md) - - [Get Started with Python](/vector-search-get-started-using-python.md) + - [Get Started with SQL](/vector-search/vector-search-get-started-using-sql.md) + - [Get Started with Python](/vector-search/vector-search-get-started-using-python.md) - Integrations - - [Overview](/vector-search-integration-overview.md) + - [Overview](/vector-search/vector-search-integration-overview.md) - AI Frameworks - - [LlamaIndex](/vector-search-integrate-with-llamaindex.md) - - [Langchain](/vector-search-integrate-with-langchain.md) + - [LlamaIndex](/vector-search/vector-search-integrate-with-llamaindex.md) + - [Langchain](/vector-search/vector-search-integrate-with-langchain.md) - Embedding Models/Services - - [Jina AI](/vector-search-integrate-with-jinaai-embedding.md) + - [Jina AI](/vector-search/vector-search-integrate-with-jinaai-embedding.md) - ORM Libraries - - [SQLAlchemy](/vector-search-integrate-with-sqlalchemy.md) - - [peewee](/vector-search-integrate-with-peewee.md) - - [Django ORM](/vector-search-integrate-with-django-orm.md) + - [SQLAlchemy](/vector-search/vector-search-integrate-with-sqlalchemy.md) + - [peewee](/vector-search/vector-search-integrate-with-peewee.md) + - [Django ORM](/vector-search/vector-search-integrate-with-django-orm.md) - Reference - - [Vector Data Types](/vector-search-data-types.md) - - [Vector Functions and Operators](/vector-search-functions-and-operators.md) - - [Vector Index](/vector-search-index.md) - - [Improve Performance](/vector-search-improve-performance.md) - - [Limitations](/vector-search-limitations.md) + - [Vector Data Types](/vector-search/vector-search-data-types.md) + - [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md) + - [Vector Index](/vector-search/vector-search-index.md) + - [Improve Performance](/vector-search/vector-search-improve-performance.md) + - [Limitations](/vector-search/vector-search-limitations.md) - [Changelogs](/tidb-cloud/vector-search-changelogs.md) - Data Service (Beta) - [Overview](/tidb-cloud/data-service-overview.md) diff --git a/TOC.md b/TOC.md index c694d37a05004..909bb7e1cc9c1 100644 --- a/TOC.md +++ b/TOC.md @@ -82,23 +82,23 @@ - [Stale Read](/develop/dev-guide-use-stale-read.md) - [HTAP Queries](/develop/dev-guide-hybrid-oltp-and-olap-queries.md) - Vector Search - - [Overview](/vector-search-overview.md) + - [Overview](/vector-search/vector-search-overview.md) - Get Started - - [Get Started with SQL](/vector-search-get-started-using-sql.md) - - [Get Started with Python](/vector-search-get-started-using-python.md) + - [Get Started with SQL](/vector-search/vector-search-get-started-using-sql.md) + - [Get Started with Python](/vector-search/vector-search-get-started-using-python.md) - Integrations - - [Overview](/vector-search-integration-overview.md) + - [Overview](/vector-search/vector-search-integration-overview.md) - AI Frameworks - - [LlamaIndex](/vector-search-integrate-with-llamaindex.md) - - [Langchain](/vector-search-integrate-with-langchain.md) + - [LlamaIndex](/vector-search/vector-search-integrate-with-llamaindex.md) + - [Langchain](/vector-search/vector-search-integrate-with-langchain.md) - Embedding Models/Services - - [Jina AI](/vector-search-integrate-with-jinaai-embedding.md) + - [Jina AI](/vector-search/vector-search-integrate-with-jinaai-embedding.md) - ORM Libraries - - [SQLAlchemy](/vector-search-integrate-with-sqlalchemy.md) - - [peewee](/vector-search-integrate-with-peewee.md) - - [Django](/vector-search-integrate-with-django-orm.md) - - [Improve Performance](/vector-search-improve-performance.md) - - [Limitations](/vector-search-limitations.md) + - [SQLAlchemy](/vector-search/vector-search-integrate-with-sqlalchemy.md) + - [peewee](/vector-search/vector-search-integrate-with-peewee.md) + - [Django](/vector-search/vector-search-integrate-with-django-orm.md) + - [Improve Performance](/vector-search/vector-search-improve-performance.md) + - [Limitations](/vector-search/vector-search-limitations.md) - Transaction - [Overview](/develop/dev-guide-transaction-overview.md) - [Optimistic and Pessimistic Transactions](/develop/dev-guide-optimistic-and-pessimistic-transaction.md) @@ -891,7 +891,7 @@ - [Date and Time Types](/data-type-date-and-time.md) - [String Types](/data-type-string.md) - [JSON Type](/data-type-json.md) - - [Vector Types](/vector-search-data-types.md) + - [Vector Types](/vector-search/vector-search-data-types.md) - Functions and Operators - [Overview](/functions-and-operators/functions-and-operators-overview.md) - [Type Conversion in Expression Evaluation](/functions-and-operators/type-conversion-in-expression-evaluation.md) @@ -905,7 +905,7 @@ - [Encryption and Compression Functions](/functions-and-operators/encryption-and-compression-functions.md) - [Locking Functions](/functions-and-operators/locking-functions.md) - [Information Functions](/functions-and-operators/information-functions.md) - - [Vector Functions and Operators](/vector-search-functions-and-operators.md) + - [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md) - JSON Functions - [Overview](/functions-and-operators/json-functions.md) - [Functions That Create JSON](/functions-and-operators/json-functions/json-functions-create.md) @@ -926,7 +926,7 @@ - [TiDB Specific Functions](/functions-and-operators/tidb-functions.md) - [Comparisons between Functions and Syntax of Oracle and TiDB](/oracle-functions-to-tidb.md) - [Clustered Indexes](/clustered-indexes.md) - - [Vector Index](/vector-search-index.md) + - [Vector Index](/vector-search/vector-search-index.md) - [Constraints](/constraints.md) - [Generated Columns](/generated-columns.md) - [SQL Mode](/sql-mode.md) diff --git a/basic-features.md b/basic-features.md index f37c3eb5634b7..084368a8d8351 100644 --- a/basic-features.md +++ b/basic-features.md @@ -27,7 +27,7 @@ You can try out TiDB features on [TiDB Playground](https://play.tidbcloud.com/?u | [Date and time types](/data-type-date-and-time.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | [String types](/data-type-string.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | [JSON type](/data-type-json.md) | Y | Y | Y | Y | Y | E | E | E | E | E | -| [Vectort types](/vector-search-data-types.md) | E | N | N | N | N | N | N | N | N | N | +| [Vectort types](/vector-search/vector-search-data-types.md) | E | N | N | N | N | N | N | N | N | N | | [Control flow functions](/functions-and-operators/control-flow-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | [String functions](/functions-and-operators/string-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | [Numeric functions and operators](/functions-and-operators/numeric-functions-and-operators.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | @@ -35,7 +35,7 @@ You can try out TiDB features on [TiDB Playground](https://play.tidbcloud.com/?u | [Bit functions and operators](/functions-and-operators/bit-functions-and-operators.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | [Cast functions and operators](/functions-and-operators/cast-functions-and-operators.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | [Encryption and compression functions](/functions-and-operators/encryption-and-compression-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | -| [Vector functions and operators](/vector-search-functions-and-operators.md) | E | N | N | N | N | N | N | N | N | N | +| [Vector functions and operators](/vector-search/vector-search-functions-and-operators.md) | E | N | N | N | N | N | N | N | N | N | | [Information functions](/functions-and-operators/information-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | [JSON functions](/functions-and-operators/json-functions.md) | Y | Y | Y | Y | Y | E | E | E | E | E | | [Aggregation functions](/functions-and-operators/aggregate-group-by-functions.md) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | @@ -66,7 +66,7 @@ You can try out TiDB features on [TiDB Playground](https://play.tidbcloud.com/?u | [Foreign key](/foreign-key.md) | Y | E | E | E | N | N | N | N | N | N | | [TiFlash late materialization](/tiflash/tiflash-late-materialization.md) | Y | Y | Y | Y | N | N | N | N | N | N | | [Global index](/partitioned-table.md#global-indexes) | Y | N | N | N | N | N | N | N | N | N | -| [Vector index](/vector-search-index.md) | E | N | N | N | N | N | N | N | N | N | +| [Vector index](/vector-search/vector-search-index.md) | E | N | N | N | N | N | N | N | N | N | ## SQL statements @@ -97,7 +97,7 @@ You can try out TiDB features on [TiDB Playground](https://play.tidbcloud.com/?u | Advanced SQL features | 8.5 | 8.1 | 7.5 | 7.1 | 6.5 | 6.1 | 5.4 | 5.3 | 5.2 | 5.1 | |---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| -| [Vector search](/vector-search-overview.md) | E | N | N | N | N | N | N | N | N | N | +| [Vector search](/vector-search/vector-search-overview.md) | E | N | N | N | N | N | N | N | N | N | | [Prepared statement cache](/sql-prepared-plan-cache.md) | Y | Y | Y | Y | Y | Y | Y | Y | E | E | | [Non-prepared statement cache](/sql-non-prepared-plan-cache.md) | Y | Y | Y | E | N | N | N | N | N | N | | [Instance-level execution plan cache](/system-variables.md#tidb_enable_instance_plan_cache-new-in-v840) | E | N | N | N | N | N | N | N | N | N | diff --git a/br/backup-and-restore-overview.md b/br/backup-and-restore-overview.md index 58a2ff5c2649d..f4b03dddd75c7 100644 --- a/br/backup-and-restore-overview.md +++ b/br/backup-and-restore-overview.md @@ -117,7 +117,7 @@ Backup and restore might go wrong when some TiDB features are enabled or disable | Global temporary tables | | Make sure that you are using v5.3.0 or a later version of BR to back up and restore data. Otherwise, an error occurs in the definition of the backed global temporary tables. | | TiDB Lightning Physical Import| | If the upstream database uses the physical import mode of TiDB Lightning, data cannot be backed up in log backup. It is recommended to perform a full backup after the data import. For more information, see [When the upstream database imports data using TiDB Lightning in the physical import mode, the log backup feature becomes unavailable. Why?](/faq/backup-and-restore-faq.md#when-the-upstream-database-imports-data-using-tidb-lightning-in-the-physical-import-mode-the-log-backup-feature-becomes-unavailable-why).| | TiCDC | | BR v8.2.0 and later: if the target cluster to be restored has a changefeed and the changefeed [CheckpointTS](/ticdc/ticdc-architecture.md#checkpointts) is earlier than the BackupTS, BR does not perform the restoration. BR versions before v8.2.0: if the target cluster to be restored has any active TiCDC changefeeds, BR does not perform the restoration. | -| Vector search | | Make sure that you are using v8.4.0 or a later version of BR to back up and restore data. Restoring tables with [vector data types](/vector-search-data-types.md) to TiDB clusters earlier than v8.4.0 is not supported. | +| Vector search | | Make sure that you are using v8.4.0 or a later version of BR to back up and restore data. Restoring tables with [vector data types](/vector-search/vector-search-data-types.md) to TiDB clusters earlier than v8.4.0 is not supported. | ### Version compatibility diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 7ef58edb93426..ba119a9d0b334 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -200,13 +200,13 @@ Quick access: [Quick start](https://docs.pingcap.com/tidb/v8.4/quick-start-with- Vector search is a search method based on data semantics, which provides more relevant search results. As one of the core functions of AI and large language models (LLMs), vector search can be used in various scenarios such as Retrieval-Augmented Generation (RAG), semantic search, and recommendation systems. - Starting from v8.4.0, TiDB supports [vector data types](/vector-search-data-types.md) and [vector search indexes](/vector-search-index.md), offering powerful vector search capabilities. TiDB vector data types support up to 16,383 dimensions and support various [distance functions](/vector-search-functions-and-operators.md#vector-functions), including L2 distance (Euclidean distance), cosine distance, negative inner product, and L1 distance (Manhattan distance). + Starting from v8.4.0, TiDB supports [vector data types](/vector-search/vector-search-data-types.md) and [vector search indexes](/vector-search/vector-search-index.md), offering powerful vector search capabilities. TiDB vector data types support up to 16,383 dimensions and support various [distance functions](/vector-search/vector-search-functions-and-operators.md#vector-functions), including L2 distance (Euclidean distance), cosine distance, negative inner product, and L1 distance (Manhattan distance). To start vector search, you only need to create a table with vector data types, insert vector data, and then perform a query of vector data. You can also perform mixed queries of vector data and traditional relational data. - To enhance the performance of vector search, you can create and use [vector search indexes](/vector-search-index.md). Note that TiDB vector search indexes rely on TiFlash. Before using vector search indexes, make sure that TiFlash nodes are deployed in your TiDB cluster. + To enhance the performance of vector search, you can create and use [vector search indexes](/vector-search/vector-search-index.md). Note that TiDB vector search indexes rely on TiFlash. Before using vector search indexes, make sure that TiFlash nodes are deployed in your TiDB cluster. - For more information, see [documentation](/vector-search-overview.md). + For more information, see [documentation](/vector-search/vector-search-overview.md). ### DB operations diff --git a/ticdc/ticdc-compatibility.md b/ticdc/ticdc-compatibility.md index d0356a0069949..f142e3d6fbc40 100644 --- a/ticdc/ticdc-compatibility.md +++ b/ticdc/ticdc-compatibility.md @@ -78,7 +78,7 @@ If the upstream cluster contains a global temporary table, the downstream TiDB c ### Compatibility with vector data types -Starting from v8.4.0, TiCDC supports replicating tables with [vector data types](/vector-search-data-types.md) to downstream (experimental). +Starting from v8.4.0, TiCDC supports replicating tables with [vector data types](/vector-search/vector-search-data-types.md) to downstream (experimental). When the downstream is Kafka or a storage service (such as Amazon S3, GCS, Azure Blob Storage, or NFS), TiCDC converts vector data types into string types before writing to the downstream. diff --git a/tidb-cloud/data-service-manage-endpoint.md b/tidb-cloud/data-service-manage-endpoint.md index 0814155c75fc6..e948161811d54 100644 --- a/tidb-cloud/data-service-manage-endpoint.md +++ b/tidb-cloud/data-service-manage-endpoint.md @@ -44,7 +44,7 @@ In TiDB Cloud Data Service, you can generate one or multiple endpoints automatic For each operation you select, TiDB Cloud Data Service will generate a corresponding endpoint. If you select a batch operation (such as `POST (Batch Create)`), the generated endpoint lets you operate on multiple rows in a single request. - If the table you selected contains [vector data types](/vector-search-data-types.md), you can enable the **Vector Search Operations** option and select a vector distance function to generate a vector search endpoint that automatically calculates vector distances based on your selected distance function. The supported [vector distance functions](/vector-search-functions-and-operators.md) include the following: + If the table you selected contains [vector data types](/vector-search/vector-search-data-types.md), you can enable the **Vector Search Operations** option and select a vector distance function to generate a vector search endpoint that automatically calculates vector distances based on your selected distance function. The supported [vector distance functions](/vector-search/vector-search-functions-and-operators.md) include the following: - `VEC_L2_DISTANCE` (default): calculates the L2 distance (Euclidean distance) between two vectors. - `VEC_COSINE_DISTANCE`: calculates the cosine distance between two vectors. diff --git a/tidb-cloud/tidb-cloud-release-notes.md b/tidb-cloud/tidb-cloud-release-notes.md index f8e2679782153..d4508a4c629bb 100644 --- a/tidb-cloud/tidb-cloud-release-notes.md +++ b/tidb-cloud/tidb-cloud-release-notes.md @@ -75,7 +75,7 @@ This page lists the release notes of [TiDB Cloud](https://www.pingcap.com/tidb-c - [Data Service (beta)](https://tidbcloud.com/console/data-service) supports automatically generating vector search endpoints. - If your table contains [vector data types](/vector-search-data-types.md), you can automatically generate a vector search endpoint that calculates vector distances based on your selected distance function. + If your table contains [vector data types](/vector-search/vector-search-data-types.md), you can automatically generate a vector search endpoint that calculates vector distances based on your selected distance function. This feature enables seamless integration with AI platforms such as [Dify](https://docs.dify.ai/guides/tools) and [GPTs](https://openai.com/blog/introducing-gpts), enhancing your applications with advanced natural language processing and AI capabilities for more complex tasks and intelligent solutions. @@ -121,12 +121,12 @@ This page lists the release notes of [TiDB Cloud](https://www.pingcap.com/tidb-c The vector search (beta) feature provides an advanced search solution for performing semantic similarity searches across various data types, including documents, images, audio, and video. This feature enables developers to easily build scalable applications with generative artificial intelligence (AI) capabilities using familiar MySQL skills. Key features include: - - [Vector data types](/vector-search-data-types.md), [vector index](/vector-search-index.md), and [vector functions and operators](/vector-search-functions-and-operators.md). - - Ecosystem integrations with [LangChain](/vector-search-integrate-with-langchain.md), [LlamaIndex](/vector-search-integrate-with-llamaindex.md), and [JinaAI](/vector-search-integrate-with-jinaai-embedding.md). - - Programming language support for Python: [SQLAlchemy](/vector-search-integrate-with-sqlalchemy.md), [Peewee](/vector-search-integrate-with-peewee.md), and [Django ORM](/vector-search-integrate-with-django-orm.md). - - Sample applications and tutorials: perform semantic searches for documents using [Python](/vector-search-get-started-using-python.md) or [SQL](/vector-search-get-started-using-sql.md). + - [Vector data types](/vector-search/vector-search-data-types.md), [vector index](/vector-search/vector-search-index.md), and [vector functions and operators](/vector-search/vector-search-functions-and-operators.md). + - Ecosystem integrations with [LangChain](/vector-search/vector-search-integrate-with-langchain.md), [LlamaIndex](/vector-search/vector-search-integrate-with-llamaindex.md), and [JinaAI](/vector-search/vector-search-integrate-with-jinaai-embedding.md). + - Programming language support for Python: [SQLAlchemy](/vector-search/vector-search-integrate-with-sqlalchemy.md), [Peewee](/vector-search/vector-search-integrate-with-peewee.md), and [Django ORM](/vector-search/vector-search-integrate-with-django-orm.md). + - Sample applications and tutorials: perform semantic searches for documents using [Python](/vector-search/vector-search-get-started-using-python.md) or [SQL](/vector-search/vector-search-get-started-using-sql.md). - For more information, see [Vector search (beta) overview](/vector-search-overview.md). + For more information, see [Vector search (beta) overview](/vector-search/vector-search-overview.md). - [TiDB Cloud Serverless](/tidb-cloud/select-cluster-tier.md#tidb-cloud-serverless) now offers weekly email reports for organization owners. diff --git a/tiflash-upgrade-guide.md b/tiflash-upgrade-guide.md index 78f76dc656ae1..71b38a14d3aa1 100644 --- a/tiflash-upgrade-guide.md +++ b/tiflash-upgrade-guide.md @@ -125,7 +125,7 @@ Starting from v7.4, to reduce the read and write amplification generated during ## From v7.x to v8.4 or a later version -Starting from v8.4, the underlying storage format of TiFlash is updated to support [vector search](/vector-search-overview.md). Therefore, after TiFlash is upgraded to v8.4 or a later version, in-place downgrading to the original version is not supported. +Starting from v8.4, the underlying storage format of TiFlash is updated to support [vector search](/vector-search/vector-search-overview.md). Therefore, after TiFlash is upgraded to v8.4 or a later version, in-place downgrading to the original version is not supported. **Workaround for downgrading TiFlash in testing or other special scenarios** diff --git a/tiflash/tiflash-supported-pushdown-calculations.md b/tiflash/tiflash-supported-pushdown-calculations.md index 47c3f6658d723..17ab8642f5c9b 100644 --- a/tiflash/tiflash-supported-pushdown-calculations.md +++ b/tiflash/tiflash-supported-pushdown-calculations.md @@ -42,7 +42,7 @@ TiFlash supports the following push-down expressions: | [Regular expression functions and operators](/functions-and-operators/string-functions.md) | `REGEXP`, `REGEXP_LIKE()`, `REGEXP_INSTR()`, `REGEXP_SUBSTR()`, `REGEXP_REPLACE()`, `RLIKE` | | [Date functions](/functions-and-operators/date-and-time-functions.md) | `DATE_FORMAT()`, `TIMESTAMPDIFF()`, `FROM_UNIXTIME()`, `UNIX_TIMESTAMP(int)`, `UNIX_TIMESTAMP(decimal)`, `STR_TO_DATE(date)`, `STR_TO_DATE(datetime)`, `DATEDIFF()`, `YEAR()`, `MONTH()`, `DAY()`, `EXTRACT(datetime)`, `DATE()`, `HOUR()`, `MICROSECOND()`, `MINUTE()`, `SECOND()`, `SYSDATE()`, `DATE_ADD/ADDDATE(datetime, int)`, `DATE_ADD/ADDDATE(string, int/real)`, `DATE_SUB/SUBDATE(datetime, int)`, `DATE_SUB/SUBDATE(string, int/real)`, `QUARTER()`, `DAYNAME()`, `DAYOFMONTH()`, `DAYOFWEEK()`, `DAYOFYEAR()`, `LAST_DAY()`, `MONTHNAME()`, `TO_SECONDS()`, `TO_DAYS()`, `FROM_DAYS()`, `WEEKOFYEAR()` | | [JSON function](/functions-and-operators/json-functions.md) | `JSON_LENGTH()`, `->`, `->>`, `JSON_EXTRACT()`, `JSON_ARRAY()`, `JSON_DEPTH()`, `JSON_VALID()`, `JSON_KEYS()`, `JSON_CONTAINS_PATH()`, `JSON_UNQUOTE()` | -| [Vector function](/vector-search-functions-and-operators.md) | `VEC_L2_DISTANCE`, `VEC_COSINE_DISTANCE`, `VEC_NEGATIVE_INNER_PRODUCT`, `VEC_L1_DISTANCE`, `VEC_DIMS`, `VEC_L2_NORM`, `VEC_AS_TEXT` | +| [Vector function](/vector-search/vector-search-functions-and-operators.md) | `VEC_L2_DISTANCE`, `VEC_COSINE_DISTANCE`, `VEC_NEGATIVE_INNER_PRODUCT`, `VEC_L1_DISTANCE`, `VEC_DIMS`, `VEC_L2_NORM`, `VEC_AS_TEXT` | | [Conversion functions](/functions-and-operators/cast-functions-and-operators.md) | `CAST(int AS DOUBLE), CAST(int AS DECIMAL)`, `CAST(int AS STRING)`, `CAST(int AS TIME)`, `CAST(double AS INT)`, `CAST(double AS DECIMAL)`, `CAST(double AS STRING)`, `CAST(double AS TIME)`, `CAST(string AS INT)`, `CAST(string AS DOUBLE), CAST(string AS DECIMAL)`, `CAST(string AS TIME)`, `CAST(decimal AS INT)`, `CAST(decimal AS STRING)`, `CAST(decimal AS TIME)`, `CAST(decimal AS DOUBLE)`, `CAST(time AS INT)`, `CAST(time AS DECIMAL)`, `CAST(time AS STRING)`, `CAST(time AS REAL)`, `CAST(json AS JSON)`, `CAST(json AS STRING)`, `CAST(int AS JSON)`, `CAST(real AS JSON)`, `CAST(decimal AS JSON)`, `CAST(string AS JSON)`, `CAST(time AS JSON)`, `CAST(duration AS JSON)` | | [Aggregate functions](/functions-and-operators/aggregate-group-by-functions.md) | `MIN()`, `MAX()`, `SUM()`, `COUNT()`, `AVG()`, `APPROX_COUNT_DISTINCT()`, `GROUP_CONCAT()` | | [Miscellaneous functions](/functions-and-operators/miscellaneous-functions.md) | `INET_NTOA()`, `INET_ATON()`, `INET6_NTOA()`, `INET6_ATON()` | diff --git a/vector-search-data-types.md b/vector-search/vector-search-data-types.md similarity index 91% rename from vector-search-data-types.md rename to vector-search/vector-search-data-types.md index 62031f506629d..8020c152df9e0 100644 --- a/vector-search-data-types.md +++ b/vector-search/vector-search-data-types.md @@ -26,7 +26,7 @@ The following Vector data types are currently available: Using vector data types provides the following advantages over using the [`JSON`](/data-type-json.md) type: -- Vector index support: You can build a [vector search index](/vector-search-index.md) to speed up vector searching. +- Vector index support: You can build a [vector search index](/vector-search/vector-search-index.md) to speed up vector searching. - Dimension enforcement: You can specify a dimension to forbid inserting vectors with different dimensions. - Optimized storage format: Vector data types are optimized for handling vector data, offering better space efficiency and performance compared to `JSON` types. @@ -65,9 +65,9 @@ In the following example, because dimension `3` is enforced for the `embedding` ERROR 1105 (HY000): vector has 2 dimensions, does not fit VECTOR(3) ``` -For available functions and operators over the vector data types, see [Vector Functions and Operators](/vector-search-functions-and-operators.md). +For available functions and operators over the vector data types, see [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md). -For more information about building and using a vector search index, see [Vector Search Index](/vector-search-index.md). +For more information about building and using a vector search index, see [Vector Search Index](/vector-search/vector-search-index.md). ## Store vectors with different dimensions @@ -83,11 +83,11 @@ INSERT INTO vector_table VALUES (1, '[0.3, 0.5, -0.1]'); -- 3 dimensions vector, INSERT INTO vector_table VALUES (2, '[0.3, 0.5]'); -- 2 dimensions vector, OK ``` -However, note that you cannot build a [vector search index](/vector-search-index.md) for this column, as vector distances can be only calculated between vectors with the same dimensions. +However, note that you cannot build a [vector search index](/vector-search/vector-search-index.md) for this column, as vector distances can be only calculated between vectors with the same dimensions. ## Comparison -You can compare vector data types using [comparison operators](/functions-and-operators/operators.md) such as `=`, `!=`, `<`, `>`, `<=`, and `>=`. For a complete list of comparison operators and functions for vector data types, see [Vector Functions and Operators](/vector-search-functions-and-operators.md). +You can compare vector data types using [comparison operators](/functions-and-operators/operators.md) such as `=`, `!=`, `<`, `>`, `<=`, and `>=`. For a complete list of comparison operators and functions for vector data types, see [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md). Vector data types are compared element-wise numerically. For example: @@ -231,7 +231,7 @@ You can also explicitly cast a vector to its string representation. Take using t 1 row in set (0.01 sec) ``` -For additional cast functions, see [Vector Functions and Operators](/vector-search-functions-and-operators.md). +For additional cast functions, see [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md). ### Cast between Vector ⇔ other data types @@ -241,7 +241,7 @@ Note that vector data type columns stored in a table cannot be converted to othe ## Restrictions -For restrictions on vector data types, see [Vector search limitations](/vector-search-limitations.md) and [Vector index restrictions](/vector-search-index.md#restrictions). +For restrictions on vector data types, see [Vector search limitations](/vector-search/vector-search-limitations.md) and [Vector index restrictions](/vector-search/vector-search-index.md#restrictions). ## MySQL compatibility @@ -249,6 +249,6 @@ Vector data types are TiDB specific, and are not supported in MySQL. ## See also -- [Vector Functions and Operators](/vector-search-functions-and-operators.md) -- [Vector Search Index](/vector-search-index.md) -- [Improve Vector Search Performance](/vector-search-improve-performance.md) \ No newline at end of file +- [Vector Functions and Operators](/vector-search/vector-search-functions-and-operators.md) +- [Vector Search Index](/vector-search/vector-search-index.md) +- [Improve Vector Search Performance](/vector-search/vector-search-improve-performance.md) \ No newline at end of file diff --git a/vector-search-functions-and-operators.md b/vector-search/vector-search-functions-and-operators.md similarity index 96% rename from vector-search-functions-and-operators.md rename to vector-search/vector-search-functions-and-operators.md index f6ed6449e9567..60ce4b0dec698 100644 --- a/vector-search-functions-and-operators.md +++ b/vector-search/vector-search-functions-and-operators.md @@ -21,7 +21,7 @@ This document lists the functions and operators available for Vector data types. ## Vector functions -The following functions are designed specifically for [Vector data types](/vector-search-data-types.md). +The following functions are designed specifically for [Vector data types](/vector-search/vector-search-data-types.md). **Vector distance functions:** @@ -43,7 +43,7 @@ The following functions are designed specifically for [Vector data types](/vecto ## Extended built-in functions and operators -The following built-in functions and operators are extended to support operations on [Vector data types](/vector-search-data-types.md). +The following built-in functions and operators are extended to support operations on [Vector data types](/vector-search/vector-search-data-types.md). **Arithmetic operators:** @@ -52,7 +52,7 @@ The following built-in functions and operators are extended to support operation | [`+`](https://dev.mysql.com/doc/refman/8.0/en/arithmetic-functions.html#operator_plus) | Vector element-wise addition operator | | [`-`](https://dev.mysql.com/doc/refman/8.0/en/arithmetic-functions.html#operator_minus) | Vector element-wise subtraction operator | -For more information about how vector arithmetic works, see [Vector Data Type | Arithmetic](/vector-search-data-types.md#arithmetic). +For more information about how vector arithmetic works, see [Vector Data Type | Arithmetic](/vector-search/vector-search-data-types.md#arithmetic). **Aggregate (GROUP BY) functions:** @@ -84,7 +84,7 @@ For more information about how vector arithmetic works, see [Vector Data Type | | [`!=`, `<>`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_not-equal) | Not equal operator | | [`NOT IN()`](https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_not-in) | Check whether a value is not within a set of values | -For more information about how vectors are compared, see [Vector Data Type | Comparison](/vector-search-data-types.md#comparison). +For more information about how vectors are compared, see [Vector Data Type | Comparison](/vector-search/vector-search-data-types.md#comparison). **Control flow functions:** @@ -102,7 +102,7 @@ For more information about how vectors are compared, see [Vector Data Type | Com | [`CAST()`](https://dev.mysql.com/doc/refman/8.0/en/cast-functions.html#function_cast) | Cast a value as a string or vector | | [`CONVERT()`](https://dev.mysql.com/doc/refman/8.0/en/cast-functions.html#function_convert) | Cast a value as a string | -For more information about how to use `CAST()`, see [Vector Data Type | Cast](/vector-search-data-types.md#cast). +For more information about how to use `CAST()`, see [Vector Data Type | Cast](/vector-search/vector-search-data-types.md#cast). ## Full references @@ -289,4 +289,4 @@ The vector functions and the extended usage of built-in functions and operators ## See also -- [Vector Data Types](/vector-search-data-types.md) +- [Vector Data Types](/vector-search/vector-search-data-types.md) diff --git a/vector-search-get-started-using-python.md b/vector-search/vector-search-get-started-using-python.md similarity index 92% rename from vector-search-get-started-using-python.md rename to vector-search/vector-search-get-started-using-python.md index 0a39d65a28fc1..6c3c10904a267 100644 --- a/vector-search-get-started-using-python.md +++ b/vector-search/vector-search-get-started-using-python.md @@ -7,7 +7,7 @@ summary: Learn how to quickly develop an AI application that performs semantic s This tutorial demonstrates how to develop a simple AI application that provides **semantic search** features. Unlike traditional keyword search, semantic search intelligently understands the meaning behind your query and returns the most relevant result. For example, if you have documents titled "dog", "fish", and "tree", and you search for "a swimming animal", the application would identify "fish" as the most relevant result. -Throughout this tutorial, you will develop this AI application using [TiDB Vector Search](/vector-search-overview.md), Python, [TiDB Vector SDK for Python](https://github.com/pingcap/tidb-vector-python), and AI models. +Throughout this tutorial, you will develop this AI application using [TiDB Vector Search](/vector-search/vector-search-overview.md), Python, [TiDB Vector SDK for Python](https://github.com/pingcap/tidb-vector-python), and AI models. @@ -69,7 +69,7 @@ pip install sqlalchemy pymysql sentence-transformers tidb-vector python-dotenv ``` - `tidb-vector`: the Python client for interacting with TiDB vector search. -- [`sentence-transformers`](https://sbert.net): a Python library that provides pre-trained models for generating [vector embeddings](/vector-search-overview.md#vector-embedding) from text. +- [`sentence-transformers`](https://sbert.net): a Python library that provides pre-trained models for generating [vector embeddings](/vector-search/vector-search-overview.md#vector-embedding) from text. ### Step 3. Configure the connection string to the TiDB cluster @@ -135,7 +135,7 @@ The following are descriptions for each parameter: ### Step 4. Initialize the embedding model -An [embedding model](/vector-search-overview.md#embedding-model) transforms data into [vector embeddings](/vector-search-overview.md#vector-embedding). This example uses the pre-trained model [**msmarco-MiniLM-L12-cos-v5**](https://huggingface.co/sentence-transformers/msmarco-MiniLM-L12-cos-v5) for text embedding. This lightweight model, provided by the `sentence-transformers` library, transforms text data into 384-dimensional vector embeddings. +An [embedding model](/vector-search/vector-search-overview.md#embedding-model) transforms data into [vector embeddings](/vector-search/vector-search-overview.md#vector-embedding). This example uses the pre-trained model [**msmarco-MiniLM-L12-cos-v5**](https://huggingface.co/sentence-transformers/msmarco-MiniLM-L12-cos-v5) for text embedding. This lightweight model, provided by the `sentence-transformers` library, transforms text data into 384-dimensional vector embeddings. To set up the model, copy the following code into the `example.py` file. This code initializes a `SentenceTransformer` instance and defines a `text_to_embedding()` function for later use. @@ -247,5 +247,5 @@ Therefore, according to the output, the swimming animal is most likely a fish, o ## See also -- [Vector Data Types](/vector-search-data-types.md) -- [Vector Search Index](/vector-search-index.md) \ No newline at end of file +- [Vector Data Types](/vector-search/vector-search-data-types.md) +- [Vector Search Index](/vector-search/vector-search-index.md) \ No newline at end of file diff --git a/vector-search-get-started-using-sql.md b/vector-search/vector-search-get-started-using-sql.md similarity index 90% rename from vector-search-get-started-using-sql.md rename to vector-search/vector-search-get-started-using-sql.md index 9c3d493647daa..3f5ac4b504336 100644 --- a/vector-search-get-started-using-sql.md +++ b/vector-search/vector-search-get-started-using-sql.md @@ -5,7 +5,7 @@ summary: Learn how to quickly get started with Vector Search in TiDB using SQL s # Get Started with Vector Search via SQL -TiDB extends MySQL syntax to support [Vector Search](/vector-search-overview.md) and introduce new [Vector data types](/vector-search-data-types.md) and several [vector functions](/vector-search-functions-and-operators.md). +TiDB extends MySQL syntax to support [Vector Search](/vector-search/vector-search-overview.md) and introduce new [Vector data types](/vector-search/vector-search-data-types.md) and several [vector functions](/vector-search/vector-search-functions-and-operators.md). This tutorial demonstrates how to get started with TiDB Vector Search just using SQL statements. You will learn how to use the [MySQL command-line client](https://dev.mysql.com/doc/refman/8.4/en/mysql.html) to complete the following operations: @@ -90,7 +90,7 @@ mysql --comments --host 127.0.0.1 --port 4000 -u root ### Step 2. Create a vector table -When creating a table, you can define a column as a [vector](/vector-search-overview.md#vector-embedding) column by specifying the `VECTOR` data type. +When creating a table, you can define a column as a [vector](/vector-search/vector-search-overview.md#vector-embedding) column by specifying the `VECTOR` data type. For example, to create a table `embedded_documents` with a three-dimensional `VECTOR` column, execute the following SQL statements using your MySQL CLI: @@ -113,7 +113,7 @@ Query OK, 0 rows affected (0.27 sec) ### Step 3. Insert vector embeddings to the table -Insert three documents with their [vector embeddings](/vector-search-overview.md#vector-embedding) into the `embedded_documents` table: +Insert three documents with their [vector embeddings](/vector-search/vector-search-overview.md#vector-embedding) into the `embedded_documents` table: ```sql INSERT INTO embedded_documents @@ -134,7 +134,7 @@ Records: 3 Duplicates: 0 Warnings: 0 > > This example simplifies the dimensions of the vector embeddings and uses only 3-dimensional vectors for demonstration purposes. > -> In real-world applications, [embedding models](/vector-search-overview.md#embedding-model) often produce vector embeddings with hundreds or thousands of dimensions. +> In real-world applications, [embedding models](/vector-search/vector-search-overview.md#embedding-model) often produce vector embeddings with hundreds or thousands of dimensions. ### Step 4. Query the vector table @@ -191,5 +191,5 @@ Therefore, according to the output, the swimming animal is most likely a fish, o ## See also -- [Vector Data Types](/vector-search-data-types.md) -- [Vector Search Index](/vector-search-index.md) +- [Vector Data Types](/vector-search/vector-search-data-types.md) +- [Vector Search Index](/vector-search/vector-search-index.md) diff --git a/vector-search-improve-performance.md b/vector-search/vector-search-improve-performance.md similarity index 91% rename from vector-search-improve-performance.md rename to vector-search/vector-search-improve-performance.md index a723a4af95927..09e13adda85ba 100644 --- a/vector-search-improve-performance.md +++ b/vector-search/vector-search-improve-performance.md @@ -21,11 +21,11 @@ TiDB Vector Search enables you to perform Approximate Nearest Neighbor (ANN) que ## Add vector search index for vector columns -The [vector search index](/vector-search-index.md) dramatically improves the performance of vector search queries, usually by 10x or more, with a trade-off of only a small decrease of recall rate. +The [vector search index](/vector-search/vector-search-index.md) dramatically improves the performance of vector search queries, usually by 10x or more, with a trade-off of only a small decrease of recall rate. ## Ensure vector indexes are fully built -After you insert a large volume of vector data, some of it might be in the Delta layer waiting for persistence. The vector index for such data will be built after the data is persisted. Until all vector data is indexed, vector search performance is suboptimal. To check the index build progress, see [View index build progress](/vector-search-index.md#view-index-build-progress). +After you insert a large volume of vector data, some of it might be in the Delta layer waiting for persistence. The vector index for such data will be built after the data is persisted. Until all vector data is indexed, vector search performance is suboptimal. To check the index build progress, see [View index build progress](/vector-search/vector-search-index.md#view-index-build-progress). ## Reduce vector dimensions or shorten embeddings diff --git a/vector-search-index.md b/vector-search/vector-search-index.md similarity index 97% rename from vector-search-index.md rename to vector-search/vector-search-index.md index 828cd2accf3d2..c5bd4021c520f 100644 --- a/vector-search-index.md +++ b/vector-search/vector-search-index.md @@ -7,7 +7,7 @@ summary: Learn how to build and use the vector search index to accelerate K-Near K-nearest neighbors (KNN) search is the method for finding the K closest points to a given point in a vector space. The most straightforward approach to perform KNN search is a brute force search, which calculates the distance between the given vector and all other vectors in the space. This approach guarantees perfect accuracy, but it is usually too slow for real-world use. Therefore, approximate algorithms are commonly used in KNN search to enhance speed and efficiency. -In TiDB, you can create and use vector search indexes for such approximate nearest neighbor (ANN) searches over columns with [vector data types](/vector-search-data-types.md). By using vector search indexes, vector search queries could be finished in milliseconds. +In TiDB, you can create and use vector search indexes for such approximate nearest neighbor (ANN) searches over columns with [vector data types](/vector-search/vector-search-data-types.md). By using vector search indexes, vector search queries could be finished in milliseconds. @@ -39,7 +39,7 @@ Currently, TiDB supports the [HNSW (Hierarchical Navigable Small World)](https:/ [HNSW](https://en.wikipedia.org/wiki/Hierarchical_navigable_small_world) is one of the most popular vector indexing algorithms. The HNSW index provides good performance with relatively high accuracy, up to 98% in specific cases. -In TiDB, you can create an HNSW index for a column with a [vector data type](/vector-search-data-types.md) in either of the following ways: +In TiDB, you can create an HNSW index for a column with a [vector data type](/vector-search/vector-search-data-types.md) in either of the following ways: - When creating a table, use the following syntax to specify the vector column for the HNSW index: @@ -259,5 +259,5 @@ See [`EXPLAIN`](/sql-statements/sql-statement-explain.md), [`EXPLAIN ANALYZE`](/ ## See also -- [Improve Vector Search Performance](/vector-search-improve-performance.md) -- [Vector Data Types](/vector-search-data-types.md) +- [Improve Vector Search Performance](/vector-search/vector-search-improve-performance.md) +- [Vector Data Types](/vector-search/vector-search-data-types.md) diff --git a/vector-search-integrate-with-django-orm.md b/vector-search/vector-search-integrate-with-django-orm.md similarity index 97% rename from vector-search-integrate-with-django-orm.md rename to vector-search/vector-search-integrate-with-django-orm.md index 5cbdaea4f893b..c90b80a3b24a1 100644 --- a/vector-search-integrate-with-django-orm.md +++ b/vector-search/vector-search-integrate-with-django-orm.md @@ -5,7 +5,7 @@ summary: Learn how to integrate TiDB Vector Search with Django ORM to store embe # Integrate TiDB Vector Search with Django ORM -This tutorial walks you through how to use [Django](https://www.djangoproject.com/) ORM to interact with the [TiDB Vector Search](/vector-search-overview.md), store embeddings, and perform vector search queries. +This tutorial walks you through how to use [Django](https://www.djangoproject.com/) ORM to interact with the [TiDB Vector Search](/vector-search/vector-search-overview.md), store embeddings, and perform vector search queries. @@ -276,5 +276,5 @@ results = Document.objects.annotate( ## See also -- [Vector Data Types](/vector-search-data-types.md) -- [Vector Search Index](/vector-search-index.md) +- [Vector Data Types](/vector-search/vector-search-data-types.md) +- [Vector Search Index](/vector-search/vector-search-index.md) diff --git a/vector-search-integrate-with-jinaai-embedding.md b/vector-search/vector-search-integrate-with-jinaai-embedding.md similarity index 98% rename from vector-search-integrate-with-jinaai-embedding.md rename to vector-search/vector-search-integrate-with-jinaai-embedding.md index 5a3b1abd4d96e..3e132a87a2838 100644 --- a/vector-search-integrate-with-jinaai-embedding.md +++ b/vector-search/vector-search-integrate-with-jinaai-embedding.md @@ -291,5 +291,5 @@ with Session(engine) as session: ## See also -- [Vector Data Types](/vector-search-data-types.md) -- [Vector Search Index](/vector-search-index.md) +- [Vector Data Types](/vector-search/vector-search-data-types.md) +- [Vector Search Index](/vector-search/vector-search-index.md) diff --git a/vector-search-integrate-with-langchain.md b/vector-search/vector-search-integrate-with-langchain.md similarity index 99% rename from vector-search-integrate-with-langchain.md rename to vector-search/vector-search-integrate-with-langchain.md index 0ad227c364e05..f4fd806cd833c 100644 --- a/vector-search-integrate-with-langchain.md +++ b/vector-search/vector-search-integrate-with-langchain.md @@ -5,7 +5,7 @@ summary: Learn how to integrate TiDB Vector Search with LangChain. # Integrate Vector Search with LangChain -This tutorial demonstrates how to integrate the [vector search](/vector-search-overview.md) feature of TiDB with [LangChain](https://python.langchain.com/). +This tutorial demonstrates how to integrate the [vector search](/vector-search/vector-search-overview.md) feature of TiDB with [LangChain](https://python.langchain.com/). @@ -650,5 +650,5 @@ The expected output is as follows: ## See also -- [Vector Data Types](/vector-search-data-types.md) -- [Vector Search Index](/vector-search-index.md) +- [Vector Data Types](/vector-search/vector-search-data-types.md) +- [Vector Search Index](/vector-search/vector-search-index.md) diff --git a/vector-search-integrate-with-llamaindex.md b/vector-search/vector-search-integrate-with-llamaindex.md similarity index 98% rename from vector-search-integrate-with-llamaindex.md rename to vector-search/vector-search-integrate-with-llamaindex.md index 1aaff4c6a4f2d..e074a46eaf361 100644 --- a/vector-search-integrate-with-llamaindex.md +++ b/vector-search/vector-search-integrate-with-llamaindex.md @@ -5,7 +5,7 @@ summary: Learn how to integrate TiDB Vector Search with LlamaIndex. # Integrate Vector Search with LlamaIndex -This tutorial demonstrates how to integrate the [vector search](/vector-search-overview.md) feature of TiDB with [LlamaIndex](https://www.llamaindex.ai). +This tutorial demonstrates how to integrate the [vector search](/vector-search/vector-search-overview.md) feature of TiDB with [LlamaIndex](https://www.llamaindex.ai). @@ -330,5 +330,5 @@ Empty Response ## See also -- [Vector Data Types](/vector-search-data-types.md) -- [Vector Search Index](/vector-search-index.md) +- [Vector Data Types](/vector-search/vector-search-data-types.md) +- [Vector Search Index](/vector-search/vector-search-index.md) diff --git a/vector-search-integrate-with-peewee.md b/vector-search/vector-search-integrate-with-peewee.md similarity index 97% rename from vector-search-integrate-with-peewee.md rename to vector-search/vector-search-integrate-with-peewee.md index 8842ca2e68269..394bf233edd4f 100644 --- a/vector-search-integrate-with-peewee.md +++ b/vector-search/vector-search-integrate-with-peewee.md @@ -5,7 +5,7 @@ summary: Learn how to integrate TiDB Vector Search with peewee to store embeddin # Integrate TiDB Vector Search with peewee -This tutorial walks you through how to use [peewee](https://docs.peewee-orm.com/) to interact with the [TiDB Vector Search](/vector-search-overview.md), store embeddings, and perform vector search queries. +This tutorial walks you through how to use [peewee](https://docs.peewee-orm.com/) to interact with the [TiDB Vector Search](/vector-search/vector-search-overview.md), store embeddings, and perform vector search queries. @@ -266,5 +266,5 @@ results = Document.select(Document, distance).where(distance_expression < 0.2).o ## See also -- [Vector Data Types](/vector-search-data-types.md) -- [Vector Search Index](/vector-search-index.md) +- [Vector Data Types](/vector-search/vector-search-data-types.md) +- [Vector Search Index](/vector-search/vector-search-index.md) diff --git a/vector-search-integrate-with-sqlalchemy.md b/vector-search/vector-search-integrate-with-sqlalchemy.md similarity index 97% rename from vector-search-integrate-with-sqlalchemy.md rename to vector-search/vector-search-integrate-with-sqlalchemy.md index 93965e454c6d7..ad2a49c790651 100644 --- a/vector-search-integrate-with-sqlalchemy.md +++ b/vector-search/vector-search-integrate-with-sqlalchemy.md @@ -5,7 +5,7 @@ summary: Learn how to integrate TiDB Vector Search with SQLAlchemy to store embe # Integrate TiDB Vector Search with SQLAlchemy -This tutorial walks you through how to use [SQLAlchemy](https://www.sqlalchemy.org/) to interact with [TiDB Vector Search](/vector-search-overview.md), store embeddings, and perform vector search queries. +This tutorial walks you through how to use [SQLAlchemy](https://www.sqlalchemy.org/) to interact with [TiDB Vector Search](/vector-search/vector-search-overview.md), store embeddings, and perform vector search queries. @@ -237,5 +237,5 @@ with Session(engine) as session: ## See also -- [Vector Data Types](/vector-search-data-types.md) -- [Vector Search Index](/vector-search-index.md) +- [Vector Data Types](/vector-search/vector-search-data-types.md) +- [Vector Search Index](/vector-search/vector-search-index.md) diff --git a/vector-search-integration-overview.md b/vector-search/vector-search-integration-overview.md similarity index 94% rename from vector-search-integration-overview.md rename to vector-search/vector-search-integration-overview.md index d856ce4977c7d..01edddbed0b57 100644 --- a/vector-search-integration-overview.md +++ b/vector-search/vector-search-integration-overview.md @@ -25,8 +25,8 @@ TiDB provides official support for the following AI frameworks, enabling you to | AI frameworks | Tutorial | |---------------|---------------------------------------------------------------------------------------------------| -| Langchain | [Integrate Vector Search with LangChain](/vector-search-integrate-with-langchain.md) | -| LlamaIndex | [Integrate Vector Search with LlamaIndex](/vector-search-integrate-with-llamaindex.md) | +| Langchain | [Integrate Vector Search with LangChain](/vector-search/vector-search-integrate-with-langchain.md) | +| LlamaIndex | [Integrate Vector Search with LlamaIndex](/vector-search/vector-search-integrate-with-llamaindex.md) | Moreover, you can also use TiDB for various purposes, such as document storage and knowledge graph storage for AI applications. @@ -40,7 +40,7 @@ The following table lists some mainstream embedding service providers and the co | Embedding service providers | Tutorial | |-----------------------------|---------------------------------------------------------------------------------------------------------------------| -| Jina AI | [Integrate Vector Search with Jina AI Embeddings API](/vector-search-integrate-with-jinaai-embedding.md) | +| Jina AI | [Integrate Vector Search with Jina AI Embeddings API](/vector-search/vector-search-integrate-with-jinaai-embedding.md) | ## Object Relational Mapping (ORM) libraries diff --git a/vector-search-limitations.md b/vector-search/vector-search-limitations.md similarity index 93% rename from vector-search-limitations.md rename to vector-search/vector-search-limitations.md index 063ddcdd4186c..6d3ede16bb1a8 100644 --- a/vector-search-limitations.md +++ b/vector-search/vector-search-limitations.md @@ -21,7 +21,7 @@ This document describes the known limitations of TiDB vector search. ## Vector data type limitations -- Each [vector](/vector-search-data-types.md) supports up to 16383 dimensions. +- Each [vector](/vector-search/vector-search-data-types.md) supports up to 16383 dimensions. - Vector data types cannot store `NaN`, `Infinity`, or `-Infinity` values. - Vector data types cannot store double-precision floating-point numbers. If you insert or store double-precision floating-point numbers in vector columns, TiDB converts them to single-precision floating-point numbers. - Vector columns cannot be used as primary keys or as part of a primary key. @@ -31,7 +31,7 @@ This document describes the known limitations of TiDB vector search. ## Vector index limitations -See [Vector search restrictions](/vector-search-index.md#restrictions). +See [Vector search restrictions](/vector-search/vector-search-index.md#restrictions). ## Compatibility with TiDB tools diff --git a/vector-search-overview.md b/vector-search/vector-search-overview.md similarity index 86% rename from vector-search-overview.md rename to vector-search/vector-search-overview.md index 9d149fbb159ff..147f7554d9280 100644 --- a/vector-search-overview.md +++ b/vector-search/vector-search-overview.md @@ -43,7 +43,7 @@ A vector embedding, also known as an embedding, is a sequence of numbers that re Vector embeddings are essential in machine learning and serve as the foundation for semantic similarity searches. -TiDB introduces [Vector data types](/vector-search-data-types.md) and [Vector search index](/vector-search-index.md) designed to optimize the storage and retrieval of vector embeddings, enhancing their use in AI applications. You can store vector embeddings in TiDB and perform vector search queries to find the most relevant data using these data types. +TiDB introduces [Vector data types](/vector-search/vector-search-data-types.md) and [Vector search index](/vector-search/vector-search-index.md) designed to optimize the storage and retrieval of vector embeddings, enhancing their use in AI applications. You can store vector embeddings in TiDB and perform vector search queries to find the most relevant data using these data types. ### Embedding model @@ -57,7 +57,7 @@ To learn how to generate vector embeddings for your specific data types, refer t After converting raw data into vector embeddings and storing them in TiDB, your application can execute vector search queries to find the data most semantically or contextually relevant to a user's query. -TiDB vector search identifies the top-k nearest neighbor (KNN) vectors by using a [distance function](/vector-search-functions-and-operators.md) to calculate the distance between the given vector and vectors stored in the database. The vectors closest to the given vector in the query represent the most similar data in meaning. +TiDB vector search identifies the top-k nearest neighbor (KNN) vectors by using a [distance function](/vector-search/vector-search-functions-and-operators.md) to calculate the distance between the given vector and vectors stored in the database. The vectors closest to the given vector in the query represent the most similar data in meaning. ![The Schematic TiDB Vector Search](/media/vector-search/embedding-search.png) @@ -84,5 +84,5 @@ A recommendation engine is a system that proactively suggests content, products, To get started with TiDB Vector Search, see the following documents: -- [Get started with vector search using Python](/vector-search-get-started-using-python.md) -- [Get started with vector search using SQL](/vector-search-get-started-using-sql.md) +- [Get started with vector search using Python](/vector-search/vector-search-get-started-using-python.md) +- [Get started with vector search using SQL](/vector-search/vector-search-get-started-using-sql.md)