Build a Talking Fully Local RAG with Llama 3, Ollama, LangChain, ChromaDB & ElevenLabs: Nvidia Stock

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ก.ย. 2024

ความคิดเห็น • 53

  • @maryammiradi
    @maryammiradi  9 วันที่ผ่านมา +2

    💻💡 Want to Master AI Problem-Solving & Product Development with a 10-Step Framework? If so, Check out my Training : www.maryammiradi.com/training

    • @learning_rust
      @learning_rust 8 วันที่ผ่านมา +1

      Thank you! This is great information. Subscribed! - Will be watching your previous videos too! 😊

    • @maryammiradi
      @maryammiradi  8 วันที่ผ่านมา +1

      @@learning_rust really glad to hear!! 👋Let me know if you have any questions

    • @hassantristed
      @hassantristed 8 วันที่ผ่านมา +1

      Can I join training if I don’t have programming skills?

    • @maryammiradi
      @maryammiradi  8 วันที่ผ่านมา

      @@hassantristed You need Python Programming skills first. It will help you a lot in your AI and Data Science career. I can send you free Tutorials, it takes about 3 weeks to learn it. Then you can start my Program. If you are interested let me know.

    • @hassantristed
      @hassantristed 8 วันที่ผ่านมา +1

      @@maryammiradi please share. I tried to learn python and know the basics.

  • @Qwme5
    @Qwme5 8 วันที่ผ่านมา +2

    I absolutely adore the way you present information with such calmness and clarity. It's like a soothing breeze on a hot day! Thank you immensely, Dr. Maryam. Words can't fully capture the depth of my gratitude for your incredible guidance!

    • @maryammiradi
      @maryammiradi  8 วันที่ผ่านมา

      Thank you very much for the kind words!! 🙏Super Glad to hear!!

  • @hamidraza1584
    @hamidraza1584 9 วันที่ผ่านมา +3

    your videos are amazing and very excellent in the context of artificial intelligence and machine learning ,lots of love and thanks from lahore pakistan

    • @maryammiradi
      @maryammiradi  9 วันที่ผ่านมา +1

      Thank you and glad to hear!

  • @hamza-kacem
    @hamza-kacem 2 วันที่ผ่านมา +1

    That was such a clear and insightful explanation. Thanks a lot

    • @maryammiradi
      @maryammiradi  2 วันที่ผ่านมา

      Glad to hear it is insightful 👋

  • @techhfolks8915
    @techhfolks8915 9 วันที่ผ่านมา +1

    Your efforts are always seen in content 💯Always appreciated.

    • @maryammiradi
      @maryammiradi  9 วันที่ผ่านมา

      Thanks alot! Glad to hear!

  • @rivascf
    @rivascf 8 วันที่ผ่านมา +1

    Excellent video-useful, informative, and easy to comprehend and follow. On a separate note, the presentation is beautiful, and the editing work is great! Please continue publishing this amazing material. 👍

    • @maryammiradi
      @maryammiradi  8 วันที่ผ่านมา

      Very glad to hear!! Thank you very much for the kind words

  • @akashkunwar
    @akashkunwar 8 วันที่ผ่านมา +1

    Beautifully explained. Thank you...

    • @maryammiradi
      @maryammiradi  8 วันที่ผ่านมา

      Thank you very much! Very glad to hear!!

  • @Naejbert
    @Naejbert 7 วันที่ผ่านมา +1

    Thank you! It is very useful and much appreciated 😊

    • @maryammiradi
      @maryammiradi  7 วันที่ผ่านมา

      @@Naejbert really glad to hear!!

  • @azmanhussin2804
    @azmanhussin2804 7 วันที่ผ่านมา +1

    Great work.

  • @davidtindell950
    @davidtindell950 8 วันที่ผ่านมา +2

    From a NEW Subscriber" " Wow, Wow, Wow, .... wow, ...Wow !" [to quote our latest "Pitch Meeting"] ...

    • @maryammiradi
      @maryammiradi  8 วันที่ผ่านมา +1

      Very glad to hear!! Thank you very much!!

  • @shuntera
    @shuntera 8 วันที่ผ่านมา +2

    What I never see in these RAG tutorials is how you modify the contents of the RAG. How do you remove old/redundant data from the vector database and update or add new content. How do you modify an existing PDF for example and have the database remove the old data and add the new data?

    • @maryammiradi
      @maryammiradi  8 วันที่ผ่านมา +4

      Here’s how you can manage it using LangChain and vector databases like ChromaDB or FAISS:
      1. Deleting Old Data:
      In LangChain, when using vector databases like ChromaDB, you can remove old or redundant data by specifying the document ID or metadata.
      chromadb_client.delete(ids=["your_document_id"])
      --
      2. Updating Content:
      To update an existing PDF or document, first delete the associated embeddings by using the document's ID or metadata:
      chromadb_client.delete(ids=["your_document_id"])
      After modifying your document, re-process the PDF and generate new embeddings using LangChain's text splitter and embedding functions.
      ---
      3. Adding New Content:
      For new documents, just process them with the same text splitting and embedding workflow:
      chromadb_client.add(texts, embeddings=embeddings, ids=["new_document_id"])

  • @Jcs187-rr7yt
    @Jcs187-rr7yt 6 วันที่ผ่านมา +1

    Am I able to purchase your trainings if I'm in the USA?

    • @maryammiradi
      @maryammiradi  6 วันที่ผ่านมา

      Of course! A high Percentage of my students are from United States. Let me know if you have other questions.

  • @jim02377
    @jim02377 7 วันที่ผ่านมา +1

    I have been working with a RAG for awhile and I haven't had much luck with the accuracy of local models, especially if the data is structured data which I assume is because it doesn't ingest well into a vector database. For example if you have a pdf that contains an extension list, the data is structured and not connected in a way that works well with cosign similarity search. I had thought about putting the structured data into a SQL database and using semantic routing to decide whether to pull context from a SQL database versus vector database. Do you have an opinion about using SQl databases with vector databases to increase accuracy?

    • @maryammiradi
      @maryammiradi  7 วันที่ผ่านมา

      That’s a great question! You’re right-structured data like extension lists or database-like information doesn’t always fit well into vector databases since they’re optimized for unstructured text and work best with cosine similarity or dense embeddings. For highly structured data, SQL databases can be much more accurate.
      Hybrid Approach (Vector + SQL): What you mentioned about using SQL for structured data and vector databases for unstructured data is spot on. You could implement semantic routing where the system decides which database to query based on the nature of the input.
      SQL excels at handling structured queries with exact matches, while vector databases can handle the fuzziness needed for semantic or context-based searches.
      After retrieving the relevant data from both databases, you can rank or combine the results using a post-processing step that merges the outputs from the vector and SQL queries. This way, you leverage the strengths of both systems for better overall accuracy.

    • @jim02377
      @jim02377 7 วันที่ผ่านมา +1

      @@maryammiradi I appreciate the response. Maybe you could create a future video on how to optimize that kind of approach using local models.

    • @maryammiradi
      @maryammiradi  7 วันที่ผ่านมา

      @@jim02377 Sure! Let me know what other challenges you face.

  • @ozycozy9706
    @ozycozy9706 8 วันที่ผ่านมา +1

    Is it common practice to re generate embeddings and vector db in case you don't get good answer or you have better way of chunking? You might have hundreds of pdf files.

    • @maryammiradi
      @maryammiradi  8 วันที่ผ่านมา +1

      Chunking strategy can significantly affect the quality of answers. If your initial chunk sizes were too small or too large, or if important context got split across chunks, it might be helpful to reprocess the documents with a refined chunking method. This is particularly important when dealing with hundreds of PDFs, as better chunking can lead to more accurate embedding and improved retrieval.
      Regenerating embeddings isn’t always necessary unless the chunking change is substantial or the initial embeddings didn’t capture the meaning well. You can also update just a portion of the database rather than starting from scratch if needed.
      Hope this helps! 😊

  • @globetrotterbyme3325
    @globetrotterbyme3325 5 วันที่ผ่านมา +1

    hi i need yor help: i have an exprience rag piple line with llama 3.1 and try to rag for persian characters but it doesnt work and llama answer incorrect the questions .. a have did alot of research and it seems the embedding model is not work for persian characters ..can you offer any embedding model to embedd persian correctly?

    • @maryammiradi
      @maryammiradi  5 วันที่ผ่านมา

      Yes, you can obtain embeddings for Persian text to build a local Retrieval-Augmented Generation (RAG) system. Several multilingual and language-specific models support Persian and can generate high-quality embeddings suitable for tasks like semantic search, clustering, and retrieval in RAG systems.
      Here are some options you might consider:
      LaBSE (Language-agnostic BERT Sentence Embedding):
      Developed by Google, LaBSE is designed to produce language-agnostic sentence embeddings for 109 languages, including Persian.
      LASER (Language-Agnostic SEntence Representations):
      Developed by Facebook AI, LASER supports over 90 languages, including Persian.
      mBERT (Multilingual BERT):
      Supports 104 languages, Persian included.
      XLM-R (XLM-RoBERTa):
      An improved version of XLM, supporting 100 languages.Provides robust performance across various languages, including Persian.
      Persian-Specific Models:
      HooshvareLab/bert-base-parsbert-uncased: A BERT model pre-trained on large Persian corpora.
      m3hrdadfi/albert-fa-zwnj: An ALBERT model optimized for Persian.
      You can fine-tune models like mBERT or XLM-R using the Sentence Transformers library to produce better sentence embeddings for Persian.
      This might require some labeled data for tasks like paraphrase identification or semantic textual similarity in Persian.
      Hope this helps.

    • @globetrotterbyme3325
      @globetrotterbyme3325 5 วันที่ผ่านมา +1

      ​​@@maryammiradi. i cant thank u enough ..so ill do research and use about these models and share the result with you..

  • @pythonyousufparyani8407
    @pythonyousufparyani8407 9 วันที่ผ่านมา +1

    I hope, Ollama will not take whole memory of my pc. Why not using HuggingFace hosted Llama3? I will try to code your tutorial though :) Since it will be on Colab, I don't think it makes any difference. So, I will code it.

    • @maryammiradi
      @maryammiradi  9 วันที่ผ่านมา +1

      Hugging Face is also great. But Ollama is for when you want to work locally. You will need GPU, also in google Colab I used T4 which has a small GPU. That will really help.

    • @vncstudio
      @vncstudio 8 วันที่ผ่านมา +1

      Ollama is nice since you can test your prompts interactively as well as run code. I use AWS Sagemaker JupyterLab.

    • @maryammiradi
      @maryammiradi  8 วันที่ผ่านมา +4

      @@vncstudio Hugging Face’s hosted models are fantastic, especially for cloud-based work like Google Colab or AWS SageMaker JupyterLab. Colab's T4 GPU or SageMaker's resources are great for running the model without worrying about local hardware limitations.
      However, Ollama is specifically designed for running LLMs locally without needing cloud infrastructure. This can be useful if you want complete control over your environment, especially if you're working offline or want to avoid cloud costs.

    • @vncstudio
      @vncstudio 8 วันที่ผ่านมา +1

      @@maryammiradi My requirement is to work in a regulated cloud environment. So it would either be Ollama or Transformers in offline mode. 🙂

  • @paulkwok2233
    @paulkwok2233 7 วันที่ผ่านมา +1

    I don't find 4 pdf in the notebook folders. is it possible to put the pdf into the folder

    • @maryammiradi
      @maryammiradi  7 วันที่ผ่านมา

      I can do that but then after one day, Google colab remove temporary data. I can give the links to the pdfs.

    • @paulkwok2233
      @paulkwok2233 7 วันที่ผ่านมา

      @@maryammiradi yes, would you please share the links for me to download, maybe google does not allow to attach the pdf

    • @paulkwok2233
      @paulkwok2233 5 วันที่ผ่านมา +1

      would you please share the pdf links , thank you.

    • @maryammiradi
      @maryammiradi  5 วันที่ผ่านมา

      Of course!! Here are the links:
      s201.q4cdn.com/141608511/files/doc_financials/2025/Q225/Rev_by_Mkt_Qtrly_Trend_Q225.pdf
      s201.q4cdn.com/141608511/files/doc_financials/2025/Q225/Q2FY25-CFO-Commentary.pdf
      s201.q4cdn.com/141608511/files/doc_financials/2025/q2/78501ce3-7816-4c4d-8688-53dd140df456.pdf

    • @paulkwok2233
      @paulkwok2233 4 วันที่ผ่านมา +1

      @@maryammiradi Thank you very much

  • @anianait
    @anianait 8 วันที่ผ่านมา +1

    still no free alternative to Elevenlab?

    • @maryammiradi
      @maryammiradi  8 วันที่ผ่านมา

      ElevenLabs is one of the best solutions for high-quality AI-generated voices, but there are some free alternatives. Coqui TTS, Google Text-to-Speech API, Mozilla TTS.