Find answers from the community

Updated 3 months ago

Hey all, I’m facing an issue with

Hey all, I’m facing an issue with getting the embeddings using SemanticSplitterNodeParser. The nodes are generated properly, but I can’t seem to get the embeddings! It’s returning None.

Plain Text
Settings.llm = OpenAI(model="gpt-4-0613")
Settings.embed_model = OpenAIEmbedding(model="text-embedding-3-small")

splitter = SemanticSplitterNodeParser(
    buffer_size=1,
    breakpoint_percentile_threshold=90,
    embed_model=Settings.embed_model
)

# Obtain nodes and embeddings from the documents
nodes = splitter.build_semantic_nodes_from_documents(documents)

# Extract embeddings from nodes
embeddings = [node.embedding for node in nodes]

embeddings


Output:
Plain Text
[None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None]


Does anyone have any idea why this is returning None? Is there something I’m missing here?
L
2 comments
Semantic splitter isn't actually setting the embeddings for nodes, that would be the next step
Which is actually using an embedding model to embed your final nodes
Add a reply
Sign up and join the conversation on Discord