Don't just use ChatGPT with your PDFs

Поділитися
Вставка
  • Опубліковано 21 жов 2024
  • There are some incredible applications for ChatGPT that require going beyond simply what ChatGPT can do. Controlling the memory context using a custom RAG solution more directly allows you to fully leverage what AI clients can do for you.
    I go over an application to create a Game Assistant for 1st Edition AD&D and show how I overcame malformed PDFs to produce something useful.
    For more content be sure to visit our blog: blog.stabledis...

КОМЕНТАРІ • 9

  • @1981jasonkwan
    @1981jasonkwan 11 місяців тому +3

    Not sure I understood what your solution to the problem is from the video. Do you parse the PDF into a text file or some sort of markdown?

    • @StableDiscussion
      @StableDiscussion  11 місяців тому +3

      Thanks for asking! Agreed, didn't get into it into the details. There's a lot of parts to that system that I'd love to get into in a later video but here's an outline:
      I took the PDF and used the OpenAI API to fix a lot of the PDF OCR errors in the document like I showed. After this I used a loader to break the file into chunks and track page numbers and other helpful lookup information (section, etc). Then I find relevant chunks that are similar to the users prompts and pass those chunks and the prompt to the OpenAI API.

    • @samketola919
      @samketola919 10 місяців тому

      @@StableDiscussion will you present those details to us?

  • @combocoyote
    @combocoyote 11 місяців тому +1

    this is amazing. i need to learn how to code

  • @hamdanhashmi5112
    @hamdanhashmi5112 11 місяців тому +3

    I am subscribing. this was really helpful!!!

  • @Trancer006
    @Trancer006 16 днів тому

    Isn't RAG used with vectors rather than keyword matching? This makes it really costly.

    • @StableDiscussion
      @StableDiscussion  15 днів тому

      Costly by what measure? There are vector databases that optimize the compute on these. From a storage perspective there is some cost there but you actually don’t need to vectorize the entire document which can reduce size.
      I think if you’re looking at optimizing anything with AI you’re likely still pretty early. Optimize and you might get left behind

    • @Trancer006
      @Trancer006 15 днів тому

      @@StableDiscussion It cost me like 8k tokens when i uploaded a few page document and asked model to retrieve a specific piece of information with plain language. So i figured it's too costly then and I wasn't using it the intended way.