-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Overview
Optimize the chunking and embedding strategy used by the RAG system (Retrieval Augmented Generation) to improve retrieval accuracy and context density.
Why?
- Well-chosen chunk sizes and strategies increase recall and reduce irrelevant retrievals
- Avoids missing relevant information when context is cut off by chunk boundaries
- Aligns with 2025–2026 industry best practices (Reference 2)
Implementation Plan
- Backend (Node/Express)
- Audit all code producing embeddings for
classification_history. - Experiment with different chunk sizes (e.g., 256, 512, 1024 tokens) and overlaps.
- Benchmark chunking strategies using real-world classification history:
- Field-based (title, genres, overview, studio)
- Sentence or windowed document chunking (sliding window)
- Update
embeddingService.formatForEmbedding()and related data generators. - Consider late fusion (retrieve on each field, then combine results) or weighted concatenation.
- Example code adjustment:
// Inside embeddingService.formatForEmbedding() const combined = [metadata.title, metadata.genres, metadata.overview].join(' '); // Optionally, use weights per field or windowed slices
- Expose chunking parameters in AI settings for admin tuning.
- Audit all code producing embeddings for
- QA & Validation
- Design experiments measuring retrieval precision/recall as chunk size/overlap is modified
- Document best settings for your media collection size/type
References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request