The missing pieces to your AI app (pgvector + RAG in prod)

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

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

  • @shinchima
    @shinchima Год назад +37

    Give this man a raise. Good speed and complete. 9.99/10 - nobody gets a 10

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

    • @HashimWarren
      @HashimWarren 8 месяцев назад +8

      so the scale is from 0 - 9.99 🙂

    • @shinchima
      @shinchima 8 месяцев назад

      @@HashimWarren absolutely!😉

    • @rembautimes8808
      @rembautimes8808 6 месяцев назад +1

      Excellent tutorial, so well explained. Thanks so much

  • @cryarchy
    @cryarchy 6 дней назад

    Thank you, @Supabase. I got more from this video that I expected to. I came here to learn how to use embeddings for RAG and ended up learning that and the following:
    - You can generate embeddings on the client (neat strategy to reduce the server workload)
    - RLS in postgres,
    - Supabase edge functions, and
    - Vaults.
    It was great to see how the various pieces come together to make up a usable AI-centric application.

  • @Mburdo511
    @Mburdo511 10 месяцев назад +13

    This is truly an unbelievable tutorial. College professors could learn a lot from you. The fact that this quality is free is mind blowing

  • @brucewayne2480
    @brucewayne2480 Год назад +14

    One of the best tutorials I've seen in my entire life. Everything is clear, no shortcuts, no analogies, no abtractions. we learn a lot of things from different fields along with production best practices.
    This is how tutorials should be.
    Thank you so much ! Looking forward to learn more from you

  • @NotAllHeroesWearCapes-101
    @NotAllHeroesWearCapes-101 Год назад +34

    this is one of the best video came out of Supabase. Please do more such detailed videos. thanks

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

      Good to know this style is helpful - thanks for watching!

  • @sumodd
    @sumodd Год назад +16

    Please do more videos like this, truly amazing work. This helps me prevent a whole lot of headaches. I love Supabase 💚

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

      We love you too 💚

  • @VictorSouto
    @VictorSouto 5 месяцев назад +3

    This video is mindblowing. 10/10
    I'm a Tech Lead, with more than 15years in software engineering and I can already feel that this video is a game changer for me.
    So much crucial/game changing infos gathered in an incredible way, with amazing presentation and pace.

  • @hawarhekmat1174
    @hawarhekmat1174 Год назад +24

    Next time a recommendation system.

  • @sgruhier
    @sgruhier 6 месяцев назад +2

    I had this in my todo, it's mind blowing. Well detailed, great speed, tis is amazing. My only regret is not have watched it before. Thank you so much

  • @mtin79
    @mtin79 11 месяцев назад +3

    Fantastic in depth walkthrough with code examples and reasoning behind implementation decision. Helped me understand supabase, its services and architecture and how things fit together much more. Thank you!

  • @JohnBucy-rz8qo
    @JohnBucy-rz8qo 7 месяцев назад +5

    Joining the crowd - this is one of the best tutorials I have ever seen (and I have seen many). Great Job!

    • @JohnBucy-rz8qo
      @JohnBucy-rz8qo 7 месяцев назад

      And the first one I have ever commented on

  • @CarloL525
    @CarloL525 5 месяцев назад +2

    I'm sold! Diving deeper into Supabase because of this :) Great 2 hours content!

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

    This an amazing guide. Like absolutely amazing, bravo.

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

      Thanks! Don't hesitate to give me a shout if you have any questions/issues

  • @zzej
    @zzej 11 месяцев назад +2

    This is the best video tutorial I have ever seen.

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

    Stellar presentation! The presenter knows his stuff. Can’t fake this level of experience. Thank you!

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

    Superbase. I freaking love you. Long live the king

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

    Man you are consistently saving me when I hit a wall on my projects. Thank you!!!!!!

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

    this was extremely useful, kudos to you for creating the video! as an ai engineer, it was a huge learning opportunity for me to build end to end applications, thanks man!

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

    Incredible clarity! More like these please.

  • @2an_sound
    @2an_sound 11 месяцев назад +1

    Thank you so much for this tutorial! You are an amazing teacher

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

    This is one amazing video. Thanks so much!
    One suggestion, will be super cool to have aversion if this video using langchain as well.
    There are a lot of great benefits using it instead of going directly to Open AI (like the ability to easily switch or use multiple model providers)

  • @ferrychandra8585
    @ferrychandra8585 6 месяцев назад +2

    Thank you for the great video!! Would like to see more videos on implementing Supabase using Python (not sure about the demand actually) if possible. :)

  • @nikitastriuk
    @nikitastriuk 10 месяцев назад +1

    Great stuff, thanks a lot!
    One question. What's the point of deploying Deno edge functions (and calling them with pg_net inside postgres) instead of simply using Next.js actions for processing files after upload? It adds a lot of complexity imo. Any real benefits?

  • @jonathanma4206
    @jonathanma4206 10 месяцев назад +2

    This is great. What changes would need to be made to use this with an open source model like Mistral or Llama 2? Is it just whatever model library is used and the embedding model that goes with it?

    • @maryamashraf6370
      @maryamashraf6370 9 месяцев назад

      Hey did you get any further with this? I'm building a similar model using Mistral 7B - would really like to hear how you went about with using a local llm

  • @patbreitenmoser
    @patbreitenmoser 11 месяцев назад +1

    Thank you very much - you are such a great teacher 🧑‍🏫

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

    Vaults looks cool! More more more!

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

      Comes in very handy in some situations 👍 thanks for watching!

  • @henriquematias1986
    @henriquematias1986 10 дней назад

    Amazing tutorial. Thanks for sharing.
    - Q: why not use the user ID instead of ramdon ID?
    - Q: what about also storing the md5 hash of the file so if a user try to upload a duplicated file we can flag it?
    🙏

  • @henriquematias1986
    @henriquematias1986 9 дней назад

    Suggestion: as the batches are being processed we could have a “progress” on the document so we could potentially show to the user a loading bar as the documents get embedded? I’m not familiar with how long it would take for a long PDF for instance but might be a good idea in case there is a chance it will take more than a few seconds

  • @peterkindebergsederblad6838
    @peterkindebergsederblad6838 Месяц назад

    Are you planning on updating this to use the new supabase auth SSR system since that seems to be recommended?

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

    What an excellent video! Amazing work - I love all the "rabbitholes" which are all very important. I have two questions though; instead of using Supabase functions, one could use NextJS Route Handlers, right? Also; are there some open source alternatives to OpenAI LLM that could easily be integrated instead? Thanks for this video!

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

      Good tip. I think it could be done, seems like the edge functions on the free tier time out when doing the calculations.

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

    Great tutorial! Do you start running into problems with chat conversations as time goes on ... given you are including all previous messages and the limited window that OpenAI provides? How do you handle that? Just truncate it?

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

    this is so good. Is it easy enough to make it cite sources? Kinda like perplexity or notebooklm

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

    interesting video!. so the whole reason for using RAG here is to minimize the token inputs when eventually passing it to GPT? (also maybe getting more accurate results because of using a specific embedding model that's better than GPT)

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

    How would you handle this if you actually wanted to reference the document/location where the RAG has pulled the info from (ie. like a references list on the front end)?

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

      Yep this is a great question. We are actually in the process of bringing this type of functionality to the Supabase docs via Supabase AI assistant. The strategy more or less comes down to:
      1. During the RAG prompt injection step, prefix each section with a heading (or id, link, storage path, etc) that references the document it came from
      2. As part of the initial prompt, ask the LLM to insert references to these respective section headings throughout its response
      3. On the frontend, parse the response coming back to extract these references, replace with a [1], [2], [3], etc, and add them as footnotes

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

      Sweet that makes a lot of sense. I pulled something similar together using pinecone but found I was double handling a lot of the prompt injection and then parsing the references. The way you have described it within the Supabase framework makes a lot of sense.@@gregnr

  • @yorgohoebeke
    @yorgohoebeke 7 месяцев назад

    Amazing tutorial! Could you make a similar tutorial but for using supabase with AI agenst (+ RAG) that use function calling. For example, how to create a chatbot that can add tasks to our to do list or complete tasks on our todo list.

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

    It's brilliant. Just keep me breath outhht between important pieces of code! …next time!
    Dynamic of video is really good - but pieces where I need to learn something new, wish to look for references, sources… I cannot ever hit space… tracking back 🙂
    BTW Thank you for so great tutorial! 🙂

  • @dave3269
    @dave3269 3 месяца назад +1

    When are you guys going to add rate limiting. Exposing anon key to the public is still not production ready.

  • @mu.abdelhamid
    @mu.abdelhamid 5 месяцев назад

    This video is a treasure 🏆👑🥇🌟💛

  • @rembautimes8808
    @rembautimes8808 6 месяцев назад +1

    There were so many parts to like in this video, my favourite was how to extract the authorisation headers in making the call to a REST endpoint. Will probably implement the endpoint in python with Fast API rather than Deno. 😂

    • @VinayChandra-x9z
      @VinayChandra-x9z 3 месяца назад

      Hey!! that's a good thought. Did you do it?

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

    Amazing video! Thank you. I have a question: best way to set up multiple supabase projects locally
    using docker?

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

      That would be through using Supabase CLI. supabase.com/docs/guides/cli/local-development

  • @henriquematias1986
    @henriquematias1986 9 дней назад

    Q: can we prefetch the modal similar to how Next.js prefetch links?

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

    This is exactly what Im looking for! Thank you! Now only if I could get it to work locally =(

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

      Glad it resonates! What issues are you having locally?

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

      @@gregnr I think it's the Deno? I keep getting errors like these "Type error: Cannot find module 'common-tags' or its corresponding type declarations." even if I've installed them. =/

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

      nvm I got it!@@gregnr

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

      @@tamsssss6765 got it - just to confirm, are you getting those errors at runtime, or just in your editor (ie. VS Code)? If it's in VS Code, can you double check you have the Deno extension installed? Without that extension, VS Code doesn't handle Deno dependency management correctly.

  • @GilbertZhuo-uv1ux
    @GilbertZhuo-uv1ux 6 месяцев назад

    can i check for the generate embeddings part why we need to remove the javascript elements from markdown thanks!

  • @DouglasHewitt
    @DouglasHewitt 6 месяцев назад

    I followed the entire tutorial, very good, thank you for this. I am a beginner with nextjs and supabase, two things that I can't get working at the end: my supabase does not create the sections and therefore embeddings when a file is uploaded, I guess I missed something with either the migration or edge function?
    also, the chat doesn't work because CORS blocks it when its coming from the supabase cloud, how do I configure CORS on the cloud dashboard?

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

      same

    • @qdiddy79
      @qdiddy79 4 месяца назад +1

      I ran into this as well developing LOCALLY. Make sure to open a new terminal window. Navigate to your project directory and run "npx supabase functions serve".

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

    Without this video, how could we possibly learn to do this? 😢

  • @OviDB
    @OviDB 9 месяцев назад

    First, thank you!
    One question, how does one go about debugging the functions defined as database functions?

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

    One thing when reseting the DB because of Todos, there is a directive how to do it locally but not via the cloud. `pnpx supabase db reset` doesn't work unfortunately and I can't find it in the docs.

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

      Getting this as well... did you figure it out?
      Edit: actually, here is what I did:
      1. npx supabase db reset --linked
      2. Deleted 'files' from storage in cloud.
      3. npx supabase db push.
      Both of my migrations (the files and documents) were applied.

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

      @@sumodd sorry I accidently replied to a wrong video on another issue 🤦🏻Actually the wrong was on my side, since db reset is for the docker, I think you just need to do db push

  • @Scrollunlock
    @Scrollunlock 4 месяца назад

    Need more detail documents on Ollama please.

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

    Very good tutorial. Only problem I have is that I don't get embeddings generated for every item in the documents_sections. I followed the code to the letter and it only generates the first 5 embeddings.

  • @SAFEEMMOHAMMED-g4x
    @SAFEEMMOHAMMED-g4x 10 месяцев назад

    Thank you so much one of the Best Tutorial. Query - when we are using cloud based option means files uploaded to supabase server and embeddings as well. Just want to confirm how secured our documents will be and can we use for financial and health care files as same application. Really interested to signup with Supabase if this query is solved.

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

      Supabase can be HIIPA compliant with certain plans, so it is safe to store those types of information. supabase.com/blog/supabase-soc2-hipaa

    • @SAFEEMMOHAMMED-g4x
      @SAFEEMMOHAMMED-g4x 10 месяцев назад

      Thank you so much for your response. Request to please share direct link or email id where I can ask more queries for any further doubts@@Supabase

  • @ranicket
    @ranicket 4 месяца назад

    Is there an updated version of this? I feel like 8 months ago was a loooooong time!

    • @Scrollunlock
      @Scrollunlock 4 месяца назад +1

      The underlining concept remains the same, but the LLM models, functions etc.. are updated on Github.

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

    Hi not-Jon, this looks good. Thanks.

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

      Thanks for watching! Let me know if you hit any road blocks.

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

      I agree! Non-Jon is killing it! 💯

  • @COURSE_DEALER51
    @COURSE_DEALER51 Месяц назад

    sir its giving error service not healthy: [supabase_vector_chatgpt-your-files]

  • @adamtesla284
    @adamtesla284 9 месяцев назад

    I want to integrate supabase with my flutterflow app but the problem I'm facing is that I dose not allow to present user dispaly name . Any solution ?

  • @learn-with-dr-sajjad
    @learn-with-dr-sajjad 11 месяцев назад

    Thanks for making this video for my favorite platform. I have followed it along and ported this method to use Google gemini api but I am having a weird problem. In chat function in the part where we add injectedDocuments to the system prompt. It runs fine for the first time, i checked by console.logging the completionMessages and all injected Documents and system prompt is added to the first prompt by the user but for all later messages neither the system prompt nor the injected documents are added and are not added to the user messages. However strangely enough the output from the gemini pro clearly indicates that it is getting the context and gives spot on replies. (I compared with the output from gemini pro without any context and answers were way different). Can somebody guide me if this is default behavior of vercel's ai sdk or there is problem with my code?

  • @JJ-sz8wf
    @JJ-sz8wf 7 месяцев назад

    In the embbeding column 7 - 10 rows are empty, but the rest is filled. Why is this? Has nothing to do with the code, since the nummer of blank space is different each time.

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

    I think something has broken with the repo. The Chat function for example no longer deploys (i have pinpointed it to the AI library import from Vercel) Can you or anyone else reproduce this?

  • @rydonahue1
    @rydonahue1 7 месяцев назад

    Couldn't a lot of these edge functions just be handled by API routes since you're using Next?

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

    Would love a video on how to easily migrate supabase ssr w/ this! =D

  • @nikhilsingh4329
    @nikhilsingh4329 7 месяцев назад

    Hey, i am beginner i received api key and base url generated by my organization , this tutorial just include API key only directly by open ai , I need tutorial which can help me to create the chat bot with my API key and base URL can anyone suggest me tutorial or code base ?

  • @saminamanat
    @saminamanat 6 месяцев назад

    ctrl shift i just blew my mind

  • @laggy9764
    @laggy9764 7 месяцев назад

    if my data is confidentiel will i have t use gpt even so

  • @hatimmoaiyadi8388
    @hatimmoaiyadi8388 8 месяцев назад

    Please guide me to create a logic to upload excel and pdf files

  • @nishanthg5532
    @nishanthg5532 6 месяцев назад +1

    Brilliant 🥂

  • @funkdefied1
    @funkdefied1 6 месяцев назад

    This video is PERFECT

  • @JT-oh6th
    @JT-oh6th 9 месяцев назад

    Great tutorial but if you actually deploy this to supabase the CPU time is SO restrictive the embedding pipeline doesn't work. 🤦‍♂

  • @marksughnenter526
    @marksughnenter526 8 месяцев назад

    can you do this in python?

  • @hussienhassin7334
    @hussienhassin7334 9 месяцев назад

    anyone facing could not Auth user when trying to sign up?

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

    Looking for a tool to get text from my pdf. Is this possible aswell?

    • @gregnr
      @gregnr Год назад +4

      PDFs have notoriously been difficult to pull text from in a sane way (because there's lots of variance between PDFs, and some PDFs embed text while others are just images). One solution we're working on is using GPT's new vision model to extract the text - still WIP right now, but stay tuned!

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

      @@gregnr thought about that aswell. All libraries I tried worked so bad

  • @NutriApp
    @NutriApp 4 месяца назад

    SupaTutorial!

  • @gauthamvijayan
    @gauthamvijayan 16 дней назад

  • @AndrewLeimkuehler-t9w
    @AndrewLeimkuehler-t9w 2 месяца назад

    Whitney River

  • @GrayOdelette-u8b
    @GrayOdelette-u8b 2 месяца назад

    Berenice Garden

  • @VirgenMarceaux-c1r
    @VirgenMarceaux-c1r 2 месяца назад

    Dion Estates

  • @MarianCora-t8e
    @MarianCora-t8e 2 месяца назад

    Delphine Cape

  • @TennysonAmos-o4u
    @TennysonAmos-o4u 2 месяца назад

    Denesik Ford

  • @moritz8618
    @moritz8618 9 месяцев назад

    hallo

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

    its good & detailed, but why can't you make this more straightforward to setup

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

      hey, which parts did you find were slow to setup?

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

      @gregnr why cant i just run git clone, then run npm install and insert my env vars and run.. also do you have to use deno ?

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

      @@namesare4fools if you don’t care about the details, you can 100% just clone the repo and run it. Yes, Supabase’s edge runtime is built on Deno - you wouldn’t run this in vanilla Deno yourself though, instead use the supabase CLI to serve the edge function as shown in the video/readme.

  • @moritz8618
    @moritz8618 9 месяцев назад

    hiawd

  • @MaksymLiamin-y9n
    @MaksymLiamin-y9n 7 месяцев назад +1

    worst ever tutorial. so unclear, it cannot be more confusing

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

    Thanks for a detailed video. but why did you use @supabase/auth-helpers instead of @supabase/ssr as the docs recommends.

  • @henriquematias1986
    @henriquematias1986 10 дней назад

    Amazing tutorial. Thanks for sharing.
    - Q: why not use the user ID instead of ramdon ID?
    - Q: what about also storing the md5 hash of the file so if a user try to upload a duplicated file we can flag it?
    🙏