Find answers from the community

Updated 4 months ago

Has anyone ever gotten an error like

At a glance

The community member is experiencing an error when using the .retrieve method in the LlamaIndex library, specifically an "kth(=-12) out of bounds (13)" error. Other community members suggest that the issue may be related to the use of Voyage embeddings, and recommend checking the full traceback. One community member notes that they encountered a similar issue when specifying a top_k value greater than the number of nodes, and solved it by using top_k = min(top_k, len(nodes)). The community agrees that LlamaIndex should handle this case automatically, and one member suggests adding this functionality to the library.

Has anyone ever gotten an error like this kth(=-12) out of bounds (13)?? I am getting this error when using .retrieve in llamaindex.
L
B
s
11 comments
are you using local embeddings?
no I am using Voyage embeddings. Could it from that?
maybe? Do you have the full traceback handy?
@Logan M how do I enable that?
Uhhh it should just happen automatically lol
Usually there's just a big stack trace when things error out in python
@BioHacker This just happened to me. I was specifying a top_k value that was greater than the number of nodes. Solved it with top_k = min(top_k, len(nodes))
Seems like LlamaIndex should just do that for us, though.
Oh great thank you so much.
I figured it had to do with that but I got busy with something else and didn’t get a chance to debug.
@Logan M would be great to add this to the library
Add a reply
Sign up and join the conversation on Discord