Find answers from the community

Updated 3 months ago

when i try to retreive the nodes from

when i try to retreive the nodes from index and use them in bm25 retriever, i keep getting error
r
a
2 comments
empty dictionary for node_mappings, it could be due to a few reasons:

  1. The get_base_nodes_and_mappings method might not be finding any mappings in your raw_nodes. This could be because the raw_nodes are not in the expected format, or they don't contain any mappable data.
  1. There might be an issue with the UnstructuredElementNodeParser class itself. If there's a bug in the get_base_nodes_and_mappings method, it might not be able to extract the mappings correctly.
  1. The data you're getting from reader.load_data(Path(file)) might not be in the correct format for UnstructuredElementNodeParser. If the FlatReader class isn't reading the file correctly, or if the file doesn't contain the expected data, this could result in an empty node_mappings dictionary.
Here are a few things you could try:

  1. Print out the raw_nodes and data variables to check their values. This can help you determine if the issue is with the data you're providing to UnstructuredElementNodeParser.
  1. Try using a different file with known good data. If you get the expected node_mappings with this file, it could indicate that there's an issue with the original file you were using.
let me check, thank u
Add a reply
Sign up and join the conversation on Discord