When using RAG in Prompt Studio, an error occurs.

takk
Level 1
When using RAG in Prompt Studio, an error occurs.

Hello, I'm trying to build a RAG (Retrieval-Augmented Generation) model following the knowledge provided below, and I'm attempting to run tests on the extended LLM (Language Model) using Prompt Studio. However, when running it in Prompt Studio, I encounter an error. The error message is as follows. Could you please advise?

https://knowledge.dataiku.com/latest/ml-analytics/gen-ai/tutorial-question-answering-using-rag-appro...

----------------

An invalid argument has been encountered : RAG query server init failed: {"errorType":"\u003cclass \u0027ValueError\u0027\u003e","message":"The de-serialization relies loading a pickle file. Pickle files can be modified to deliver a malicious payload that results in execution of arbitrary code on your machine.You will need to set `allow_dangerous_deserialization` to `True` to enable deserialization. If you do this, make sure that you trust the source of the data. For example, if you are loading a file that you created, and no that no one else has modified the file, then this is safe to do. Do not set this to `True` if you are loading a file from an untrusted source (e.g., some random site on the internet.).","traceback":[["/home/dataiku/dataiku-dss-12.4.2/python/dataiku/llm/rag/rag_query_server.py",43,"serve","db \u003d FAISS.load_local(folder, embeddings)"],["/home/dataiku/design/code-envs/python/xx/lib/python3.9/site-packages/langchain_community/vectorstores/faiss.py",1078,"load_local","raise ValueError("]],"type":"ERROR"}

AWStaku

0 Kudos
2 Replies
AdrienL
Dataiker

Hello,

This comes from a breaking change in langchain-community 0.0.27. This will be fixed in an upcoming DSS release.

In the meantime, you can limit the version of langchain-community to <0.0.26 in the code environment you use for RAG:

langchain-community<0.0.27

 and rebuild the code env, this should fix the issue.

AdrienL
Dataiker

Hello,

As a followup, this was also fixed in Dataiku DSS 12.6.0.

0 Kudos