Find answers from the community

T
Turner
Offline, last seen 3 months ago
Joined September 25, 2024
T
Turner
Β·

Hi all

Hi all
I created a qdrant vector db locally with this
Plain Text
from qdrant_client import QdrantClient
from llama_index.vector_stores.qdrant import QdrantVectorStore
from llama_index.core import VectorStoreIndex, StorageContext

# For local instance
client = QdrantClient(path="./qdrant_data")

vector_store = QdrantVectorStore(
    "hr", client=client, enable_hybrid=True
)

Settings.chunk_size = 2048
storage_context = StorageContext.from_defaults(vector_store=vector_store)
index = VectorStoreIndex.from_documents(
    documents, storage_context=storage_context
)


then later on i try to do retrieval with
Plain Text
from llama_index.core import VectorStoreIndex, StorageContext
from llama_index.vector_stores.qdrant import QdrantVectorStore
from qdrant_client import QdrantClient
from llama_index.core import load_index_from_storage

# Create a local Qdrant vector store
client = QdrantClient(path="./qdrant_data") 

vector_store = QdrantVectorStore(client=client, collection_name="hr") 

storage_context = StorageContext.from_defaults(vector_store=vector_store)

# Load the persisted index
index = load_index_from_storage(storage_context=storage_context)

but i keep running into
Plain Text
ValueError: No index in storage context, check if you specified the right persist_dir.
2 comments
T
L
T
Turner
Β·

Hi

Hi
Is it inately possible to have llamaIndex load pdfs from an s3 bucket without we having to download the bucket contents locally then reading from there?
7 comments
T
L
Hi, has anyone managed to get TruLens to work with llamaIndex?
I keep running into the same issue when running even their quickstart docs example. This error
Plain Text
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Cell In[20], line 2
      1 # or as context manager
----> 2 with tru_query_engine_recorder as recording:
      3     query_engine.query("What did the author do growing up?")

File c:\Users\TurnerZ\Documents\GitHub\amaliai-hr\.venv\Lib\site-packages\trulens_eval\app.py:842, in App.__exit__(self, exc_type, exc_value, exc_tb)
    839 self.recording_contexts.reset(ctx.token)
    841 if exc_type is not None:
--> 842     raise exc_value
    844 return

Cell In[20], line 3
      1 # or as context manager
      2 with tru_query_engine_recorder as recording:
----> 3     query_engine.query("What did the author do growing up?")

File c:\Users\TurnerZ\Documents\GitHub\amaliai-hr\.venv\Lib\site-packages\trulens_eval\instruments.py:633, in Instrument.tracked_method_wrapper.<locals>.tru_wrapper(*args, **kwargs)
    625 @functools.wraps(func)
    626 def tru_wrapper(*args, **kwargs):
    627     logger.debug(
    628         f"{query}: calling instrumented sync method {func} of type {type(func)}, "
    629         f"iscoroutinefunction={is_really_coroutinefunction(func)}, "
    630         f"isasyncgeneratorfunction={inspect.isasyncgenfunction(func)}"
...
--> 267         result = coro.send(None)
    268     else:
    269         result = coro.throw(exc)

RuntimeError: cannot reuse already awaited coroutine


the docs: https://www.trulens.org/trulens_eval/llama_index_quickstart/
10 comments
P
T
J
L
T
Turner
Β·

Hybrid

Hi, not sure if this is the place for this, but I'm currently exploring hybrid search utilizing the Qdrant vector DB integration. Currently have the embedding in the online instance (free tier) of qdrant.
The issue is, utilizing just Qdrant without hybrid search, the entire RAG pipeline runs smoothly (including the hosted backend service for it)
After enabling hybrid search, it seems the pytorch library became a dependency (i may be wrong about when torch was needed, but it is a dpendency in utilzing qdrant).
After enabling hybrid search, my docker image size bloats up to 8gb and the instance that was previously hosting and running the app is now suddenly unable to handle the workload

Now I'm not sure if that is normal behaviour, but I'm asking to see if the only workaround would be to upgrade the instance I'm woking on or I missed something
4 comments
T
L