You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say you have a ton of data on a topic you use for RAG. When you query a request to the retriever, the tokenizer if you have or even don't have history, can get overloaded.
I recommend at the retriever lever when the long chain gets the data from the data store (chroma). If there is a tokenization max trim function or something like that, otherwise you will run into errors with overloading the tokenizer.
Maybe something like this? I'm not sure if its possible I haven't integrated yet.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Let's say you have a ton of data on a topic you use for RAG. When you query a request to the retriever, the tokenizer if you have or even don't have history, can get overloaded.
I recommend at the retriever lever when the long chain gets the data from the data store (chroma). If there is a tokenization max trim function or something like that, otherwise you will run into errors with overloading the tokenizer.
Maybe something like this? I'm not sure if its possible I haven't integrated yet.
results = retriever.similarity_search(query=my_query, k=5, search_kwargs={"max_tokens": 1000})
Beta Was this translation helpful? Give feedback.
All reactions