RAG + Langchain Python Project: Easy AI/Chat For Your Docs

  Рет қаралды 149,367

pixegami

pixegami

Күн бұрын

Learn how to build a "retrieval augmented generation" (RAG) app with Langchain and OpenAI in Python.
You can use this to create chat-bots for your documents, books or files. You can also use it to build rich, interactive AI applications that use your data as a source.
👉 Links
🔗 Code: github.com/pixegami/langchain...
📄 (Sample Data) AWS Docs: github.com/awsdocs/aws-lambda...
📄 (Sample Data) Alice in Wonderland: www.gutenberg.org/ebooks/11
📚 Chapters
00:00 What is RAG?
01:36 Preparing the Data
05:05 Creating Chroma Database
06:36 What are Vector Embeddings?
09:38 Querying for Relevant Data
12:47 Crafting a Great Response
16:18 Wrapping Up
#pixegami #python

Пікірлер: 323
@johannanderson848
@johannanderson848 Ай бұрын
I refreshed RAG completely for a presentation. This was unbelievable good and concise
@colegoddin9034
@colegoddin9034 6 ай бұрын
Easily one of the best explained walk-throughs of LangChain RAG I’ve watched. Keep up the great content!
@pixegami
@pixegami 6 ай бұрын
Thanks! Glad you enjoyed it :)
@elijahparis3719
@elijahparis3719 7 ай бұрын
I never comment on videos, but this was such an in-depth and easy to understand walkthrough! Keep it up!
@pixegami
@pixegami 7 ай бұрын
Thank you :) I appreciate you commenting, and I'm glad you enjoyed it. Please go build something cool!
@uquantum
@uquantum 2 күн бұрын
Must-watch for any data scientist looking to use AI to help others as well as themselves get ahead of the pack: thanks! 👽
@insan2080
@insan2080 2 ай бұрын
This is what I look for! Thanks for the simplest explanation. There are some adjustments on the codebase during the updates but it doesn't matter. Keep it up!
@pixegami
@pixegami 2 ай бұрын
You're welcome, glad it helped! I try to keep the code accurate, but sometimes I think these libraries update/change really fast. I think I'll need to lock/freeze package versions in future videos so it doesn't drift.
@wtcbd01
@wtcbd01 4 ай бұрын
Thanks so much for this. Your teaching style is incredible and the subject is well explained.
@MattSimmonsSysAdmin
@MattSimmonsSysAdmin 7 ай бұрын
Absolutely epic video. I was able to follow along with no problems by watching the video and following the code. Really tremendous job, thank you so much! Definitely subscribing!
@pixegami
@pixegami 7 ай бұрын
Thank you for your comment! I'm really glad to hear it was easy to follow - well done! Hope you build some cool stuff with it :)
@deemo16
@deemo16 7 ай бұрын
Great video! This was my first exposure to ChromaDB (worked flawlessly on a fairly large corpus of material). Looking forward to experimenting with other language models as well. This is a great stepping stone towards knowledge based expansions for LLMs. Nice work!
@pixegami
@pixegami 7 ай бұрын
Really glad to hear you got it to work :) Thanks for sharing your experience with it as well - that's the whole reason I make these videos!
@jim93m
@jim93m 5 ай бұрын
Thank you, that was a great walk through very easy to understand with a great pace. Please make a video on LangGraph as well.
@pixegami
@pixegami 5 ай бұрын
Thank you! Glad you enjoyed it. Thanks for the LangGraph suggestion. I hadn't noticed that feature before-tech seems to move fast in 2024 :)
@gustavojuantorena
@gustavojuantorena 8 ай бұрын
Your channel is one of the best of KZfaq. Thank you. Now I'll go watch the video.
@lalalala99661
@lalalala99661 2 ай бұрын
Clean, strucktured, good to follow, tutorial. Thank you for that
@pixegami
@pixegami 2 ай бұрын
Thank you! Glad you enjoyed it!
@nikihu2357
@nikihu2357 Ай бұрын
This is really much easier than what I have imagined. Thank you so much for the explanation!!! I'll try to make my own specialized LLM this weekend :P
@pixegami
@pixegami Ай бұрын
Glad to hear that! Good luck with your app.
@StringOfMusic
@StringOfMusic 2 ай бұрын
Fantastic, clear, concise and to the point. thanks so much for your efforts to share your knowledge with others.
@pixegami
@pixegami 2 ай бұрын
Thank you, I'm glad you enjoyed it!
@DavidCastillo-i6y
@DavidCastillo-i6y 25 күн бұрын
Excellent tutorial and very simple to follow. Thank you!
@mariannedutra
@mariannedutra 2 ай бұрын
I am brazilian software engineering studant, and ive so much to thank you for all the time you had invest on this amazing content that helped me so much!!!!!
@pixegami
@pixegami 2 ай бұрын
Thank you! I’m very glad to hear it was helpful for you ☺️
@narendaPS
@narendaPS 3 ай бұрын
this is the best tutorial i have ever seen on this topic, thank you so much, Keep up the good work. Immediately subscribed.
@pixegami
@pixegami 3 ай бұрын
Glad you enjoyed it. Thanks for subscribing!
@gustavstressemann7817
@gustavstressemann7817 5 ай бұрын
Straight to the point. Awesome!
@pixegami
@pixegami 5 ай бұрын
Thanks, I appreciate it!
@MrValVet
@MrValVet 8 ай бұрын
Thank you for this. Looking forward to tutorials on using Assistants API.
@pixegami
@pixegami 8 ай бұрын
You're welcome! And great idea for a new video :)
@stanTrX
@stanTrX 2 ай бұрын
Thanks for this good beginner video, telling the basics, easy to follow (finally someone) :))
@jasonlucas3772
@jasonlucas3772 3 ай бұрын
This was excellent. easy to follow, has codes and very useful! Thank you.
@pixegami
@pixegami 3 ай бұрын
Thank you, I really appreciate it!
@limethan6991
@limethan6991 Күн бұрын
great quality, clear steps, good presentation. thanks!
@kwongster
@kwongster 5 ай бұрын
Awesome walkthrough, thanks for making this 🎉
@pixegami
@pixegami 4 ай бұрын
Thank you! Glad you liked it.
@IdPreferNot1
@IdPreferNot1 Ай бұрын
Thank you for updating the repo and the details on the c++ install as well!!
@pixegami
@pixegami Ай бұрын
If you are using a local LLM, then it might depend on your computer specs. If you are using a cloud AI (e.g. AWS or OpenAI), it might be a connection bottleneck. Normally it doesn't take more than a few seconds to me for 10 pages, so it does sound like a performance issue.
@theneumann7
@theneumann7 4 ай бұрын
Perfectly explained👌🏼
@mao73a
@mao73a 2 ай бұрын
This was so informative and well presented. Exactly what I was looking for. Thank you!
@pixegami
@pixegami 2 ай бұрын
You're welcome, glad you liked it!
@user-yg8rk3xi8t
@user-yg8rk3xi8t Ай бұрын
Thank you so much for this video. I can't explain how much it helped me out. I have been struggling with a lot of AI concepts at work because I recently transitioned to a company that does that. Your video just solved a huge blocker for him, and also explained some basic things for me. Thank you so much, and God bless you
@pixegami
@pixegami Ай бұрын
You're welcome! I'm very happy to hear that it was useful for you :)
@erikjohnson9112
@erikjohnson9112 7 ай бұрын
I too am quite impressed with your videos (this is my 2nd one). I have now subscribed and I bet you'll be growing fast.
@pixegami
@pixegami 7 ай бұрын
Thank you! 🤩
@harshitsinghai1395
@harshitsinghai1395 21 күн бұрын
Really loved the way you explained everything
@senthilkumarpalanisamy365
@senthilkumarpalanisamy365 2 ай бұрын
Excellent video, very well explained in a very simple way. please do post more in Gen AI space.
@RZOLTANM
@RZOLTANM 3 ай бұрын
Really good. Thank very much sir. Articulated perfectly!
@pixegami
@pixegami 3 ай бұрын
Thank you! Glad you enjoyed it :)
@geoffhirst5338
@geoffhirst5338 4 ай бұрын
Great walkthrough, now all thats needed is a revision to cope with the changes to the langchain namespaces.
@niklasvilnersson24
@niklasvilnersson24 3 ай бұрын
What changes have ben done, I cant get this to work :-(
@luizemanoel2588
@luizemanoel2588 Ай бұрын
​I haven't tested this yet but I believe everything that was from langchain import ... is now from langchain_community import or langchain_community.---.--- etc​@@niklasvilnersson24 Other than that I believe that what I used recently nothing else changed. I'm probably wrong tho
@LoneBagels
@LoneBagels 2 күн бұрын
Duuuuude! Your video is amazing! Appreciate all the details.
@ahmedamamou7221
@ahmedamamou7221 3 ай бұрын
Thanks a lot for this tutorial! Very well explained.
@pixegami
@pixegami 3 ай бұрын
Glad it was helpful!
@thatoshebe5505
@thatoshebe5505 5 ай бұрын
Thank you for sharing, this was the info I was looking for
@pixegami
@pixegami 5 ай бұрын
Glad it was helpful!
@lucasboscatti3584
@lucasboscatti3584 6 ай бұрын
Huge class!!
@rikhavthakkar2015
@rikhavthakkar2015 4 ай бұрын
Simple explained and kept an engaging tone. I would also look for a use case where the source of vector data is a combination of files (PDF, DOCX, EXCEL etc.) along with some database (RDBMS or File based database)
@pixegami
@pixegami 3 ай бұрын
Thanks! That's a good idea too. You can probably achieve that by detecting what type of file you are working with, and then using a different parser (document loader) for that type. Langchain should have custom document loaders for all the most common file types.
@israeabdelbar8994
@israeabdelbar8994 5 ай бұрын
Very helpful video! Keep going, you are the best! Thank you very much, I am looking forward to see a video about Virtuel assistant doing actions. By communicating others applications using API.
@pixegami
@pixegami 5 ай бұрын
Glad you enjoyed it! Thanks for the suggestion :)
@israeabdelbar8994
@israeabdelbar8994 4 ай бұрын
You're welcome @@pixegami
@chrisogonas
@chrisogonas 3 ай бұрын
Well illustrated! Thanks
@pixegami
@pixegami 3 ай бұрын
Thank you!
@basicvisual7137
@basicvisual7137 4 ай бұрын
Finally a good langchain video to understand better. Do you have a video in mind to use local llm using Ollama and local embeddings to port the code ?
@voulieav
@voulieav 5 ай бұрын
Epic. Thank you for sharing this.
@pixegami
@pixegami 5 ай бұрын
Thank you!
@elidumper52
@elidumper52 4 ай бұрын
Super helpful, thank you!
@pixegami
@pixegami 3 ай бұрын
Glad it was helpful!
@stevenla2314
@stevenla2314 2 ай бұрын
Love your videos. I was able to follow along and build my own RAG. Can you expand more on this series and explain RAPTOR retrieval and how to implement it?
@bec_Divyansh
@bec_Divyansh 2 ай бұрын
Great Tutorial! thanks
@williammariasoosai1153
@williammariasoosai1153 5 ай бұрын
Very well done! Thanks
@pixegami
@pixegami 5 ай бұрын
Glad you liked it!
@nagireddygajjela5430
@nagireddygajjela5430 Ай бұрын
Wonderful presentation. Keep doing the same. Great job
@MartinRodriguez-sx2tf
@MartinRodriguez-sx2tf 3 ай бұрын
Muy bueno y esperando el próximo 🎉
@pixegami
@pixegami 3 ай бұрын
Thank you!
@shapovalentine
@shapovalentine 6 ай бұрын
Useful, Nice, Thank You 🤩🤩🤩
@pixegami
@pixegami 5 ай бұрын
Glad to hear it was useful!
@kewalkkarki6284
@kewalkkarki6284 7 ай бұрын
This is Amazing 🙌
@pixegami
@pixegami 6 ай бұрын
Thank you! Glad you liked :)
@limebulls
@limebulls 23 күн бұрын
Good tutorial!
@mukundhachar303
@mukundhachar303 Ай бұрын
Thank you this is an amazing video. Learn lot of things from this video...
@pixegami
@pixegami Ай бұрын
Glad you enjoyed it!
@bcippitelli
@bcippitelli 7 ай бұрын
thanks dude!
@chandaman95
@chandaman95 4 ай бұрын
Amazing video, thank you.
@pixegami
@pixegami 3 ай бұрын
Thank you!
@aiden9990
@aiden9990 6 ай бұрын
Perfect thank you!
@pixegami
@pixegami 6 ай бұрын
Glad it helped!
@tinghaowang-ei7kv
@tinghaowang-ei7kv 3 ай бұрын
Nice,how pretty that is it.
@serafeiml1041
@serafeiml1041 3 ай бұрын
you got a new subscriber. nice work
@pixegami
@pixegami 3 ай бұрын
Thank you! Welcome :)
@jianganghao1857
@jianganghao1857 2 ай бұрын
Great tutorial, very clear
@pixegami
@pixegami 2 ай бұрын
Glad it was helpful!
@pojomcbooty
@pojomcbooty 4 ай бұрын
VERY well explained. thank you so much for releasing this level of education on youtube!!
@pixegami
@pixegami 3 ай бұрын
Glad you enjoyed it!
@litttlemooncream5049
@litttlemooncream5049 5 ай бұрын
helpful if I wanna do analysis on properly-organized documents
@pixegami
@pixegami 4 ай бұрын
Yup! I think it could be useful for searching through unorganised documents too.
@mohanraman
@mohanraman 3 ай бұрын
this is an awesome video. Thank You !! ! Am curious how to leverage these technologies with structured data , like business data thats stored in tables. Appreciate any videos about that.
@user-md4pp8nv7u
@user-md4pp8nv7u 3 ай бұрын
very great!! thanks you
@pixegami
@pixegami 3 ай бұрын
Glad you liked it!
@quengelbeard
@quengelbeard 5 ай бұрын
Hi, by far the best video on Langchain - Chroma! :D Quick question: How would you update the chroma database if you want to feed it with documents (while avoiding duplication of documents) ?
@pixegami
@pixegami 4 ай бұрын
Glad you liked it! Thank you. If you want to add (modify) the ChromaDB data, you should be able to do that after you've loaded up the DB: docs.trychroma.com/usage-guide#adding-data-to-a-collection
@FrancisRodrigues
@FrancisRodrigues 4 ай бұрын
That's the best and most reliable content about LangChain I've ever seen, and it only took 16 minutes.
@pixegami
@pixegami 3 ай бұрын
Glad you enjoyed it! I try to keep my content short and useful because I know everyone is busy these days :)
@Shwapx
@Shwapx 3 ай бұрын
@@pixegamihey great work can we have an updated version with the langchain imports because its throwing all kind of errors of imports which are changed
@shikharsaxena9989
@shikharsaxena9989 2 ай бұрын
best explanation of rag
@pixegami
@pixegami 2 ай бұрын
Thank you!
@PoGGiE06
@PoGGiE06 4 ай бұрын
Great explanation. Perhaps one criticism would be using open ai’s embedding library: would rather not be locked into their ecosystem and i believe that free alternatives exist that are perfectly good! But would have loved a quick overview there.
@pixegami
@pixegami 3 ай бұрын
Thanks for the feedback. I generally use OpenAI because I thought it was the easiest API for people to get started with. But actually I've received similar feedback where people just want to use open source (or their own) LLM engines. Feedback received, thank you :) Luckily with somehitng like Langchain, swapping out the LLM engine (e.g. the embedding functionality) is usually just a few lines of code.
@PoGGiE06
@PoGGiE06 3 ай бұрын
@@pixegami It's a pleasure :). Yes, everyone seems to be using OpenAI by default, because everyone is using chatGPT. But there are lots of good reasons why one might not wish to get tied to open AI, anthropic, or any other cloud-based provider besides the mounting costs if one is developing applications using LLM. E.g. data privacy/integrity, simplicity, reproducibility (e.g. chatGPT is always changing and that is out of your control), in addition a general suspicion of non-open-source frameworks whose primary focus is often (usually?) on wealth extraction, not solution provision. There is not enough good material out there on how to create a basic RAG with vector storage using a local LLM, something that is very practical with smaller models e.g. mistral, dolphincoder, Mixtral 8x7b etc., at least for putting together an MVP. Re: avoiding openAI: I've managed to use embed_model = OllamaEmbeddings(model="nomic-embed-text"). I still get occasional 'openAI' related errors, but gather that Ollama has support for mimicking openAI now, including a 'fake' openAI key, so am looking into that as a fix. ollama.com/blog/windows-preview I also gather that with llama-cpp, one can specify model temperature and other configuration options, whereas with Ollama, one is stuck with the configuration used in the modelfile when the Ollama-compatible model is made (if that is the correct terminology). So I may have to investigate that. I'm currently using llama-index because I am focused on RAG and don't need the flexibility of langchain. Good tutorial in the llama-index docs: docs.llamaindex.ai/en/stable/examples/usecases/10k_sub_question/ I'm also a bit sceptical that langchain isn't another attempt to 'lock you in' to an ecosystem that can then be monetised e.g. minimaxir.com/2023/07/langchain-problem/. I am still learning, so don't have a real opinion yet. Very exciting stuff! Kind regards.
@AlejandroLopez-mm4sg
@AlejandroLopez-mm4sg Ай бұрын
Thanks!
@pixegami
@pixegami Ай бұрын
Wow, so generous :) Thank you. Glad you enjoyed it.
@seankim6080
@seankim6080 4 ай бұрын
Thanks so much! This is super helpful to better understand RAG. Only the thing is still not sure how to run this program that I clonned from your github repository via windows terminal. Will try on my own but if you could provide any guidance or sources KZfaq links anything like that would be much more appreciated.
@user-js6qz2np1m
@user-js6qz2np1m Ай бұрын
Hats off 🎩
@pampaniyavijay007
@pampaniyavijay007 2 ай бұрын
This very simple and useful video for me 🤟🤟🤟
@pixegami
@pixegami 2 ай бұрын
Thank you! I'm glad to hear that.
@matthewlapinta7388
@matthewlapinta7388 2 ай бұрын
This video was pure gold. Really grateful for the concise and excellent walkthrough. I have two additional questions in regards to the metadata and resulting chunk reference displayed. Can you return a screenshot of the chunk/document referenced now that models are multimodal? Also a document title or ability to download such document would also be a cool feature. Thanks so much in advance!
@pixegami
@pixegami 2 ай бұрын
Glad you enjoyed it! I think if you want to display images, or link/share resources via the chunk, you can just embed it at chunk creation time into the document meta-data. Upload your resource (e.g. image) to something like Amazon S3, then put a download link into the meta-data for example.
@tecnom7133
@tecnom7133 20 күн бұрын
Thanks
@SantiYounger
@SantiYounger 4 ай бұрын
thanks for the video, this looks great, but I tried to implement it and seems like the langchain packages needed are no longer available has anyone had any luck getting this to work? Thanks
@sunnysk43
@sunnysk43 8 ай бұрын
Amazing video - directly subscribed to your channel ;-) Can you also provide an example with using your own LLM instead of OpenAI?
@pixegami
@pixegami 8 ай бұрын
Yup! Great question. I'll have to work on that, but in the meantime here's a page with all the LLM supported integrations: python.langchain.com/docs/integrations/llms/
@yahiachammemi8267
@yahiachammemi8267 Ай бұрын
Looking for more amazing content !
@pixegami
@pixegami Ай бұрын
Check out this more advanced RAG tutorial: kzfaq.info/get/bejne/aLp6q9OqtJnJmWg.html And how to deploy it to the cloud (AWS): kzfaq.info/get/bejne/osp2grFz1JingmQ.html
@theobelen-halimi2862
@theobelen-halimi2862 5 ай бұрын
Very clear video and tutorial ! Good job ! Just have a question : Is it possible to use Open Source model rather than OpenAI ?
@pixegami
@pixegami 5 ай бұрын
Yes! Check out this video on how to use different models other than OpenAI: kzfaq.info/get/bejne/ft5_m8iix5y1nYU.html And here is the official documentation on how to use/implement different LLMs (including your own open source one) python.langchain.com/docs/modules/model_io/llms/
@user-iz7wi7rp6l
@user-iz7wi7rp6l 7 ай бұрын
first thank you very much and now also tell to apply memory of various kinds
@pixegami
@pixegami 7 ай бұрын
Thanks! I haven't looked at how to use the Langchain memory feature yet so I'll have to work on that first :)
@user-iz7wi7rp6l
@user-iz7wi7rp6l 7 ай бұрын
@@pixegami ohk i i have implemented memory and other features also also as well as worked with windows also after some monstor errors,, thank once again for the clear working code (used in production) hope to see more in future
@frederikklein1806
@frederikklein1806 6 ай бұрын
This is a really good video, thank you so much! Out of curiosity, why do you use iterm2 as a terminal and how did you set it up to look that cool? 😍
@pixegami
@pixegami 6 ай бұрын
I use iTerm2 for videos because it looks and feels familiar for my viewers. When I work on my own, I use warp (my terminal set up and theme explained here: kzfaq.info/get/bejne/q82noKuQ3eDPc3U.html) And if you're using Ubuntu, I have a terminal setup video for that too: kzfaq.info/get/bejne/i9yJaMR3rbTTdas.html
@jimg8296
@jimg8296 4 ай бұрын
Thank you SO MUCH! Exactly what I was looking for. Your presentation was easy to understand and very complete. 5 STARS! Not to be greedy, but I'd love to see this running 100% locally.
@pixegami
@pixegami 3 ай бұрын
Glad it was helpful! Running local LLM apps is something I get asked quite a lot about and so I do actually plan to do a video about it quite soon.
@jessicabull3918
@jessicabull3918 3 ай бұрын
@@pixegami Yes please!
@user-fj4ic9sq8e
@user-fj4ic9sq8e 4 ай бұрын
Hello, thank you so much for this video. i have a question related of sumuraze questions in LLM documents.for example in vector database have thousands documents with date property, and i want ask the model how much document i received in the last week?
@AdandKidda
@AdandKidda 4 ай бұрын
hi , thanks for such ultimate knowledge sharing . I have a use case: 1. can we perform some action (call an api) as response ? 2. how can we use mistral and opensource embedding for this purpose?
@corbin0dallas
@corbin0dallas 2 ай бұрын
Great tutorial, Thanks! My only feedback is that any LLM already knows everything about Alice in wonderland
@SongforTin
@SongforTin 2 ай бұрын
You can create custom apps for Businesses using their own documents = huge Business opportunity If it really works.
@pixegami
@pixegami 2 ай бұрын
Yeah that's a really good point. What I really needed was a data-source that was easy to understand, but would not appear in the base knowledge of any LLM (I've learnt that now for my future videos).
@slipthetrap
@slipthetrap 7 ай бұрын
As others have asked: "Could you show how to do it with an open source LLM?" Also, instead of Markdown (.md) can you show how to use PDFs ? Thanks.
@pixegami
@pixegami 6 ай бұрын
Thanks :) It seems to be a popular topic so I've added to my list for my upcoming content.
@danishammar.official
@danishammar.official 4 ай бұрын
If made video on above request kindly give link in description it gonna be a good for all users
@jenny_beauty_cz
@jenny_beauty_cz 4 ай бұрын
Instead of md extension you can simply use txt or pdf extension thats it just replace the file extension
@yl8908
@yl8908 3 ай бұрын
Yes, pls share how to work with pdfs directly instead of .mds . Thanks !
@naveeng2003
@naveeng2003 6 ай бұрын
How did you rip the aws documentation
@cindywu3265
@cindywu3265 5 ай бұрын
Thanks for sharing the examples with OpenAI Embedding model. I'm trying to practice using the HuggingFaceEmbeddings because it's free but wanted to check the evaluation metrics - like the apple and orange example you showed. Do you know if it exists by any chance?
@pixegami
@pixegami 4 ай бұрын
Yup, you should be able to override the evaluator (or extend your own) to use whichever embedding system you want: python.langchain.com/docs/guides/evaluation/comparison/custom But at the end of the day, if you can already get the embedding, then evaluation is usually just a cosine similarity distance between the two, so it's not too complex if you need to calculate it yourself.
@xspydazx
@xspydazx 2 ай бұрын
Question : once loading a vector store , how can we output a dataset from the store to be used as a fine tuning object ?
@youngtree10
@youngtree10 21 күн бұрын
thank you so much for the great video! I have a question: if we have multiple sources with conflicting information, how would the generator react?
@vlad910
@vlad910 7 ай бұрын
Thank you for this very instructive video. I am looking at embedding some research documents from sources such as PubMed or Google scholar. Is there a way for the embedding to use website data instead of locally stored text files?
@pixegami
@pixegami 6 ай бұрын
Yes, you can basically load any type of text data if you use the appropriate document loader: python.langchain.com/docs/modules/data_connection/document_loaders/ Text files are an easy example, but there's examples of Wikipedia loaders in there too (python.langchain.com/docs/integrations/document_loaders/). If you don't find what you are looking for, you can implement your own Document loader, and have it get data from anywhere you want.
@jessicabull3918
@jessicabull3918 3 ай бұрын
@@pixegami Exactly the question and answer I was looking for, thanks
@NahuelD101
@NahuelD101 7 ай бұрын
Very nice video, what kind of theme do you use to make the vscode look like this? Thanks.
@pixegami
@pixegami 7 ай бұрын
I use Monokai Pro :)
@pixegami
@pixegami 7 ай бұрын
The VSCode theme is called Monokai Pro :)
@nachoeigu
@nachoeigu 3 ай бұрын
You gained a new subscriber. Thank you, amazing content! Only one question, how about the cost associated with this software? How match it consumes per request?
@pixegami
@pixegami 3 ай бұрын
Thank you, welcome! To calculate pricing, it's based on which AI model you use. In this video, we use OpenAI, so check the pricing here: openai.com/pricing 1 Token ~= 1 Word. So to embed a document with 10,000 words (tokens) with "text-embedding-3-large" ($0.13 per 1M token), it's about $0.0013. Then apply the same calculation to the prompt/response for "gpt-4" or whichever model you use for the chat.
@JJaitley
@JJaitley 5 ай бұрын
@pixegami What are your suggestions on cleaning the company docs before chunking? Some of the challenges faced are how to handle the index pages in multiple pdfs also the headers and footers. You should definitely make some video related to cleaning a pdf before chunking much needed.
@pixegami
@pixegami 5 ай бұрын
That's a tactical question that will vary from doc to doc. It's a great question and a great use-case though for creative problem solving-thanks for the suggestion and video idea.
@mlavinb
@mlavinb 6 ай бұрын
Great content! Thanks for sharing. Can you suggest a Chat GUI to connect?
@pixegami
@pixegami 6 ай бұрын
If you want a simple, Python based one, try Streamlit (streamlit.io/). I also have a video about it here: kzfaq.info/get/bejne/epZ0Z7OSl5jNd2Q.html
@yangsong8812
@yangsong8812 5 ай бұрын
Would love to hear your thoughts if hats on how to use evaluation to keep LLM output in check. Can we set up framework so that we can have an evaluation framework?
@pixegami
@pixegami 4 ай бұрын
There's currently a lot of different research and tools on how to evaluate the output - I don't think anyone's figured out the standard yet. But stuff like this is what you'd probably want to look at: cloud.google.com/vertex-ai/generative-ai/docs/models/evaluate-models
@RobbyRobinson1
@RobbyRobinson1 8 ай бұрын
I was just thinking about this, great work. Hypothetically, what if your data sucks? What models can I use to create the documentation? (lol)
@pixegami
@pixegami 8 ай бұрын
Haha that's a topic for another video. But yeah, if the data is not good, then I think that should be your first focus. This RAG technique builds on the assumption that your data is good-and it just adds value on top of that.
@ailenrgrimaldi6050
@ailenrgrimaldi6050 4 ай бұрын
Thank you for this video, is NLTK something required to do this?
@pixegami
@pixegami 3 ай бұрын
The NLTK library? I don't think I had to use it here in the project, a lot of the other libraries might give you all the functionality at a higher abstraction already.
@anzakx
@anzakx Ай бұрын
Is there a way to change the chunking to be by paragraph so you can reference a page number and paragraph?
@hoangng16
@hoangng16 3 ай бұрын
Thank you for a great video. What if I already did word embedding and in the future I have some updates for the data?
@pixegami
@pixegami 3 ай бұрын
Thanks! I'm working on a video to explain techniques like that. But in a nutshell, you'll need to attach an ID to each document you add to the DB (derived deterministically from your page meta-data) and use that to update entries that change (or get added): docs.trychroma.com/usage-guide#updating-data-in-a-collection
@Chisanloius
@Chisanloius 2 ай бұрын
Great level of knowledge and details. Please where is your Open AI key stored.
@pixegami
@pixegami 2 ай бұрын
Thank you! I normally just store the OpenAI key in the environment variable `OPENAI_API_KEY`. See here for storage and safety tips: help.openai.com/en/articles/5112595-best-practices-for-api-key-safety
@fengshi9462
@fengshi9462 7 ай бұрын
hi, your video is so good. I just wanna know,if i want to automatically change my document in the production environment and keep the query service don't stop and always use the latest document as the sources, how can i do this by changing the code?❤
@pixegami
@pixegami 6 ай бұрын
Ah, if you change the source document, you actually have to generate a new embedding and add it to the RAG database (the Prisma DB here). So you would have to figure out which piece of document changes, then create a new entry for that into the database. I don't have a code example right now, but it's definitely possible.
@FrancisRodrigues
@FrancisRodrigues 4 ай бұрын
pls, I'd like to see a Recommendation model (products, images, etc) based on our different sources, it could be scraping from webpages. Something to use in e-commerce.
@pixegami
@pixegami 3 ай бұрын
Product recommendations are a good idea :) Thanks for the suggestion, I'll add it to my list.
@RajAIversion
@RajAIversion 4 ай бұрын
Nailed it and Easy Understandable, can i make this an chat bot ? Anyone please share your thoughts
@officialayanvarekar
@officialayanvarekar 2 ай бұрын
Great video! how to use this with local models like llama-8b ?
Python RAG Tutorial (with Local LLMs): AI For Your PDFs
21:33
pixegami
Рет қаралды 167 М.
Who has won ?? 😀 #shortvideo #lizzyisaeva
00:24
Lizzy Isaeva
Рет қаралды 65 МЛН
УГАДАЙ ГДЕ ПРАВИЛЬНЫЙ ЦВЕТ?😱
00:14
МЯТНАЯ ФАНТА
Рет қаралды 4 МЛН
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 82 МЛН
Vector Search RAG Tutorial - Combine Your Data with LLMs with Advanced Search
1:11:47
I Analyzed My Finance With Local LLMs
17:51
Thu Vu data analytics
Рет қаралды 451 М.
How to Improve LLMs with RAG (Overview + Python Code)
21:41
Shaw Talebi
Рет қаралды 39 М.
What are AI Agents?
12:29
IBM Technology
Рет қаралды 79 М.
How I Made AI Assistants Do My Work For Me: CrewAI
19:21
Maya Akim
Рет қаралды 767 М.
Run your own AI (but private)
22:13
NetworkChuck
Рет қаралды 1,3 МЛН
Streamlit: The Fastest Way To Build Python Apps?
11:57
pixegami
Рет қаралды 85 М.
The moment we stopped understanding AI [AlexNet]
17:38
Welch Labs
Рет қаралды 776 М.
Who has won ?? 😀 #shortvideo #lizzyisaeva
00:24
Lizzy Isaeva
Рет қаралды 65 МЛН