>>> from llama_index import VectorStoreIndex, SimpleDirectoryReader >>> from llama_index.retrievers import VectorIndexRetriever >>> documents = SimpleDirectoryReader("./data/paul_graham").load_data() >>> index = VectorStoreIndex.from_documents(documents) >>> node_ids = list(index.docstore.docs.keys()) >>> nodes = VectorIndexRetriever(index, similarity_top_k=10, node_ids=node_ids[:2]).retrieve("hello") >>> nodes[0].node.node_id 'ec5966b8-7e20-44fd-8b23-a458174ad138' >>> node_ids[:2] ['ec5966b8-7e20-44fd-8b23-a458174ad138', '62515e3a-5caa-4930-beb4-2adaf35a9e70'] >>> nodes[1].node.node_id '62515e3a-5caa-4930-beb4-2adaf35a9e70' >>> nodes[2].node.node_id Traceback (most recent call last): File "<stdin>", line 1, in <module> IndexError: list index out of range >>>