Find answers from the community

Updated 3 months ago

```

Plain Text
node_parser = SentenceSplitter(chunk_size=512,chunk_overlap=20)
base_nodes = node_parser.get_nodes_from_documents(documents,show_progress=True)
base_index = VectorStoreIndex(base_nodes, service_context=service_context)
base_retriever = base_index.as_retriever(similarity_top_k=2)

is this code block same as
Plain Text
service_context = ServiceContext.from_defaults(embed_model=embed_model,chunk_size=512,llm=llm)
index = VectorStoreIndex.from_documents(
    documents, storage_context=storage_context, service_context=service_context
)
L
F
2 comments
I think the default chunk overlap is slightly bigger if you don't specify it, but it's equivalent besides that
Add a reply
Sign up and join the conversation on Discord