Find answers from the community

Home
Members
sgaseretto
s
sgaseretto
Offline, last seen 2 months ago
Joined September 25, 2024
Why is it not possible to apply filters to DocumentSummaryIndex?

I want to query things related to a specific document doing
doc_summary_retriever = doc_summary_index.as_retriever(filters=filters) but the retriever ignores my filters... I saw that the retrievers for this do not pass the kwargs to the suoer().init function
This for example is how the DocumentSummaryIndexLLMRetriever looks like
Plain Text
        super().__init__(
            callback_manager=callback_manager or Settings.callback_manager,
            object_map=object_map,
            verbose=verbose,
        )
1 comment
L
Now that the ServiceContext is deprecated in favor of Settings, I want to test the performance of different chunk sizes with multiple VectorStoreIndex, where do I have to specify now the chunk_size for this to work?
3 comments
s
L
Hello! I'm having an issue that when trying to insert a Document to a QdrantVectorStore with the insert method, I get the error AttributeError: 'NoneType' object has no attribute 'create_collection'
My code looks like this:
Plain Text
documents = [
    Document(
        text="LlamaIndex is a simple, flexible data framework for connecting custom data sources to large language models.",
        metadata={
            "tenant": "llama_index",
        },
    ),
    Document(
        text="Qdrant is a vector database & vector similarity search engine.",
        metadata={
            "tenant": "qdrant",
        },
    ),
]

llm = OpenAI(model="gpt-3.5-turbo", temperature=0)

aclient = AsyncQdrantClient(
    url="localhost",
    port=6333,
    prefer_grpc=True,
)

vector_store = QdrantVectorStore(
    collection_name="multitenant",
    aclient=aclient,
    enable_hybrid=True, 
    batch_size=20,
    prefer_grpc=True
)

qdrant_index = VectorStoreIndex.from_vector_store(
    llm=llm,
    vector_store=vector_store,
    embed_model=FastEmbedEmbedding(
        model_name="BAAI/bge-base-en-v1.5"
    ),
    transformations=[splitter],
    use_async=True,
    show_progress=True,
)

for document in documents:
    # qdrant_index.insert(document)
    await qdrant_index.insert(document)
2 comments
s
L
I'm using almost the exact same code as with the EDD notebooks from this repo
Basically I'm doing this:
Plain Text
from llama_index.core.evaluation import DatasetGenerator, FaithfulnessEvaluator, RelevancyEvaluator, BatchEvalRunner

evaluator_llm = OpenAI(model="gpt-4", temperature=0)
faithfulness_evaluator = FaithfulnessEvaluator(llm=evaluator_llm)
relevancy_evaluator = RelevancyEvaluator(llm=evaluator_llm)

eval_runner = BatchEvalRunner(
    {"faithfulness": faithfulness_evaluator, "relevancy": relevancy_evaluator},
    workers=6,
    show_progress=True,
)

eval_results = await eval_runner.aevaluate_queries(
    query_engine=hybrid_query_engine, queries=subsapmple_synth_questions
)
25 comments
L
s
a
Can someone guide me to the right documentation where it is explained how I can add dynamically more tools to a query engine? For example here we have one for uber and another for lyft, what if I want to add a third one? Or a situation where I already have 20 and want to add 5 more, how do I do this without reinitializing each time everything?
1 comment
L
Hi everyone? I'm new to llamaindex and I was wondering if there are any examples for creating a simple Semantic Search engine, without any generation. Basically the idea would be to use something like Qdrant or any vectorstore, embed a bunch of data using something like e5 first. Then query some candidates with that same model and then reranking the candidates using something like a cross-encoder to rerank the candidates. Only that, it does not need to generate anything
2 comments
s
L