Survey banner
Switching to Dataiku - a new area to help users who are transitioning from other tools and diving into Dataiku! CHECK IT OUT

Programmatically RAG: Running an enriched LLM query using augmented LLM

areisdorf
Level 1
Programmatically RAG: Running an enriched LLM query using augmented LLM

I have an issue with applying an augmented LLM after following this tutorial: https://developer.dataiku.com/latest/tutorials/machine-learning/genai/nlp/llm-mesh-rag/index.html

I am using Dataiku 12.6.

I have a knowledge bank and augmented LLM that I would like to use to utilize in a webapp, however I keep getting the following error: 

DataikuException: java.lang.IllegalArgumentException: RAG query server init failed: {"errorType":"\u003cclass \u0027ModuleNotFoundError\u0027\u003e","message":"No module named \u0027langchain_community\u0027","traceback":[["/home/azureuser/dataiku-dss-12.6.0/python/dataiku/llm/rag/rag_query_server.py",44,"serve","import langchain_community"]],"type":"ERROR"}

I also have langchain_community installed into my env to try and correct the issue, but this didn't help. 

0 Kudos
2 Replies
Mattsco
Dataiker

Hello, 


I just re-ran the tutorial, and it's working fine on my end. Are you running the tutorial's code, or did you add your own code?

Please check your code environment and try to rebuild from scratch.



Screenshot 2024-04-19 at 12.02.04 PM.png

Mattsco
0 Kudos
areisdorf
Level 1
Author

I was able to run it successfully using the provided pdf link in the training. 

However it would fail when it was any other document. All the subsequent steps would run successfully, but I still get the same error message when running:

resp = chain({"input_documents":search_results, "question": query})

DataikuException: java.lang.IllegalArgumentException: RAG query server init failed: {"errorType":"\u003cclass \u0027ModuleNotFoundError\u0027\u003e","message":"No module named \u0027langchain_community\u0027","traceback":[["/home/azureuser/dataiku-dss-12.6.0/python/dataiku/llm/rag/rag_query_server.py",44,"serve","import langchain_community"]],"type":"ERROR"}

0 Kudos