Skip to content

PYTHON01100100/Dalili

Repository files navigation

Langchain RAG Tutorial

Install dependencies

  1. Do the following before installing the dependencies found in requirements.txt file because of current challenges installing onnxruntime through pip install onnxruntime.

    • For MacOS users, a workaround is to first install onnxruntime dependency for chromadb using:
     conda install onnxruntime -c conda-forge

    See this thread for additonal help if needed.

    • For Windows users, follow the guide here to install the Microsoft C++ Build Tools. Be sure to follow through to the last step to set the enviroment variable path.
  2. Now run this command to install dependenies in the requirements.txt file.

pip install -r requirements.txt

Create database

Create the Chroma DB.

python create_database.py

python app.py (to start ui)

Query the database

Query the Chroma DB.

examlpes of queries for "Dalili" project:

python query_data.py "what is the best practice to prevent overfitting and underfitting?" #pass
python query_data.py "Explain all steps of CNN" #Pass
python query_data.py "what is the difference between Gradiant Boosting and Linear regression?"  #pass
python query_data.py "how can i handle null values?" # pass 10/10
python query_data.py "what is the different between precision and recall?"
python query_data.py "What is the difference between PCA and UMAP" #pass
python query_data.py "what is the affect of high and low entropy?" #pass (mentioned once)
python query_data.py "who is trump?" #pass
python query_data.py "اشرح التعرف على المشاعر باستخدام الذكاء الاصطناعي"
python query_data.py "ماهي حلول الازدحام؟"

You'll also need to set up an OpenAI account (and set the OpenAI key in your environment variable) for this to work.

Here is a step-by-step tutorial video: RAG+Langchain Python Project: Easy AI/Chat For Your Docs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors