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

Поделиться
HTML-код
  • Опубликовано: 28 ноя 2024

Комментарии • 314

  • @chatwithdata
    @chatwithdata  Год назад +33

    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 Год назад +4

      You should post this in the video description in order for RUclips to use it to chapterize your video

    • @chatwithdata
      @chatwithdata  Год назад +3

      @@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 Год назад +75

    That design chart overview was excellent! That’s what is usually missing from most tech tutorials.

    • @colbydotcom
      @colbydotcom Год назад +1

      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 Год назад +1

      What tool is it?

    • @ESGamingCentral
      @ESGamingCentral Год назад

      @@benohanlon any updates?, I want to know.

    • @sebastiantillmanns7747
      @sebastiantillmanns7747 Год назад +1

      @@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 Год назад +24

    As a software engineer i’m very happy to say: one of the best and coincise video ever saw. Thanks. Really appreciate 🎉😊

  • @JasonMelanconEsq
    @JasonMelanconEsq Год назад +8

    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 Год назад +3

      As a programmer who worked with attorneys I wish more attorneys were like you lol

  • @SwingingInTheHood
    @SwingingInTheHood Год назад +1

    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!

  • @김창민-j6b
    @김창민-j6b Год назад +2

    You taught me what I needed most. thank you my messiah!

  • @chatwithdata
    @chatwithdata  Год назад +6

    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.

  • @kishanranawat2481
    @kishanranawat2481 Год назад

    What I was looking for. Everything explained so well. Way better than some paid courses.

    • @internproj
      @internproj Год назад +1

      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 10 месяцев назад

      yes same@@internproj

  • @resistance_tn
    @resistance_tn Год назад +27

    This is an awesome tutorial ! Hands-on especially for the clear and very well schematised system design :) Subscribed and will wait for upcoming videos !

  • @SageLewis
    @SageLewis Год назад

    I got this running and am SO excited to keep working on it. Thank you.

  • @andrewlaery
    @andrewlaery Год назад +2

    Love to see a more detailed strip through. Awesome vid!

    • @chatwithdata
      @chatwithdata  Год назад

      I'm covering that here in the upcoming workshop: tinyurl.com/zcks7jsk

  • @adnuzzolillo
    @adnuzzolillo Год назад +5

    Thank you so much for the tutorial. It was very well explained. I appreciate you sharing your knowledge with the community!

  • @aayushchrs
    @aayushchrs Год назад +1

    Can it ingest tabular data from the PDFs accurately? Superb presentation btw

  • @nobody796s
    @nobody796s Год назад +2

    is it possible to use similar method here, to review a long code instead of a pdf doc?

  • @unconv
    @unconv Год назад +3

    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?

  • @andydataguy
    @andydataguy Год назад +9

    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

  • @shifraznazar1636
    @shifraznazar1636 Год назад +1

    love the audio quality

  • @fernandes1431
    @fernandes1431 5 месяцев назад

    ❤ 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.

  • @ItsNikoSlater
    @ItsNikoSlater Год назад +2

    How can we manipulate the response length to generate longer responses?

  • @LeiferMendez
    @LeiferMendez Год назад

    Awesome Job 🎉🎉 I will be translates this material to Spanish and post on Channel. Obviously give you all credits

  • @dawn_of_Artificial_Intellect
    @dawn_of_Artificial_Intellect Год назад +1

    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

  • @ogamaniuk
    @ogamaniuk Год назад

    As a Ukrainian I have to say you picked a good example pdf! ❤

  • @farhanhubble
    @farhanhubble Год назад +1

    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.

  • @jonathanchow7687
    @jonathanchow7687 5 месяцев назад +1

    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?`

  • @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

  • @parthbhattacharya9810
    @parthbhattacharya9810 Год назад

    Is there a way to upsert embeddings without using fromDocuments? As pinecone free tier doesn't support namespaces anymore

  • @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

  • @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'.

  • @santiagobarchetta5401
    @santiagobarchetta5401 Год назад +3

    Your work is so valuable. Thanks a lot for this info and the code!

  • @yibuh
    @yibuh Год назад +2

    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.

  • @tangdavid3317
    @tangdavid3317 Год назад +1

    I have an error:
    - error Error: Cannot find module 'next/dist/server/future/route-modules/route-module.js'

  • @AdmineTube
    @AdmineTube Год назад +1

    Great work, waiting for more videos and tutorials.

  • @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?

  • @josephhart7771
    @josephhart7771 Год назад

    I must say, you are an amazing person for doing this. So helpful and so explanatory. Id love to build with you

  • @Kage1128
    @Kage1128 Год назад +10

    can you use this for math books as well?

    • @martinharris4416
      @martinharris4416 Год назад +5

      Depend on how good the OCR is. Essentially whatever you put id converted to text

    • @chatwithdata
      @chatwithdata  Год назад +7

      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 Год назад +3

      The upcoming Mathematica plugin integration could probably help as well

  • @MedoHamdani
    @MedoHamdani Год назад

    Is it possible to submit more than one book and then chat with all of them at once?

  • @camcommute
    @camcommute Год назад

    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?

  • @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?

  • @elisimic4371
    @elisimic4371 Год назад

    Amazing presentation skills!

  • @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.

  • @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?

  • @brandonfrancis1317
    @brandonfrancis1317 Год назад

    When will enrollment open up? Would love to get used to using these tools.

  • @abedaarabi3014
    @abedaarabi3014 11 месяцев назад

    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 ?

  • @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 :)

  • @b1chler
    @b1chler Год назад

    why did you put 1536 into the dimensions field in the pinecone dashboard? Where does this number come from? thanks

  • @msat7755
    @msat7755 Год назад +1

    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.

  • @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

  • @Jjjabes
    @Jjjabes Год назад

    Really good explanation and diagram to get your head around the process!

  • @beralc
    @beralc Год назад +1

    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?

  • @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.

  • @sujitmourya
    @sujitmourya Год назад

    Hi, Is there a solution to replace pinecone with cosmodb?

  • @cuentadeyoutube5903
    @cuentadeyoutube5903 Год назад

    So, the answer needs to be quite localized on a chunk of the document… right?

  • @Todestuete
    @Todestuete Год назад

    Why is the LLM needed to create the standalone question from the chat history? Isn't it just a concatenated string?

  • @vishalahuja2502
    @vishalahuja2502 Год назад

    Is the chat history storing the question and the answers, or just the questions?

  • @zhangxiang18
    @zhangxiang18 Год назад +2

    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.

  • @depenz
    @depenz Год назад

    Whats the difference between the ”standalone question” and the original question, do they differ a lot?

  • @johnzhu5735
    @johnzhu5735 Год назад

    How does full document summary work when you are working with pinecone nearest neighbor document snippets?

  • @AiIntegrator
    @AiIntegrator Год назад +2

    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  Год назад +1

      You want to upload the file from the frontend and run the ingest script automatically?

    • @AiIntegrator
      @AiIntegrator Год назад +1

      @@chatwithdata Yes that's right, please if you can help

    • @AiIntegrator
      @AiIntegrator Год назад

      @@chatwithdata Yes that's right, please if you can help

  • @SwingingInTheHood
    @SwingingInTheHood Год назад +2

    This is a great flowchart. However, I still don't understand why, in your architecture, you: "chat history + new question --> submit to gpt to generate new standalone question --> vector search with new standalone question" instead of "chat history + new question --> vector search". We now have three OpenAI api calls per query (creation of standalone question, vectorization of question and standalone question + context documents). And, what goes into the chat history? The questions, context documents submitted and responses OR just standalone questions and responses?

    • @sissyrecovery
      @sissyrecovery Год назад +1

      If you've used a lot of LLMs like I have, you'd likely intuitively KNOW that you should do it this way. You develop a feel for what's going to produce the best results. But anyways, here are some specific reasons (courtesy of gpt3.5):
      1. Avoidance of context collapse: By creating a standalone question that combines the recent chat history with the new question, the app is able to avoid "context collapse", where the model becomes confused by different topics and the resulting response may not be relevant to the specific question being asked. By creating a standalone question, the app can ensure that the model is focused on the specific topic at hand.
      2. Reduction in computational costs: By creating embeddings based on the standalone question, the app can reduce the computational cost of vector search, as the search is only being done on a single, well-defined question rather than the potentially complex and convoluted chat history. This can speed up the response time of the app and improve the overall user experience.
      3. Improved accuracy: By creating a standalone question, the app can ensure that the model is focusing on the most important aspects of the conversation and the specific question being asked. This can improve the accuracy of the resulting response and make the app more effective at providing useful information to the user.

    • @SwingingInTheHood
      @SwingingInTheHood Год назад +1

      @@sissyrecovery I have only worked with the OpenAI LLMs, and not for very long, so this response is extremely helpful and enlightening for me. I am using the Weaviate GraphQL query architecture, so I've got another step after I get the standalone question: I've got to extract from it the core "concept" of the question in order to retrieve the relevant docs to submit as "context" to the LLM. Sheesh! Again, thanks for taking the time to respond.

    • @SwingingInTheHood
      @SwingingInTheHood Год назад

      @@sissyrecovery I saved your comment to review as I was coding my app. It is only a prototype at this point, but it is executing chat completions successfully, standalone questions and all! Just wanted to come back and say "Thank you" for helping me figure this out.

    • @sissyrecovery
      @sissyrecovery Год назад

      @@SwingingInTheHood great to hear, glad I could help!

  • @daniiielsan
    @daniiielsan Год назад

    great video! waitinig for more with Langchain 🙌

  • @orangtimur6812
    @orangtimur6812 2 месяца назад

    i dont know exactly, looks like pinecone sometimes give wrong file if you using large different LAW CASE document, i use supabase as vector, i think its more accurate

  • @hellojeezai
    @hellojeezai Год назад

    Hey I changed the PDF on my docs folder and have been getting "Warning: Invalid stream: "FormatError: Bad FCHECK in flate stream: 120, 239"" after that change. The new PDF turns entirelly blank after I run ingest. Plese help guys :/

  • @AmineR31
    @AmineR31 Год назад

    Hey can you tell me whats your microphone setup? It sounds amazing

  • @FarooqKaiser-ca
    @FarooqKaiser-ca Год назад +2

    Awsome tutorial 🎉, I wanted to create a similar project. This will give me the head start on this project. ❤

  • @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

  • @kingarthur0407
    @kingarthur0407 Год назад +1

    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?

  • @RezaYassi
    @RezaYassi Год назад

    Is there a step by step by step tutorial on how to install this on a mac?

  • @tarrywang6180
    @tarrywang6180 Год назад

    I ran the command "npm run ingest" and got the error The requested module '@esbuild-kit/core-utils' is expected to be of type CommonJS, could anyone who can help?

  • @GyroO7
    @GyroO7 Год назад

    How can I make it use links like you did instead of pdf?

  • @benohanlon
    @benohanlon Год назад

    What's the tool to do this discussion?

  • @ScottPendergrast
    @ScottPendergrast Год назад

    How do we think this would do with a PDF of a long fiction novel? TY!

  • @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!

  • @shelabhtyagi2157
    @shelabhtyagi2157 Год назад

    how to work with uploaded documents , if the user uploads document and gets a trained chatbot on it

  •  Год назад +1

    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.

  • @TelstarB
    @TelstarB Год назад +2

    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  Год назад +6

      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

  • @SergioMiramontes-tp1ed
    @SergioMiramontes-tp1ed Год назад

    can it return images if you ask to the chatbot?

  • @harryzachariou1
    @harryzachariou1 Год назад +2

    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 Год назад +1

    With the new plugin announced, will this be relevant in a few months?

    • @chatwithdata
      @chatwithdata  Год назад +2

      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 ?

  • @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

  • @lucawurker4911
    @lucawurker4911 Год назад

    I see the following problem with this: Imagine a text like an earning transcript where the company doesn't say our revenue was x$, but rather talks about all their different venturers separately and lists the according revenue. Like this:
    in the cloud business we made a revenue of 13 billion...
    In the ai business we made a revenue of 5 billion...
    As I understand it, using the embeddings the ai would probably think, that the total revenue was 13 or maybe 5 billion, but wouldn't be able to calculate the whole revenue, because it would need the context of the whole earnings call for this.
    Is this right, or am I misunderstanding something?

  • @maplesyrup272
    @maplesyrup272 Год назад +1

    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  Год назад +1

      The PDF is converted to numbers (embeddings). It is these embeddings that are analyzed and used to retrieve the relevant docs.

  • @bugushi
    @bugushi Год назад

    Could using embeddings potentially lead to information leakage?

  • @Steve-js7bp
    @Steve-js7bp Год назад

    For the textsplitting part, do you recommend to tokenise the text first?

    • @chatwithdata
      @chatwithdata  Год назад +1

      The textsplitter function in the repo does that all for you under the hood.

  • @SanjeevKumar-hj1fb
    @SanjeevKumar-hj1fb Год назад +1

    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?

  • @mc-qf4bp
    @mc-qf4bp Год назад +1

    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.

  • @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.

  • @MrPsycic007
    @MrPsycic007 Год назад

    Can we do something similar but with Opensource models incase the document is having some privacy realted stuff ?

  • @codespace
    @codespace 10 месяцев назад

    Can I upload 1TB of docs/pdf to openai and do prompt chat with it?

    • @orangtimur6812
      @orangtimur6812 2 месяца назад

      you can, but you will need to pay pinecone and open ai api for that

  • @ESGamingCentral
    @ESGamingCentral Год назад

    What software was used to create that graphic organizer?

  • @waderupert
    @waderupert Год назад

    Very cool tutorial. Extremely informative!!

  • @kimvanrompay8018
    @kimvanrompay8018 Год назад

    How do you convert your standalone question into embeddings?

  • @pynick
    @pynick Год назад

    Great Work... Thanks I will be able to use this for lot of things !

  • @buddy-red
    @buddy-red Год назад +1

    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  Год назад +4

      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

  • @danjay2498
    @danjay2498 Год назад

    Very concise and clear. Thank you.

  • @resistance_tn
    @resistance_tn Год назад +2

    @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 :)

  • @PelletsEaseFrance
    @PelletsEaseFrance Год назад

    Is this working with pictures?

  • @waelabou946
    @waelabou946 Год назад +1

    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  Год назад +1

      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.

  • @aimeeaidanu
    @aimeeaidanu Год назад

    This is cool! Can it work with chat-gpt model or gpt--3 mode? I don't have gpt4 api access :)

  • @RedCloudServices
    @RedCloudServices Год назад +1

    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.