diff --git a/llama-index-core/llama_index/core/node_parser/text/semantic_splitter.py b/llama-index-core/llama_index/core/node_parser/text/semantic_splitter.py index e5054ac8cc89eef54d7f40bd0dc1f144dcad9270..6e4760a7b5e85d21d893a435d6d7d4ddba622e49 100644 --- a/llama-index-core/llama_index/core/node_parser/text/semantic_splitter.py +++ b/llama-index-core/llama_index/core/node_parser/text/semantic_splitter.py @@ -227,13 +227,11 @@ class SemanticSplitterNodeParser(NodeParser): start_index = 0 for index in indices_above_threshold: - end_index = index - 1 - - group = sentences[start_index : end_index + 1] + group = sentences[start_index : index + 1] combined_text = "".join([d["sentence"] for d in group]) chunks.append(combined_text) - start_index = index + start_index = index + 1 if start_index < len(sentences): combined_text = "".join(