RAG with LangChain & Ollama Locally and For Free

Sdílet
Vložit
  • čas přidán 29. 08. 2024
  • In this video, we'll build a RAG app using Ollama and an embedding model locally and for free. We'll track this app in LangSmith.
    00:01 Introduction
    01:08 Create a virtual environment
    01:38 Installation
    03:17 Initialize the local model
    04:23 Enter LangSmith
    07:28 Load data
    09:14 Split data
    11:50 Create a database
    13:56 Retrieve data
    15:35 Generate the output
    20:23 Summary
    🚀 Medium: / tirendazacademy
    🚀 X: x.com/tirendaz...
    🚀 LinkedIn: / tirendaz-academy
    ▶️ LangChain Tutorials:
    • LangChain Tutorials
    ▶️ Generative AI Tutorials:
    • Generative AI Tutorials
    ▶️ LLMs Tutorials:
    • LLMs Tutorials
    ▶️ HuggingFace Tutorials:
    • HuggingFace Tutorials ...
    🔥 Thanks for watching. Don't forget to subscribe, like the video, and leave a comment.
    🔗 Notebook: github.com/Tir...
    🔗 LangGraph Blog: blog.langchain...
    🔗 LangSmith: smith.langchai...
    🔗 Rag Prompt: smith.langchai...
    #ai #langgraph #generativeai

Komentáře • 27

  • @TooyAshy-100
    @TooyAshy-100 Před 5 měsíci +3

    I wanted to express my gratitude for your recent video, "RAG with LangChain & Ollama Locally and For Free." Your clear explanations and the inclusion of the Notebook file code have significantly aided my understanding of all steps. Your effort to make complex topics accessible is greatly appreciated.👍

    • @TirendazAI
      @TirendazAI  Před 5 měsíci

      Thank you 😀 Glad you liked it.

  • @mapledev9335
    @mapledev9335 Před 4 měsíci +1

    I just found you this morning. One of the best channels out there, so thanks for all your excellent videos. One thing I don't understand is how LangSmith is able to capture what's going on in the notebook. Is Ollama sending data to LangSmith?

    • @TirendazAI
      @TirendazAI  Před 4 měsíci

      Thanks for your feedback. Glad to hear that. We monitor agents and LLM applications by setting the LANGCHAIN_TRACING_V2 environment variable to true. But, I don't know exactly how LangSmith works under the hood.

    • @mapledev9335
      @mapledev9335 Před 4 měsíci +1

      @@TirendazAI Looks like LangSmith would take several videos to explain.

  • @LyuboslavPetrov
    @LyuboslavPetrov Před 3 měsíci +1

    That accent is gold 🥇 Content also

  • @bennyzen
    @bennyzen Před 5 měsíci +1

    thx. awesome! keep up your good work

  • @mushinart
    @mushinart Před 5 měsíci +1

    Very cool video 😊

  • @aliaffan88
    @aliaffan88 Před 4 měsíci

    hardware specs plz? already subscribed ur channel for more easy tutorials. awesome work.

    • @TirendazAI
      @TirendazAI  Před 4 měsíci

      Thanks for your feedback. Here are my hardware: AMD Ryzen 5 7500f, 16 GB RAM and 4070 Ti super graphics card.

  • @emindurmus993
    @emindurmus993 Před 3 měsíci

    Hocam bu serinin türkçesi gelemez mi ?

    • @TirendazAI
      @TirendazAI  Před 3 měsíci

      Yapmak istiyorum ama ne zaman olur bilmiyorum.

    • @emindurmus993
      @emindurmus993 Před 3 měsíci +1

      @@TirendazAI hocam bu konuda hiç türkçe kaynak yok zaten çok yeni bir mevzu olduğu için . Langchain kursunuzu bitirdim ama keşke biraz daha detaylandırsaydınız . Ama yinede harika olmuş elinize sağlık

  • @tsheringwangchuk9619
    @tsheringwangchuk9619 Před 4 měsíci

    i install langchain-community but when i import, it shows error

    • @TirendazAI
      @TirendazAI  Před 4 měsíci

      Do you create a virtual environment with conda?

  • @tsheringwangchuk9619
    @tsheringwangchuk9619 Před 4 měsíci

    i didn't get the api. can you show some steps for that

    • @TirendazAI
      @TirendazAI  Před 4 měsíci

      I used the local model with Ollama. This model is free. You don't need any API key.

    • @tsheringwangchuk9619
      @tsheringwangchuk9619 Před 4 měsíci

      @@TirendazAI you use to insert the langchain API key and you stated that it will get free ly from langchain website. So I tired to find it out, but I didn't it in website

  • @tsheringwangchuk9619
    @tsheringwangchuk9619 Před 4 měsíci

    how can i solve this problem
    AttributeError: module langchain_community.embeddings has no attribute ollama

    • @TirendazAI
      @TirendazAI  Před 4 měsíci

      To solve the problem, you can use these codes:
      > from langchain_community.embeddings import OllamaEmbeddings
      > embedding = OllamaEmbeddings(
      model="nomic-embed-text",
      )
      I updated the notebook in GitHub.

    • @sk66.
      @sk66. Před 4 měsíci

      same

    • @TirendazAI
      @TirendazAI  Před 4 měsíci

      > from langchain_community.embeddings import OllamaEmbeddings
      > embedding = OllamaEmbeddings(
      model="nomic-embed-text",
      )

    • @tsheringwangchuk9619
      @tsheringwangchuk9619 Před 4 měsíci

      @@TirendazAI Thank you