GPT-4 & LangChain Tutorial: How to Chat With A 56-Page PDF Document (w/Pinecone)

  Рет қаралды 245,653

Chat with data

Chat with data

Күн бұрын

Пікірлер: 314
@chatwithdata
@chatwithdata Жыл бұрын
00:03 PDF demo (56-page Legal PDF doc) 02:05 Visual overview of pdf chatbot architecture 06:56 Code walkthrough pt.1 11:10 Pinecone dashboard + setup 13:43 Code walkthrough pt.2
@yeezythabest
@yeezythabest Жыл бұрын
You should post this in the video description in order for KZbin to use it to chapterize your video
@chatwithdata
@chatwithdata Жыл бұрын
@@yeezythabest ohhh thanks for the tip
@abhinavdhull1431
@abhinavdhull1431 Жыл бұрын
can you make a tutorial on mac os,like step by step guide me follow please.I am a beginner in coding world
@tangdavid3317
@tangdavid3317 Жыл бұрын
@@chatwithdata - error Error: Cannot find module 'next/dist/server/future/route-modules/route-module.js' please help
@erniea5843
@erniea5843 Жыл бұрын
That design chart overview was excellent! That’s what is usually missing from most tech tutorials.
@colbydotcom
@colbydotcom Жыл бұрын
For real! I'm a visual learner, and if I can't visualize something in my head then it's hard for me to understand what's going on. I've watched so many videos from others that are similar to this and I got so much more out of this one just from the opening 5 minutes than I did from the hours and hours of other videos I watched on this topic.
@benohanlon
@benohanlon Жыл бұрын
What tool is it?
@ESGamingCentral
@ESGamingCentral Жыл бұрын
@@benohanlon any updates?, I want to know.
@sebastiantillmanns7747
@sebastiantillmanns7747 Жыл бұрын
@@ESGamingCentral I guess it is Excalidraw
@benohanlon
@benohanlon Жыл бұрын
@Oscar Llerena if you wanted to answer the question, without answering the question, then 10/10.
@a.m2053
@a.m2053 Жыл бұрын
As a software engineer i’m very happy to say: one of the best and coincise video ever saw. Thanks. Really appreciate 🎉😊
@chatwithdata
@chatwithdata Жыл бұрын
Thank you
@JasonMelanconEsq
@JasonMelanconEsq Жыл бұрын
Amazing job! Even as a non-coding attorney, I was able to follow your instruction (with a little help from GPT) and install the code from Github on my Mac, and it worked flawlessly! Occasionally, I get some incorrect or incomplete answers from the chatbox, but it's amazing nonetheless. I sent you a message through Twitter regarding consulting with my developers. Looking forward to hearing from you. : ) Thanks again!👏👏👏
@soumojitguhamajumder3143
@soumojitguhamajumder3143 Жыл бұрын
Do you feel an app that automatically does this for you would have value ? App would contain all these cases and you'd probably only have to ask questions. Also, for example if you search for cases,it would give out similar cases,and say score how similar each of these cases are ? Also, for example if another feature could predict a new case's possible result and potential areas that could a lawyer focus on in terms of one's argument, would this help as well ?
@RezaYassi
@RezaYassi Жыл бұрын
Yes
@sissyrecovery
@sissyrecovery Жыл бұрын
As a programmer who worked with attorneys I wish more attorneys were like you lol
@SwingingInTheHood
@SwingingInTheHood Жыл бұрын
I am on the Weaviate Slack forum and I see newbie questions all the time from people struggling to understand the relationship between embeddings (vectorization) and chat completion. I've been referring them to this video for an overview of the process. Good work!
@nobody796s
@nobody796s Жыл бұрын
is it possible to use similar method here, to review a long code instead of a pdf doc?
@unconv
@unconv Жыл бұрын
Great explanation! So can this chatbot only find the answer to a question if it is included in a single chunk of the original data? So if some question requires information from page 2 and page 30 it can't answer that question correctly?
@resistance_tn
@resistance_tn Жыл бұрын
This is an awesome tutorial ! Hands-on especially for the clear and very well schematised system design :) Subscribed and will wait for upcoming videos !
@codespace
@codespace 9 ай бұрын
Can I upload 1TB of docs/pdf to openai and do prompt chat with it?
@orangtimur6812
@orangtimur6812 Ай бұрын
you can, but you will need to pay pinecone and open ai api for that
@chatwithdata
@chatwithdata Жыл бұрын
If you're running into errors on "ingesting" the data due "Error calling upsert", I posted a list of major culprits to troubleshoot here: github.com/mayooear/gpt4-pdf-chatbot-langchain/issues/4 It's likely you haven't properly configured your Pinecone settings or your insertions above Pinecone's size and insertion limits per upsert request.
@kaifirschau
@kaifirschau 11 ай бұрын
Amazing video, thank you very much! I am trying to get it running with an Azure OpenAI model but get errors there all the time, do you happen to know what has to be changed for that to work?
@ItsNikoSlater
@ItsNikoSlater Жыл бұрын
How can we manipulate the response length to generate longer responses?
@andrewlaery
@andrewlaery Жыл бұрын
Love to see a more detailed strip through. Awesome vid!
@chatwithdata
@chatwithdata Жыл бұрын
I'm covering that here in the upcoming workshop: tinyurl.com/zcks7jsk
@aayushchrs
@aayushchrs Жыл бұрын
Can it ingest tabular data from the PDFs accurately? Superb presentation btw
@김창민-j6b
@김창민-j6b Жыл бұрын
You taught me what I needed most. thank you my messiah!
@MedoHamdani
@MedoHamdani Жыл бұрын
Is it possible to submit more than one book and then chat with all of them at once?
@abedaarabi3014
@abedaarabi3014 10 ай бұрын
Thank you- it great job, but may I ask how the chatbot bring the url links since, you are searching within the pdf. GPT 4 browsing the internet ?
@Kage1128
@Kage1128 Жыл бұрын
can you use this for math books as well?
@martinharris4416
@martinharris4416 Жыл бұрын
Depend on how good the OCR is. Essentially whatever you put id converted to text
@chatwithdata
@chatwithdata Жыл бұрын
Yes, it's a similar approach, you'd just need to more prompt engineering to prime GPT to be an expert "mathematician" and then also provide examples of problems and solutions.
@DGeneral101
@DGeneral101 Жыл бұрын
The upcoming Mathematica plugin integration could probably help as well
@adnuzzolillo
@adnuzzolillo Жыл бұрын
Thank you so much for the tutorial. It was very well explained. I appreciate you sharing your knowledge with the community!
@kishanranawat2481
@kishanranawat2481 Жыл бұрын
What I was looking for. Everything explained so well. Way better than some paid courses.
@internproj
@internproj Жыл бұрын
you have implemented it,if yes can you give your repo link,i am getting pinecone ingest error.even after following the video.
@techknowledge5069
@techknowledge5069 9 ай бұрын
yes same@@internproj
@beralc
@beralc Жыл бұрын
Hi, Great app. I have 2 questions. Apart from gpt3.5 turbo and gpt 4 can we use davinci? I'd like for the AI to reply in spanish, and I don't have access to gpt 4 yet. And.. is there a way not to limit the answers to the pdf and use Chat GPT as well?
@parthbhattacharya9810
@parthbhattacharya9810 Жыл бұрын
Is there a way to upsert embeddings without using fromDocuments? As pinecone free tier doesn't support namespaces anymore
@AmineR31
@AmineR31 Жыл бұрын
Hey can you tell me whats your microphone setup? It sounds amazing
@David-rz4vc
@David-rz4vc Жыл бұрын
My main question is does open ai reads directly from the store or is it sending all that data up to openAI for every question?
@yibuh
@yibuh Жыл бұрын
Great video! I have two questions: is there any way to prevent the chatbot from coming up with an answer? and is there any structure the input data must follow for better results? My chatbot some times sends the wrong answer or completely makes up an answer.
@manuazoulay323
@manuazoulay323 Жыл бұрын
Hey tou have solve the problem ?😢
@b1chler
@b1chler Жыл бұрын
why did you put 1536 into the dimensions field in the pinecone dashboard? Where does this number come from? thanks
@ESGamingCentral
@ESGamingCentral Жыл бұрын
What software was used to create that graphic organizer?
@nikow1060
@nikow1060 Жыл бұрын
Is it possible to use chroma instead of Pinecone ... what would be the downsides of chroma ...? I am asking because chroma is open source and I can store the embeddings on premise as well as in the cloud. Furthermore chroma is free.
@vishalahuja2502
@vishalahuja2502 Жыл бұрын
Is the chat history storing the question and the answers, or just the questions?
@KleiAliaj
@KleiAliaj Жыл бұрын
Thats very nice. I wanted to ask you, How it is so fast in the video. I run it locally and it is like 10-15 seconds slow
@fernandes1431
@fernandes1431 4 ай бұрын
❤ this is the first time I've been able to comprehend the whole chatbot process. Please please can you share this diagram flow chart. Its honestly the best visually and i woild love to be able to play around with it.
@dawn_of_Artificial_Intellect
@dawn_of_Artificial_Intellect Жыл бұрын
Great App! I see the potential of how powerful it can be. Your video is excellent, I got the script up and running and I am a beginner in learning code. Thanks for the tutorial
@PelletsEaseFrance
@PelletsEaseFrance Жыл бұрын
Is this working with pictures?
@zhangxiang18
@zhangxiang18 Жыл бұрын
Hi thanks for your sharing. I came across one error message is creating vector store... error [Error: PineconeClient: Project name not set. Call init() first.] d:\chatPDF\gpt4-pdf-chatbot-langchain\scripts\ingest-data.ts:43 throw new Error('Failed to ingest your data'); but I have set my index name at Pinecone as "ChatPDF001" and set this value in the config file. Any suggestion here? thanks.
@chatwithdata
@chatwithdata Жыл бұрын
Try and upgrade to the latest node version.
@sujitmourya
@sujitmourya Жыл бұрын
Hi, Is there a solution to replace pinecone with cosmodb?
@matmorales2011
@matmorales2011 Жыл бұрын
I didn't find the code line where you find and output the link of the location of the question. Can you help me with that? thanks
@brandonfrancis1317
@brandonfrancis1317 Жыл бұрын
When will enrollment open up? Would love to get used to using these tools.
@suyingluo
@suyingluo Жыл бұрын
May I ask how you jumped to the interface of 6.56? Please ---From a junior high school student who is humble in learning
@suyingluo
@suyingluo Жыл бұрын
I have watched this video no less than ten times but still can't figure it out
@Austin-z3c
@Austin-z3c Жыл бұрын
Great vid. Setup complete. How did you get it on your localhost to test? BTW, anyone ever tell you that you sound like the UFC Champ Adesanya :)
@andydataguy
@andydataguy Жыл бұрын
Great video! Would love to see this done with a notion database using langchain. Perhaps outputting long text into additional motion pages that are then added to pinecone so that it creates a veritable limitless memory of previous responses, answers, and structured content for the usecase
@maorre6809
@maorre6809 Жыл бұрын
I need to use version 4 of ChatGPT and upload tens of thousands of documents If I upload documents in version 3.5, can I use them in version 4 without paying?
@kashifsohail
@kashifsohail Жыл бұрын
Great work!. Few questions, if you can reply plz. 1) how can ask it to look answers in particular file only, rather than all ? 2) what about adding files later, do we need to ingest all, again?. Thanks
@harryzachariou1
@harryzachariou1 Жыл бұрын
Great video, how would you gather the text from a PDF that doesn't encode the text, so its essentially a picture as PDF, would you have to implement some OCR system to extract the text from the PDF to then encode the embeddings? Essentially I have a PDF document that when parsed the text output is ` pageContent: ' ',`
@vlod
@vlod Жыл бұрын
is it possible to use gpt 3.5 instead?
@Mountaineer170
@Mountaineer170 Жыл бұрын
With the new plugin announced, will this be relevant in a few months?
@chatwithdata
@chatwithdata Жыл бұрын
Yes, you won't have control over customizing your prompts and there will be upload limits. Using this open source repo, you can upload PDF docs without outages, limits, privacy concerns etc.
@manuazoulay323
@manuazoulay323 Жыл бұрын
Its available ? you have a link ?
@kingarthur0407
@kingarthur0407 Жыл бұрын
I've written a prompt for GPT-4 that I use with chatGPT in Macromancy formatting to transform it into a legal assistant. and the results have been stellar. Is it possible to encode this prompt into the system you describe so that the bot operates with it in mind?
@msat7755
@msat7755 Жыл бұрын
What if you want to use contious data. For intance I want to create a model that uses embeddings from a csv. This csv file needs updated daily so that it has the most relevant information. How would I update the embeddings with new information from a csv without having create a new embedding everytime I had to do so?
@chatwithdata
@chatwithdata Жыл бұрын
I'll do a video on this soon, but you'd "upsert" the vectorbase only with the new embeddings from the csv file without re-running the ingesting from scratch. Where it gets tricky is when you want to "update" a specific part of your csv file.
@SageLewis
@SageLewis Жыл бұрын
I got this running and am SO excited to keep working on it. Thank you.
@argniests5357
@argniests5357 Жыл бұрын
great video, thanks. I am subbing now. I was wondering, do you know what size limits (number of pages) that your code could handle when injesting pdf files? How long did it take you to figure all this out???
@xCheWy99
@xCheWy99 Жыл бұрын
Hi I am a beginner and just wanted to experiment and play with the program. I followed most steps and I have reached the npm run dev step and opened local3000 to the chat bot, when I test prompted "hello" in the chatbox , it returned this error: PineconeClient: Error calling query: PineconeError: The requested feature 'Namespaces' is not supported by the current index type 'Starter'.
@Jordy-t8y
@Jordy-t8y Жыл бұрын
Hey man, great video! This is awesome, great content please keep going!! I do have one question. From the code I see that we are passing history to the chain.call() function but to me it doesn't seem like history is working? Because when I ask it something, and afterwards I ask could you translate that to french, is says it doesn't have any context of what to translate to french (?) but the question I asked before is in the history I'm sending it. How can I make this chatbot remember what was said?
@josephhart7771
@josephhart7771 Жыл бұрын
I must say, you are an amazing person for doing this. So helpful and so explanatory. Id love to build with you
@aimeeaidanu
@aimeeaidanu Жыл бұрын
This is cool! Can it work with chat-gpt model or gpt--3 mode? I don't have gpt4 api access :)
@farhanhubble
@farhanhubble Жыл бұрын
Thanks for sharing the code and demo. Nitpicking a bit but in the video, under the "Visual Overview" section the "Ingestion pipeline" part of the diagram does not show use of OpenAI Embeddings.
@LeiferMendez
@LeiferMendez Жыл бұрын
Awesome Job 🎉🎉 I will be translates this material to Spanish and post on Channel. Obviously give you all credits
@jonathanchow7687
@jonathanchow7687 5 ай бұрын
Was replicating this project and encounted this error after running npm run ingest: error TypeError: Cannot read properties of undefined (reading 'text'). does anyone know a fix for this?`
@jusbob89
@jusbob89 Жыл бұрын
Is there any way to weight or improve the responses given? i.e. selecting this was useful/correct and have that feedback into the model?
@chatwithdata
@chatwithdata Жыл бұрын
Unless it's verifiable data from an external source the LLM can utilize an API to reach, it will need feedback from the user. Then you can optimize your prompts based on this.
@moreshk
@moreshk Жыл бұрын
managed to get this running locally, but on vercel I am getting a 504 SyntaxError: Unexpected token 'A', "An error o"... is not valid JSON. Any ideas?
@ivanrododendro
@ivanrododendro Жыл бұрын
Hi, very interesting and well done, thank you. Do you think it's possible to achieve similar results with Open Source components ?
@Jjjabes
@Jjjabes Жыл бұрын
Really good explanation and diagram to get your head around the process!
@johnzhu5735
@johnzhu5735 Жыл бұрын
How does full document summary work when you are working with pinecone nearest neighbor document snippets?
@ScottPendergrast
@ScottPendergrast Жыл бұрын
How do we think this would do with a PDF of a long fiction novel? TY!
@SanjeevKumar-hj1fb
@SanjeevKumar-hj1fb Жыл бұрын
Great video. I was curious if we can follow this implementation if the data is kind of semi structured like Project Management data(both text and numerical fields). Does this approach work well only in case of Text data ? Was curious if embeddings work well for mixed data(numerical/text). How would query work if it involves multiple filters on text and numerical fields?
@TelstarB
@TelstarB Жыл бұрын
How do you set the dimensions in pinecone? is just a sufficient number for a large pdf or it came from a calculation? Great work btw!
@chatwithdata
@chatwithdata Жыл бұрын
The dimensions are 1536 due to openai's embeddings function, but isn't related the size of your pdf, it's related to the number representations of your docs. If you don't set this figure, pinecone won't let you insert into the database. You set this when you created an "index". docs.pinecone.io/docs/choosing-index-type-and-size
@BecomeAWebDev
@BecomeAWebDev Жыл бұрын
@@chatwithdata ..... now I'll subscribe to your channel. Important detail. thanks
@mycloudvip
@mycloudvip Жыл бұрын
Great Content! Which TS version is it built on top of? Thanks!
@chatwithdata
@chatwithdata Жыл бұрын
I believe it's the latest one. You can check out the github code in descriptions.
@santiagobarchetta5401
@santiagobarchetta5401 Жыл бұрын
Your work is so valuable. Thanks a lot for this info and the code!
@AiIntegrator
@AiIntegrator Жыл бұрын
Thank you for the Awesome tutorial, Please I want to use the ingest script as a function in the index file in order to upload a file and use it instead of passing a static path. Thanks in advance I already tried, but it's a litle bit complex with next js and typescript. Please if you can help
@hichamzaidi1402
@hichamzaidi1402 Жыл бұрын
I am stuck in the same problem 🙂
@chatwithdata
@chatwithdata Жыл бұрын
You want to upload the file from the frontend and run the ingest script automatically?
@AiIntegrator
@AiIntegrator Жыл бұрын
@@chatwithdata Yes that's right, please if you can help
@AiIntegrator
@AiIntegrator Жыл бұрын
@@chatwithdata Yes that's right, please if you can help
@kirillsavik6615
@kirillsavik6615 Жыл бұрын
hi, thanks a lot for this video. Can you please tell me how to implement the output of messages not in English? e.g. in French
@Steve-js7bp
@Steve-js7bp Жыл бұрын
For the textsplitting part, do you recommend to tokenise the text first?
@chatwithdata
@chatwithdata Жыл бұрын
The textsplitter function in the repo does that all for you under the hood.
@cuentadeyoutube5903
@cuentadeyoutube5903 Жыл бұрын
So, the answer needs to be quite localized on a chunk of the document… right?
@benohanlon
@benohanlon Жыл бұрын
What's the tool to do this discussion?
@GameDownloader112
@GameDownloader112 Жыл бұрын
Will these work on 1000 page pdf?
@depenz
@depenz Жыл бұрын
Whats the difference between the ”standalone question” and the original question, do they differ a lot?
@SergioMiramontes-tp1ed
@SergioMiramontes-tp1ed Жыл бұрын
can it return images if you ask to the chatbot?
@waelabou946
@waelabou946 Жыл бұрын
Great Work! well done i have a question : do we load the data every time to the model or it is saved? i mean each time we need to run we have to do the embdeing to chatGPT 3.5 or 4? cost wise for large data this will be costly..
@nisubhatt8212
@nisubhatt8212 Жыл бұрын
I have the same question…
@VIPHDD
@VIPHDD Жыл бұрын
‚Embeddings Ada’ Usage is priced per input token, at a rate of $0.0004 per 1000 tokens, or about ~3,000 pages per US dollar (assuming ~800 tokens per page): also you need a workaround for massive pdf’s as it’s not able to handle so many chunks (you can find a explanation on the GitHub’s issue page) .. so in my opinion for most use cases its not that costly.. Also the output of GPT is likely not that long so you just pay like 0,002 / 1000 tokens which is also pretty good
@chatwithdata
@chatwithdata Жыл бұрын
No, once you've made the embeddings it's stored on the vectorbase in permanent state and you can start running queries against it without re-running 'ingest' again. You can also backup and download your embeddings locally.
@gustavomonteiro2087
@gustavomonteiro2087 Жыл бұрын
Thanks so much for the code and the video. Any preference between pinecone and supabase pgvector?
@chatwithdata
@chatwithdata Жыл бұрын
For smaller projects where you're already using supabase for auth etc., then the difference isn't much. But for large scale production-ready projects, Pinecone is a more specialized option.
@FarooqKaiser-ca
@FarooqKaiser-ca Жыл бұрын
Awsome tutorial 🎉, I wanted to create a similar project. This will give me the head start on this project. ❤
@shifraznazar1636
@shifraznazar1636 Жыл бұрын
love the audio quality
@GyroO7
@GyroO7 Жыл бұрын
How can I make it use links like you did instead of pdf?
@tangdavid3317
@tangdavid3317 Жыл бұрын
I have an error: - error Error: Cannot find module 'next/dist/server/future/route-modules/route-module.js'
@bugushi
@bugushi Жыл бұрын
Could using embeddings potentially lead to information leakage?
@KOSTANNA1
@KOSTANNA1 Жыл бұрын
Really good video! It would be great to have a deep dive session around it.
@chatwithdata
@chatwithdata Жыл бұрын
I'm covering this in the upcoming workshop: tinyurl.com/zcks7jsk
@maplesyrup272
@maplesyrup272 Жыл бұрын
Is one PDF considered one token? Or does the chat analyse each word in the document as a token? This could make a world of difference when it comes to Api modelling.
@chatwithdata
@chatwithdata Жыл бұрын
The PDF is converted to numbers (embeddings). It is these embeddings that are analyzed and used to retrieve the relevant docs.
@MrPsycic007
@MrPsycic007 Жыл бұрын
Can we do something similar but with Opensource models incase the document is having some privacy realted stuff ?
@mc-qf4bp
@mc-qf4bp Жыл бұрын
Are you a contributor to Langchain? Your videos are awesome, but the langchain typescript sdk can be a bit buggy as of right now. Which is fair because it's still not in a stable 1.0 release yet, and is in the early stages, but it makes it difficult to use in production.
@RedCloudServices
@RedCloudServices Жыл бұрын
what happens with an excel file or if there is a table of numbers inside the PDF? can langchain w gpt be used to ask computational questions? can you make a video using Excel into vectors?
@chatwithdata
@chatwithdata Жыл бұрын
Yes it can. I have an upcoming video addressing this.
@Todestuete
@Todestuete Жыл бұрын
Why is the LLM needed to create the standalone question from the chat history? Isn't it just a concatenated string?
@MaxXFalcon
@MaxXFalcon Жыл бұрын
This looks helpful. But can i use a different language model, for example any other open source?
@MaxXFalcon
@MaxXFalcon Жыл бұрын
For those who also wonder - yes, you can, at least the bing ai said that
@chatwithdata
@chatwithdata Жыл бұрын
Yes, just swap out in "langchain/llms"
@buddy-red
@buddy-red Жыл бұрын
Awesome open source sharing! I have make it working, but what if we want to add more Docs? like thousands of PDF files,ingest command still working good or how to set the files path(const filePath = 'docs/filename.pdf';) in the code? Thank you!
@zhangke1350
@zhangke1350 Жыл бұрын
I have the same question as Buddy. Maybe just add the docs that hasn't been indexed?
@chatwithdata
@chatwithdata Жыл бұрын
Hey thanks. Yes as I mentioned in the video, it will take quite a bit of time to explain how that would work + Q&A around, so based on viewers requests I'll cover that in the upcoming step-by-step chatbot program here: tinyurl.com/37v3k2fz
@DemoBailey
@DemoBailey 9 ай бұрын
Your ingest-data.ts file is different than that of the git repository. Is this pay to play?. I'm getting this from my local response. I'm sorry, but the provided context does not include information about the name, date, or summary of the legal document.
@RezaYassi
@RezaYassi Жыл бұрын
Is there a step by step by step tutorial on how to install this on a mac?
@AdmineTube
@AdmineTube Жыл бұрын
Great work, waiting for more videos and tutorials.
@ogamaniuk
@ogamaniuk Жыл бұрын
As a Ukrainian I have to say you picked a good example pdf! ❤
@gr8tbigtreehugger
@gr8tbigtreehugger Жыл бұрын
Many thanks for this helpful tutorial! Since there is only one PDF, do we really need a pinecone database? Couldn't we just generate a JSON data file?
@TechnoZany
@TechnoZany Жыл бұрын
the pinecone database also helps with the retrieval (finding the most relevant docs for the query). Without that, we will have to check every document in the database for a query.
@thisnext6126
@thisnext6126 Жыл бұрын
Are you able to make it actually have speech in the responses vs just text?
@chatwithdata
@chatwithdata Жыл бұрын
I can try that next
@mpfmax0
@mpfmax0 Жыл бұрын
I wonder if this is the way the new AskYourPDF plug-in works? It clearly can take PDF documents longer than the token window, I guess because it creates these chunks and embeddings, the issue I have with it is that it messes up when searching for the right embeddings, it does not really retrieve the correct info I want. For example, I give it a pdf of a research paper and I want a summary of just the introduction, which is just 2 pages long, and it gives me a mixture of information from around the entire document, not just the introduction. Because I'm guessing it retrieves chunks from all around the document based on similitude to my prompt. It works better when I ask for specific concepts, but when I want it to be more sequential and thorough, like summarize each subsection of a section of the document, it skips some or grabs some stuff from another section, probably because those bits and pieces are on different chunks that still have close relation to my prompt.
Жыл бұрын
Loved your video, certainly learnt few things out of there, Im not programmer, github, it's something completly new for me, it's clear the explanation of the code and how things basically work, amazing, sadly I didn't manage to make anything happen. Probably the only thing I made happen was to clone the repo send it to visual studio and that's it. The instructions pnpm install and so on, dont know where to start. If there's any video or explanation how to make this work so I can move forward I would appreciate it. Thanks anyway for the great tips.
@suyingluo
@suyingluo Жыл бұрын
so do i
@resistance_tn
@resistance_tn Жыл бұрын
@Chat with data; I'm curious to understand how the flow (specifically in terms of grabbing the appropriate context/embeddings that are related to the question prompt) when the related context is sparse across the original document (meaning they're spread on a lot of vectors/embeddings) ?
@chatwithdata
@chatwithdata Жыл бұрын
You mean the related context belongs to more than one chunk/vector? There are several options, but one is to pass the top say 3 returned source documents (by vectorSimilarityScore) as the context, then tweak the prompt accordingly.
@resistance_tn
@resistance_tn Жыл бұрын
@@chatwithdata yep that's what I meant thank you for the idea ! I guess that would be something to play with in the parameters right ?
@chatwithdata
@chatwithdata Жыл бұрын
@@resistance_tn Yes. So by default in this codebase 'returnsourcedocuments' is set to true. So you can play around with the 'k' value for no of returned source docs and also the final prompt sent to the LLM that contains the context.
@resistance_tn
@resistance_tn Жыл бұрын
@@chatwithdata cool thank you very much ! Looking forward for the next content :)
@SebEric-vh7zu
@SebEric-vh7zu Жыл бұрын
hey, great video! does this use conversational memory or a conversational agent? so you can feel like youre actually talking with the ai rather than just Q&A?
@chatwithdata
@chatwithdata Жыл бұрын
Hey, this uses a custom chatVectorDBQAChain hwchase17.github.io/langchainjs/docs/modules/indexes/vector_stores/pinecone The conversational agent is more applicable when you need to access external tools as part of your response.
@manuazoulay323
@manuazoulay323 Жыл бұрын
Did you manage to put a conversational agent and a pdf chatbot?
@santiagocalvo
@santiagocalvo Жыл бұрын
I don't understand how the server works, I'm trying to replicate this using react but can't understand how the chat component "knows" about the api? Is this a next feature that I don't understand? Also thanks for the video!! Amazing content!
LangChain Beginner's Tutorial for Typescript/Javascript
51:54
Chat with data
Рет қаралды 33 М.
1, 2, 3, 4, 5, 6, 7, 8, 9 🙈⚽️
00:46
Celine Dept
Рет қаралды 66 МЛН
ЛУЧШИЙ ФОКУС + секрет! #shorts
00:12
Роман Magic
Рет қаралды 25 МЛН
Triple kill😹
00:18
GG Animation
Рет қаралды 18 МЛН
Don't Use ChatGPT Until You Watch This Video
13:40
Leila Gharani
Рет қаралды 1,7 МЛН
Python RAG Tutorial (with Local LLMs): AI For Your PDFs
21:33
pixegami
Рет қаралды 285 М.
The LangChain Cookbook - Beginner Guide To 7 Essential Concepts
38:11
How to build chat with your data using Pinecone, LangChain and OpenAI
15:05
RAG-GPT: Chat with any documents and summarize long PDF files with Langchain | Gradio App
1:24:56
Farzad Roozitalab (AI RoundTable)
Рет қаралды 32 М.
1, 2, 3, 4, 5, 6, 7, 8, 9 🙈⚽️
00:46
Celine Dept
Рет қаралды 66 МЛН