OMG someone took the time to talk about usage costs. No one has yet herded up usage case scenarios in relation to cost from major AI vendors. Thanks for your consideration in this area.
At this point it doesn't get any easier than that! I was able to drop in a technical document that makes my eyes bleed when I read it and just start asking questions of it instead. Great job! If someone would bundle this up into a nice little application and let me aim it at directories full of documents I think they could make a boatload of money.
@@blockchainbrudda3051 aka "folders" Like D:/Technical Documents/ I can't wait for the day when SharePoint has AI assistance built in so a company can ask natural language questions of their business content and get back Chat-GPT style answers with links to the source material. It'll be a revolution for content management and productivity.
no dude its still giving me an error. please can you have another look? Notebook loading error There was an error loading this notebook. Ensure that the file is accessible and try again. Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See developers.google.com/identity/sign-in/web/devconsole-project.
A very clear explanation. Before this video, I was confused about the purpose of embeddings and how the actual answers are produced and the video explained it very well.
ChatPDF is also good. I have used it.. and its free for 120 pages, 3 PDFs/day, and 50 questions/day... one can pay $5 per month to get very good upgrades
Thanks for a very instructive video and learned quite a bit from your step by step guide. Much appreciate the effort you put in & you have inspired me to keep expanding my knowledge in this area. Thank you.
Wow, I stared at that opening graph for like 10 minutes being in awe, realizing the implications and uses, marveling at the elegance. This is insanely similar to an approach I thought of to extract new information during conversation, but this is more elegant. I should start making graphs of my approaches, since they do tend to get pretty complex and sometimes I lose track of what I'm doing or trying to do.
what is the approx cost of API, if I use a University Subject's textbook with 1000 pages? I mean cost of embedding the pdf data to model and also the search cost for questions. Can you tell the cost in the form of API pricing or tokens?
@@dongnguyenanh7282 This is the default that u should use /content/gdrive/My Drive/data/2023_GPT4All_Technical_Report.pdf. i would suggest to make a folder named 'data' and place your pdf file in it. It worked for me
@@dongnguyenanh7282 Hi, I uploaded my own file to my Google Drive. You must allow access to the drive while signed in to your Google account. For me it looks like this: reader = PdfReader('/content/gdrive/My Drive/my.pdf')
@@dongnguyenanh7282 "/content/gdrive/My Drive/" is the root dir of your gdrive, you can append you file path in gdrive after this root dir. you can treat it as a real folder and use 'ls' to find out where your file is.
When I try to query it gives me an error "This model's maximum context length is 4097 tokens, however you requested 4372 tokens (4116 in your prompt; 256 for the completion). Please reduce your prompt; or completion length." This may be because I can't seem to get a gpt model that supports large proms. Honestly, it won't let me specify any model at all. Although I put it in the right place according to the timecode (8:59). When trying to specify the model, it gives the error "File "", line 1 chain = load_qa_chain(OpenAI(gpt-4-32k-0314), chain_type="stuff") ^ SyntaxError: invalid decimal literal"
If you have access to the 32k tokens model then change it like this. chain = load_qa_chain(OpenAI(model_name='gpt-4-32k-0314'), chain_type="stuff") This will work. However, if you are using the default model, then as the error message is showing you are providing more tokens than what the model supports. In this case you want to reduce the number of documents that are being return by the similarity search results. Pass a value of k (by defult its set to 4). I will recommend starting with 3 and if it still doesn't resolve the issue, go even lower. docsearch.similarity_search(query, k=4) Hope this helps.
The Best tool for this is ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-bcK7LldB3dk.html I like some of the transitions, but sometimes they're a bit too much and are seemingly random. Since we use these persistent elements that transition across pages to indicate some kind of relationship between the previous and the next states, some of your transitions confuse me because I can't immediately see what the relationship is. For example 1:23 of the selectable tiles (which weren't selected) transition into being two switches... does that mean anything? are they related in some way? I see this as random and a bad use of the design language. However, at 3:14 I like the transition from switches to the ticks on a paper, that makes sense to me. Epic presentation tho
Thanks, can we also use it with non pay-for-each-token models like ChatGPT3.5 or ChatGPT4? (Might be a stupid question; but i did not find an answer to this so far)
Alright, let's be real here. I have no idea who you are, what IDE you're using, or how AI works (I still think it stands for "Artificial Iguanas"). but I can confidently say that your video is fantastic! 🔥Great job! 🔥
I have this use-case where there are different types of documents. I can parse documents using document loaders using langchain. But, there are images also in these documents. I want to store them as metadata and if answer generated from a context chunk it show the image also. Please help.
Fantastic video. I'm sure someone has made a follow-up somewhere, but can you help me understand how to wrap everything into my own UI where I can pass a parameter through to the search query so it can effectively act as a chatbot?
I have some JSON files which I want to use for chatbot data source. How to store the JSON information in Croma DB using embedding and then retrieve it based on the user query. I googled a lot but did not find any answers.
Hello, thanks for this amazing content ! I tried it with multiple PDF and CHATGPT get confused when I ask him generic questions that are similar on multiple documents (for example : "what are the skills of Jhon DOE ? " when I uploaded multiple PDF resume, it send me back the skills of everyone in the vector database) How do you manage multiple PDF ?
I have another video on dealing with multiplle PDF files. Have a look at that. You can set it to give you the top k responses. Will be making a video on it soon.
@@engineerprompt Your explanation is very didactic. Your code is very clear. I look forward to your new video on chatting with multiple PDFs. Congratulations.
the 3 questions you are asking are very simple. running this on a company's annual report 10-K. There are many questions e.g. what is the capital expenditure for 2022. The answers exist in the PDF yet it says 'i don't know'.
Thanks for this video it's really helpful. Could you make a video on how to do embedding with gpt4all and langchain on colab , it would be cool to be able to run your own models and have your own extra data sets
How can I combine the RetrievalQAWithSourcesChain from your other tutorial into these codes. Basically, I want to provide the references which will return the page number or numbers, within the PDF document, that the answer is found. Please help.
I used a research paper as input pdf and i want it to create a 1500 word summary but it cuts off at 200 something words, also where you specified i cant input any models. ( 8:59 )
I have a question.. So what If I want to have like a knowledge of chatGPT model which I specify, plus the added information from the PDF file? How is this achievable?
I am passing the entire document and able to retrieve all the details I need in a single prompt. But response time goes higher. Vice versa if I go with multiple prompts response time is less but since I need to pass the input document everytime usage of token goes high. I am building an application in drf and I don't need any user interface for this. Just need to hit the openAI once to get relevant results from the document and send as json response. Any solutions?
[SOLVED] PDF reader does not work. Had to carefully edit the PDF location based on the exact file name spelling and exact folders used, based on the existing spelling of what goes there.
Hello in the case that i had a diagram, graph, chart, or any kind of graphic organizer in the pdf, is it possible for that too to be inputed? Thank you so much btw for the excellent video.
Hello, how do you think i can handle the same process with lot of files of my own company database, i have few Gigabytes of files that i would need to scan & chunks to create my own database, then connect with GPT4all to interact with question regarding my company, give some tasks etc... thx for the head up
Well we still have the token limit, because it can never feed in the whole pdf in the LLM, it works great for talking about specific paragraphs, because it can easily retrieve the specific paragraph you have a question about and feed this in the LLM but its actually not that good for summarizing an entire pdf
Well explained. Thank you for sharing your knowledge with us. I want to ask if it is possible to get response of a query from the vector database and ad well as the outside the vector database
So when does this use the API the most? During the embedding or during the query? If its during the embedding, can I pickle the results so I can query the same stuff faster and more cheaply in the future?
You can build GUI application on top of it. Check this out: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-RIWbalZ7sTo.html I haven't used it for any other language but I think it can be done.
Nice video! I assume that DeepL uses a similar approach to translate PDFs. I used it but encountered some problems. For example, if a sentence does not end on one page, it can cause problems and return nonsense. This may have been the reason for our "Overlap"? So, I rewrote some 250-page-long documents to eliminate any overlapping sentences from page to page. (From now on, I will compare translating a text to making queries, since both require a comparable amount of "work" for GPT.) This helped a lot, but not always. In my opinion, the reason for the occasional issues is that it is difficult to predict the number of tokens required for each page. If the text, like in my case, is complex scientific or technical content, GPT will need more tokens for the same number of characters than it would for a fairy tale, for example. Therefore, with a technical or scientific document, you may run out of tokens very quickly if the content is complex. Whether it's translating or making queries, I believe this problem will arise. Perhaps we need to wait for GPT to upgrade the maximum number of tokens by 2-3 times from now until it can handle any kind of text. Currently, you could reduce the format of your pages to ensure that each page has less (con)text.
I have been looking for something like this for almost 2 months, and watched at least a dozen youtube videos. This is the first video/code that acutally works! Question... suggestions on how to connect this to streamlit or another webbased query platform?
Amazing tutorial, but is there a way to have multiple pdf all stored in the same place once for all and then go there for the query as we are doing in this tutorial? From a practical point it would have much more sense...
There is more interest that I anticipated :-) I am going to be making more videos on the topic with practical use cases (multiple files, different file formats etc.). Keep an eye out for those!
Thanks so much, this was very helpful! You mentioned doing a version that can take in multiple files within a folder, what are the changes required? Will the embeddings retain a correlation to the rest of their respective file (e.g. if i ask who are the authors of a particular quote somewhere in the middle of a paper, how will it know that it relates to the names right at the beginning if there are multiple different papers embedded?)
great simplified video explanation. In the part where you choose the text-ada model. Can you replace that with the model id of an openai fine-tuned model we created? This way we can use the fine-tuned model to speak with the pdf?
@@engineerprompt so basically if i wanted, i can say have a fine tuned model that speaks like Thor read my pdf knowledge base and answer in the way of Thor. is this correct?
thank you! Is there a way to adjust the token size of the output? i would like to add more context to the output. also on minute 9 you mention changing ai model. how exactly do i do that?
Nice, I don't have the basic coding skills and I feel that's a must. I will like to challenge you though to create an App that can compare two or more than two documents and to discover if there are issues of copy and paste or plagiarism between the documents without running a search across the whole internet. Is this doable?
Thanks! This was super helpful and I was able to query my own PDF's but I can't figure out where and how to specify the LLM I want to use GPT-4. Can you please let me know?
Hi, thank you for the video. I need your help. I want to use this solution. However, i would to base gpt answers on one hundreds pdf files. Each pdf file is a book about 200 pages. I do not see in this video how we can rely on several pdf.
Check this out for multiple files. Will be making more detailed videos on the topic soon ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-s5LhRdh5fu4.html
The cost question was incorrect tho. It says they got GPU's for 800$ and failed trainings for about 500$ using the OpenAI API, then they say the full training could be done with 100$ renting a gpu. :/