mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-04 01:01:26 +08:00
* fix(rag): keep figure captions out of the chunk metadata budget Figure documents carried the caption, asset ids, bbox, source locator and absolute path in metadata that LlamaIndex counts against every chunk. A long caption (common for CJK textbook figures) pushed the metadata past the default 512-token chunk size, so SentenceSplitter raised "Metadata length (...) is longer than chunk size (512)" and the whole indexing run failed. Keep those keys on the node for citations and pixel delivery, but exclude them from the embed and LLM metadata text. The caption is already part of the document text, so retrieval content is unchanged. Closes #2865 * test(rag): split sentences without NLTK in the caption budget test The new regression test ran SentenceSplitter with its default punkt tokenizer, which loads NLTK data. CI runners refuse that data, so the test failed with LookupError on all Python versions. Pass a regex sentence splitter instead. The test still fails without the loader fix.