Find answers from the community

Updated 9 months ago

How can I specify the chunk size when

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)?
L
b
2 comments
Settings.chunk_size does change the chunk size.

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)])
Thanks πŸ™‚
Add a reply
Sign up and join the conversation on Discord