Complete the code to import the correct chunking class from LangChain.
from langchain.text_splitter import [1]
The SemanticTextSplitter is used for semantic chunking strategies in LangChain.
Complete the code to create a semantic text splitter with a chunk size of 500.
splitter = SemanticTextSplitter(chunk_size=[1])Setting chunk_size=500 creates chunks of 500 characters or tokens for semantic splitting.
Fix the error in the code to split text semantically using the splitter.
chunks = splitter.[1](text)The correct method to split text in LangChain's splitter is split_text.
Fill both blanks to create a semantic splitter with chunk size 400 and chunk overlap 50.
splitter = SemanticTextSplitter(chunk_size=[1], chunk_overlap=[2])
Chunk size is set to 400 and chunk overlap to 50 for better semantic chunking.
Fill all three blanks to import, create, and split text semantically.
from langchain.text_splitter import [1] splitter = [2](chunk_size=300, chunk_overlap=20) chunks = splitter.[3](document)
First import SemanticTextSplitter, then create an instance, and finally call split_text to split the document.