What's wrong with this chunking and how can I fix it? Return JSON {"problem": "problem", "fix": "how to fix"}.
RAG starts with cutting documents into pieces (chunks) - it’s impossible to put the entire database into context (it’s expensive and won’t fit). The way you cut it, it will be found. Chunks that are too large blur the meaning and burn tokens; too small ones lose context (a piece of a sentence without support). Good practice: cut along semantic boundaries (paragraphs, sections), and not blindly according to characters, and add an overlap (overlap) so that the idea at the junction of two chunks is not lost. Metadata (source, section) is attached to each chunk for filtering and references. Bad chunking is the main reason why "RAG doesn't find the obvious."