run-llama / llama_index

LlamaIndex is a data framework for your LLM applications
https://docs.llamaindex.ai
MIT License
35.21k stars 4.94k forks source link

[Question]: is there a way to emit all the chunks and similarity score from llamaindex ? #14183

Open vkaul11 opened 2 months ago

vkaul11 commented 2 months ago

Question Validation

Question

I wanted to get all the chunks with similarity score using VectorStoreIndex. Is it possible?

logan-markewich commented 2 months ago

Set the top k to 10000 and retrieve?

retriever = index.as_retriever(similarity_top_k=10000)
nodes = retriever.retrieve("query")
vkaul11 commented 2 months ago

Doesn't work

logan-markewich commented 2 months ago

What do you mean doesn't work lol? You'll have to give more info than that