Llama 3 RAG: Create Chat with PDF App using PhiData, Here is how..

Поделиться
HTML-код
  • Опубликовано: 28 май 2024
  • 🚀 In this tutorial, we dive into the exciting world of building a Retrieval Augmented Generation (RAG) application that handles PDFs efficiently using Llama 3 powered by the Groq API with PhiData as the main Python package. Whether you're looking to create an app with Groq or prefer keeping your data 100% local with Ollama, this video covers it all!
    Github Source Code: git.new/groq-rag
    👨‍💻 What We Cover:
    Setting Up Your Environment: We start by setting up the necessary development environment.
    Installing Packages: Next, we handle all the package installations required for our application.
    Creating a Database: Follow along as we create a database using Docker for storing our data.
    Running the Application: Finally, see how to run the application where you can upload PDFs, ask questions based on the uploaded content, and receive precise answers.
    🔗 Resources:
    Sponsor a Video: mer.vin/contact/
    Do a Demo of Your Product: mer.vin/contact/
    Patreon: / mervinpraison
    Ko-fi: ko-fi.com/mervinpraison
    Discord: / discord
    Twitter / X : / mervinpraison
    Code: mer.vin/2024/04/llama3-pdf-ra...
    Phidata Basics: • PhiData: How to Seamle...
    📌 Stay tuned as I walk you through each step, from cloning the repository to launching the app, ensuring you know exactly how to replicate this setup on your own!
    👍 Don't forget to LIKE, SHARE, and SUBSCRIBE for more tutorials on Artificial Intelligence and data management. Your support helps us create content that helps others!
    Timestamps:
    0:00 - Introduction to the Tutorial
    0:02 - Creating the RAG Application Overview
    1:01 - App Demonstration and Features
    1:35 - Environment Setup and Package Installation
    2:48 - Database Creation with Docker
    3:36 - Running the Application
    4:06 - Uploading PDFs and Query Interaction
    5:41 - Alternative Local Setup with Ollama
    6:20 - Running the Local Application and Uploading Files
    7:01 - Live Question and Answer Test
    #PhiData #PhiDataOpenSourceLLM #PhiDataOpenSource #PhiDataFunctionCalling #PhiDataOlama #AssistantsAPIFunction #CreateAIAssistants #AIAssistant #FunctionCalling #Function #PhiData #PipInstallPyData #PhiDataRAG #PhiDataRAGPDF #PhiDataRAGGroq #PhiDataRAGOlama #PhiDataGroq #PhiDataRAGApplication #PhiDataRAGApp #OlamaRAG #GroqRAG #OlamaPDFRAG #GroqPDFRAG #PDFRAG #RAGPDF
  • ХоббиХобби

