Find answers from the community

Updated 5 months ago

Hi guys i have a quick question

At a glance
Hi guys, i have a quick question:

I created an script to get data from qdrant:
Plain Text
  service_context = ServiceContext.from_defaults()
    vector_store = QdrantVectorStore(client=client, collection_name="pdfs")
    storage_context = StorageContext.from_defaults(vector_store=vector_store)
    index = VectorStoreIndex.from_documents(
        documents=[], storage_context=storage_context, service_context=service_context
    )


And then i query:
Plain Text
query_engine = index.as_query_engine(
        similarity_top_k=similarity_top_k, 
        response_mode=response_mode
    )
    response = query_engine.query(q)


But i would like some times make general question about all the context.. but looks like in the background just some similar data is fetched from qdrant... are there any way about use everything?
L
R
7 comments
Hmmm.... with a vector index, the only way to fetch everything is to just set the top-k extremely high
then, it will fetch all the nodes πŸ˜…
Hmmm, do you recommend some another way?
mmm maybe?

The (ideal) alternative is throwing all the nodes into a list index, but this assumes you have the original documents still
I have those files, do you have any article talking about?
Plain Text
from llama_index import ListIndex

index = ListIndex.from_documents(documents)

query_engine = index.as_query_engine(response_mode="tree_summarize")

response = query_engine.query("What are the general themes discussed in the text?")
Add a reply
Sign up and join the conversation on Discord