The community member is asking how to specify the chunk size when creating a Neo4j knowledge graph RAG script. They note that before the v010 update, the chunk size was specified in the service context, but now they see "settings.chunk_size" which does not seem to have any effect on the stored graph.
In the comments, another community member suggests that "settings.chunk_size" does change the chunk size, and they can also more explicitly pass in the node parser. They provide an example using the SentenceSplitter transformation with a chunk size of 512 and a chunk overlap of 20.
There is no explicitly marked answer in the comments.
How can I specify the chunk size when creating a neo4j knowledge graph rag script? Before the v010 update, you specified chunk_size in the service context. Now I see you write settings.chunk_size but this seems to have no effect on the graph stored in neo4j. How can I explicitly provide the chunk size to one of the classes (possibly the KnowlegeGraphIndex)?
You can also more explictly pass in the node parser. It may or may not change the triplets being extracted though
Plain Text
from llama_index.core.node_parser import SentenceSplitter
index = KnowledgeGraphIndex.from_documents(..., transformations=[SentenceSplitter(chunk_size=512, chunk_overlap=20)])