From 212ac3bc0e956a46a4806042035e12d421e4df90 Mon Sep 17 00:00:00 2001 From: yiling Date: Thu, 18 Jun 2026 19:46:50 +0800 Subject: [PATCH] docs(search): add detail about video chunking and configuration to semantic search docs --- docs/using-shumai/semantic-search.mdx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/using-shumai/semantic-search.mdx b/docs/using-shumai/semantic-search.mdx index 589f582d..fe0c2cc7 100644 --- a/docs/using-shumai/semantic-search.mdx +++ b/docs/using-shumai/semantic-search.mdx @@ -12,7 +12,10 @@ Traditional search relies on matching exact characters (e.g., searching "dog" wi Semantic search translates text queries and file contents into conceptual profiles. Similar ideas and visuals are mapped near each other. 1. **Index Generation**: When you upload an asset, Shumai's background agent scans the file's visual elements, text contents, or descriptions, translating them into a concept profile. - - **Video Processing**: Shumai uses **gemini-embedding-2** for video indexing. This model processes a maximum of 32 frames per video: short videos (≤32s) are sampled at 1 fps, while longer videos are uniformly sampled to 32 frames. Note that audio tracks are not processed. + - **Video Processing**: Shumai uses **gemini-embedding-2** for video indexing. + - **Chunking**: For long videos, Shumai breaks them into chunks to ensure high-quality indexing. By default, chunks are **60 seconds** long with a **5-second overlap** to ensure no context is lost at the boundaries. + - **Sampling**: The model processes a maximum of 32 frames per chunk: short chunks (≤32s) are sampled at 1 fps, while longer chunks are uniformly sampled to 32 frames. Note that audio tracks are not processed. + - **Configuration**: Administrators can customize these settings using the `EMBEDDING_CHUNK_DURATION` and `EMBEDDING_CHUNK_OVERLAP` environment variables. 2. **Concept Matching**: When you search with the "Semantic" toggle enabled, Shumai matches the conceptual meaning of your query against your assets. 3. **Result**: Searching "sunset at the beach" will successfully find a video file of ocean waves at dusk, even if the filename is `IMG_4029.mp4`.