Find answers from the community

Home
Members
DecisivePacSF
D
DecisivePacSF
Offline, last seen 3 months ago
Joined September 25, 2024
HI folks,
What exactly happens when I create a Vector Store and a Storage context? Do i need to recreate this object every time I want to upsert something into Pinecone or can I create the vector store and storage context once and create a VectorStoreIndex every time I am upserting chunks?
1 comment
L
D
DecisivePacSF
·

Chunk

Hi @Logan M ,
I have performed semantic chunking for a document. I want to use the hierarchical node parser - but i don't want it to perform chunking.
Instead, i want it to just create hierarchies and the KG using my predefined list of nodes and save the metadata. Is this possible?
9 comments
D
L
D
DecisivePacSF
·

Hi all,

Hi all,
I believe theres a bug when you use SentenceWindowNodeParser with a custom SentenceSplitter.

Plain Text
sentence_splitter = SentenceSplitter.from_defaults(
    secondary_chunking_regex=r"[^,.;。?!\n]+([,.;。?!\n]|\.{2,})?"
)

# Initialize the SentenceWindowNodeParser with the custom SentenceSplitter
node_parser = SentenceWindowNodeParser.from_defaults(
    window_size=3,
    window_metadata_key="window",
    original_text_metadata_key="original_text",
    sentence_splitter=sentence_splitter
)
nodes = node_parser.get_nodes_from_documents(documents)


I get an error
AttributeError: 'str' object has no attribute 'id_'

In the node_parser step, when I do not give a sentence splitter everything works as intended. Can someone help out?
2 comments
D
L