RAG with LangChain & Ollama Locally and For Free
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
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.👍
Thank you 😀 Glad you liked it.
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?
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.
@@TirendazAI Looks like LangSmith would take several videos to explain.
That accent is gold 🥇 Content also
Glad to hear that 🙏
thx. awesome! keep up your good work
Glad you like it.
Very cool video 😊
Thank you 🤗
hardware specs plz? already subscribed ur channel for more easy tutorials. awesome work.
Thanks for your feedback. Here are my hardware: AMD Ryzen 5 7500f, 16 GB RAM and 4070 Ti super graphics card.
Hocam bu serinin türkçesi gelemez mi ?
Yapmak istiyorum ama ne zaman olur bilmiyorum.
@@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
i install langchain-community but when i import, it shows error
Do you create a virtual environment with conda?
i didn't get the api. can you show some steps for that
I used the local model with Ollama. This model is free. You don't need any API key.
@@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
how can i solve this problem
AttributeError: module langchain_community.embeddings has no attribute ollama
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.
same
> from langchain_community.embeddings import OllamaEmbeddings
> embedding = OllamaEmbeddings(
model="nomic-embed-text",
)
@@TirendazAI Thank you