article_embedding_chunks

Description

Table Definition
CREATE TABLE `article_embedding_chunks` (
  `chunk_id` char(36) NOT NULL DEFAULT (uuid()),
  `article_id` char(36) NOT NULL,
  `chunk_index` int unsigned NOT NULL,
  `heading` varchar(1000) DEFAULT NULL,
  `content` longtext NOT NULL,
  `token_count` int unsigned NOT NULL,
  `chunking_version` varchar(64) NOT NULL,
  `source_hash` char(64) NOT NULL,
  `embedding` vector(2048) NOT NULL,
  `created_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  PRIMARY KEY (`chunk_id`) /*T![clustered_index] CLUSTERED */,
  UNIQUE KEY `uq_article_embedding_chunks_article_index` (`article_id`,`chunk_index`),
  VECTOR INDEX `idx_article_embedding_chunks_embedding`((VEC_COSINE_DISTANCE(`embedding`)))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin

Columns

Name

Type

Default

Nullable

Extra Definition

Children

Parents

Comment

chunk_id

char(36)

uuid()

false

DEFAULT_GENERATED

article_id

char(36)

false

chunk_index

int unsigned

false

heading

varchar(1000)

true

content

longtext

false

token_count

int unsigned

false

chunking_version

varchar(64)

false

source_hash

char(64)

false

embedding

vector(2048)

false

created_at

datetime(6)

CURRENT_TIMESTAMP(6)

false

Constraints

Name

Type

Definition

PRIMARY

PRIMARY KEY

PRIMARY KEY (chunk_id)

uq_article_embedding_chunks_article_index

UNIQUE

UNIQUE KEY uq_article_embedding_chunks_article_index (article_id, chunk_index)

Indexes

Name

Definition

PRIMARY

PRIMARY KEY (chunk_id) USING BTREE

uq_article_embedding_chunks_article_index

UNIQUE KEY uq_article_embedding_chunks_article_index (article_id, chunk_index) USING BTREE

idx_article_embedding_chunks_embedding

KEY idx_article_embedding_chunks_embedding (embedding) USING BTREE

Relations

        erDiagram


"article_embedding_chunks" {
  char_36_ chunk_id PK
}
    

Generated by tbls