Комментарии • 71

  • @phidata
    @phidata Месяц назад +11

    @Mervin Praison you are awesome. Can watch your videos all day!

  • @cecilvictor3
    @cecilvictor3 Месяц назад +2

    Macha. Nee kalakura. Your content is so valuable. Keep them coming. Bless you!

  • @Great_Muzik
    @Great_Muzik 10 дней назад

    Awesome tutorial Mervin! Thanks!

  • @svenandreas5947
    @svenandreas5947 Месяц назад

    This is just phantastic ... I mean the tool, and your video as always top notch

  • @fc0sta448
    @fc0sta448 Месяц назад

    Your content is amazing!

  • @kreddy8621
    @kreddy8621 Месяц назад +2

    Brilliant, thanks mate😊

  • @eroshoxhallari4284
    @eroshoxhallari4284 Месяц назад

    Keep up Your Amazing Work!👍👍👍👍👍

  • @kate-pt2ny
    @kate-pt2ny Месяц назад

    Thanks for sharing, very useful

  • @vincentnestler1805
    @vincentnestler1805 Месяц назад

    Another OUTSTANDING video!

  • @tonywhite4476
    @tonywhite4476 Месяц назад

    Very good work.

  • @godzilllla2452
    @godzilllla2452 Месяц назад

    Love this brilliant!

  • @eroshoxhallari4284
    @eroshoxhallari4284 Месяц назад

    This Guy is Excellent! 👍👍👍👍👍

  • @WalidDingsdale
    @WalidDingsdale Месяц назад

    amazing demonstration, thanks for sharing your expertize. Hope you could talk more about PKM.

  • @yazanrisheh5127
    @yazanrisheh5127 Месяц назад +3

    I always watch and love each and every single video. One video I'd like to request and I agree many would agree is how can we do multimodal RAG with PDFs that have images and tables and text. I've tried watching other videos and it's quite confusing + doesnt seem quite good or production level where we can tune it to our own needs or sometimes they do it separately by just providing image and asking the LLM to describe it. Please do a video about it

  • @aisdhgaoi3qea
    @aisdhgaoi3qea 28 дней назад +1

    This is awesome. I'm trying to understand the fundamentals a bit better. Where are the pdf documents stored locally?

  • @renhit2005
    @renhit2005 Месяц назад

    Hi Mervin i come across this channel. Very clear, concise and to the point. Can you mention minimum required hardware specification in each video?

  • @xuanzida5321
    @xuanzida5321 19 дней назад

    Your slides are clear and perfect to explain all thing for me. And it can be seen as a tool that it needs a PDF as input and then the user will get a answer related to it via giving a question to llama3. It looks like an interaction between chatgpt3.5/4.0, but it is in local. That's pretty good. If you can do a chatbot whose character can be customized, it can be better.

  • @zamanganji1262
    @zamanganji1262 Месяц назад

    Hi, Mervin. Thank you for your excellent presentation and tutorial. Could you please perform the procedures in Docker Compose?

  • @60pluscrazy
    @60pluscrazy Месяц назад

    Excellent 🎉🎉🎉

  • @sustainitech
    @sustainitech Месяц назад +2

    Another great one @Mervin, thank you. Feasibly, how many pages of PDFs could we feed to PhiData with this method and get nuanced responses to questions? Could that include spreadsheets & financial analysis?

  • @JorgeGil-qf6zy
    @JorgeGil-qf6zy 27 дней назад

    @Mervin thank you for your video. It works great. I have a question, some of the PDFs I am testing this with fail. Any suggestion of where I need to look for this?

  • @eunicefoo6820
    @eunicefoo6820 21 день назад

    2:37 direct set the GROQ_API_KEY in environment variable instead of 'export'

  • @vincentnestler1805
    @vincentnestler1805 Месяц назад

    Thanks!

  • @MeinDeutschkurs
    @MeinDeutschkurs Месяц назад +1

    Awesome! ❤❤

    • @MervinPraison
      @MervinPraison  Месяц назад

      Thank you

    • @MeinDeutschkurs
      @MeinDeutschkurs Месяц назад

      @@MervinPraison, you‘re welcome! Your video brought me to the GitHub project Langflow. I have to try it, it supports ollama, Agents and RAG through visual programming components. And a low code approach for calling everything through python and a json file.

  • @trilogen
    @trilogen Месяц назад +1

    Thank you for the video Mervin. But it is not newbie friendly. I am not interested in groq so skipped to the ollama chapter but I had to watch groq parts for python and docker installation etc. Would've been better if you split them in their own video.

  • @user-mk9tv3by4n
    @user-mk9tv3by4n Месяц назад

    very useful

  • @vrg1337
    @vrg1337 Месяц назад

    @Mervin Praison is there any way to access phidata via api, if I run this on AWS or something? I want to use a diffrent front-end?

  • @skyryudo311
    @skyryudo311 Месяц назад

    Thank you so much for the great content !!! It's awsome like you say. Im wondering if could be done with LMstudio, which seems easier to use for a noob like me, i can easily change system promt, context token, gpu layers... Otherwise im wondering also if it would be possible to make that run locally and forward that to a website which would be accessible through a phone.

  • @skyryudo311
    @skyryudo311 Месяц назад

    Thanks for the great content, straight to the point ! Its awsome like you say. Im wondering if i could do the same with LMstudio ? it seems more practical for a noob like me, i can easily set-up some parameter through the interface like system promt, context token and the gpu layers for optimisation. That would it be awsome as well if it was possible to make it run locally and forward it to a website that we could run on a smartphone ?

  • @SohanVenkatesh
    @SohanVenkatesh Месяц назад +1

    How can I implement this project using OpenAI models ? Can anyone guide me with this?

  • @sfl1986
    @sfl1986 29 дней назад

    Ive been trying to edit the llama3 temperature cuz it tends to hallucinate a lot, where should I go to edit it?

  • @williamwong8424
    @williamwong8424 Месяц назад +1

    hello, can you show a video where we can upload all the documents, then we can chat with it without needing to keep uploading / storing it to the database? meaning to chat with the vectorised db

    • @phidata
      @phidata 28 дней назад

      the documents are stored in the database and do not need to uploaded again unless the database is cleared. Only the streamlit UI doesnt show the docs on refresh :) but the docs are there in the database

  • @markdkberry
    @markdkberry 21 день назад +1

    shame it needs docker, I just dont have the space for WSL2 to start growing massive so I avoid docker. Also on windows 10 and dont want to run virtual environment (bios issues for other software) on this machine so if there is another way to get the pgvector db working, would be great to know it.

  • @sfl1986
    @sfl1986 Месяц назад

    how can you increase the output limit so that it can giv longer responses? Installed it and everything is working but if I have to lets say translate a long scientific article it would cut off

  • @Great_Muzik
    @Great_Muzik 10 дней назад

    Can this be used to extract specific data fields from multiple pdf files and output the result in Excel?

  • @inout3394
    @inout3394 Месяц назад

    Thx

  • @mr_docans
    @mr_docans Месяц назад

    Great video. What if i wanted to build a RAG that will work on a website. Where the data is stored on a web server or on a cloud database

    • @phidata
      @phidata 28 дней назад

      This App includes option to scrape websites too (along with PDFs) :) data right now is stored locally in a portgres database

  • @ninzagang_youtube
    @ninzagang_youtube Месяц назад

    thanks to video
    i have question
    1)why you choose llm groq? speed reason?
    2)could i replace groq to local llm (llam3) that is possible to use functino calling tool?

    • @MervinPraison
      @MervinPraison  Месяц назад +1

      Yes, LLM Groq = speed
      Yes I have showed in the later part of the video , how to replace that with ollama (100% local)

    • @MervinPraison
      @MervinPraison  Месяц назад +1

      Yes function calling is possible in Llama 3

  • @AntonBj3
    @AntonBj3 Месяц назад

    Can you explain this, I tried uploading a pdf. The knowledge base only contain two pages.
    Terminal output:
    "INFO Committed 4 documents
    INFO Loaded 364 documents to knowledge base"
    Groq:
    "The confusion arises from the difference between the number of documents committed (4) and the number of documents loaded into the knowledge base (364). The knowledge base, however, only contains information about 2 specific documents, which are excerpts from the book "Friction, Wear, Lubrication: A Textbook in Tribology" by Ludema and Ajayi.
    It appears that the loading process involved 364 documents, but only a subset of those documents (4) were committed, and even fewer (2) are represented in the knowledge base. The discrepancy suggests that there might be additional information or documents that are not currently reflected in the knowledge base."

  • @chjpiu
    @chjpiu Месяц назад

    In Windows, how can I copy all the run code for Docker together in PowerShell? It automatically run each line separately and it have not been done. Thank you so much

    • @phidata
      @phidata 28 дней назад

      The \ doesn't work in windows, Please can you run:
      docker run -d -e POSTGRES_DB=ai -e POSTGRES_USER=ai -e POSTGRES_PASSWORD=ai -e PGDATA=/var/lib/postgresql/data/pgdata -v pgvolume:/var/lib/postgresql/data -p 5532:5432 --name pgvector phidata/pgvector:16

  • @tier1recon836
    @tier1recon836 Месяц назад

    Can I suggest a tutorial video? I'd like to see llama3 run locally with ollama with autobuild agent autogen. I'm trying to figure out the code now using just config_llm instead of .env or oai.

    • @MervinPraison
      @MervinPraison  Месяц назад

      You Read my mind: ruclips.net/video/pKFy82m5XmA/видео.html

  • @patrickshanahan7505
    @patrickshanahan7505 Месяц назад

    Please, can you tell me if this is possible with piano sheet music?

  • @GAMINGDEADCRACKER
    @GAMINGDEADCRACKER Месяц назад

    @MervinPraison is it possible to run csv,SQL,json instead of pdf

    • @MervinPraison
      @MervinPraison  Месяц назад

      It's based on the CSV, SQL, JSON you use. You might need to parse the data and reformat it and then sent it for embedding.
      You might need to modify this code to do that.

    • @GAMINGDEADCRACKER
      @GAMINGDEADCRACKER Месяц назад

      @@MervinPraison Can you please make a video on this topic. Thank you so much in advance 🔥

  • @ImSaran
    @ImSaran 29 дней назад

    Only pdf can be done. Can we do excel file

  • @farazfitness
    @farazfitness Месяц назад

    i am a newbie using windows somehow i managed to reach the docker part and when i put the docker run \d
    (phidata) PS C:\Users\khanf> docker run
    "docker run" requires at least 1 argument.
    See 'docker run --help'.
    Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
    Create and run a new container from an image
    This is the error i am getting

    • @phidata
      @phidata 28 дней назад

      The \ doesn't work in windows, Please can you run:
      docker run -d -e POSTGRES_DB=ai -e POSTGRES_USER=ai -e POSTGRES_PASSWORD=ai -e PGDATA=/var/lib/postgresql/data/pgdata -v pgvolume:/var/lib/postgresql/data -p 5532:5432 --name pgvector phidata/pgvector:16

    • @farazfitness
      @farazfitness 28 дней назад

      @@phidata thank you so much for the help will try this. Thank you so much really appreciate it

    • @farazfitness
      @farazfitness 27 дней назад

      @@phidata thank you phidata it worked with your help and mervins i was able to create my 1st ever app. forever gtrateful

  • @shackinternational
    @shackinternational Месяц назад

    The only problem is the 200 MB limit to upload PDF’s … is there a way to increase that?

    • @phidata
      @phidata 28 дней назад +1

      hi, you can change that in streamlit. its just a streamlit default, you can upload gbs if you like :)

    • @shackinternational
      @shackinternational 28 дней назад

      @@phidata thanks I will look into that

  • @RavensLolz
    @RavensLolz Месяц назад

    How can I change the models directory of ollama on windows 11?

    • @skyryudo311
      @skyryudo311 Месяц назад

      From the ollama doc it says:
      First Quit Ollama by clicking on it in the task bar
      Edit system environment variables from the control panel
      Edit or create New variable(s) for your user account for OLLAMA_HOST, OLLAMA_MODELS, etc.
      Click OK/Apply to save
      Run ollama from a new terminal window

  • @PythonLearn-nv8cd
    @PythonLearn-nv8cd Месяц назад

    @Mervin getting error ERROR (psycopg.OperationalError) connection failed: FATAL: password authentication failed for user "ai". Any idea, why it is not connecting ?

    • @phidata
      @phidata 28 дней назад

      Hi there, is the database running? The command is
      docker run -d -e POSTGRES_DB=ai -e POSTGRES_USER=ai -e POSTGRES_PASSWORD=ai -e PGDATA=/var/lib/postgresql/data/pgdata -v pgvolume:/var/lib/postgresql/data -p 5532:5432 --name pgvector phidata/pgvector:16

    • @PythonLearn-nv8cd
      @PythonLearn-nv8cd 28 дней назад

      @@phidata yes database is running and it is weird, giving password error

    • @phidata
      @phidata 28 дней назад

      @@PythonLearn-nv8cd hmm maybe delete the container + volume and then recreate? probably initialized before and has some old password?