from llama_index import ServiceContext, VectorStoreIndex, Document service_context = ServiceContext.from_defaults(llm=None, embed_model=None) index = VectorStoreIndex.from_documents([Document.example()], service_context=service_context) retriever = index.as_retriever() nodes = retriever.retrieve("query")