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.
@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))