Getting Started with RAG in DSPy!

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 มิ.ย. 2024
  • Hey everyone! Thank you so much for watching this tutorial on getting started with RAG programming in DSPy! This video will take you through 4 major aspects of building DSPy programs (1) Installation, settings, and Datasets with dspy.Example, (2) LLM Metrics, (3) The DSPy programming model, and (4) Optimization!!
    The notebook used in the video can be found here: github.com/weaviate/recipes/b...
    All future videos, as well as additional utils like data import scripts, will be in this folder: github.com/weaviate/recipes/t...
    Please leave a star, it helps a lot!
    DSPy on GitHub: github.com/stanfordnlp/dspy/
    Join the DSPy Discord! / discord
    DSPy GPT by Sean Chatman: chat.openai.com/g/g-cH94JC5NP...
    New Signature class based on Pydantic by Thomas Ahle: github.com/stanfordnlp/dspy/p...
    Knox, Ollama in DSPy: / 1756018720818794916
    Stephen Byrne, Why I'm excited about DSPy: substack.stephen.so/p/why-im-...
    Chapters
    0:00 Intro!
    1:35 Where to find the code
    2:08 Community Notes
    4:00 Getting Started with RAG
    7:56 0. DSPy Settings and Installation
    10:00 1. DSPy Datasets
    11:56 2. LLM Metrics
    19:22 3. The DSPy Programming Model
    23:32 4. DSPy Optimization
    30:45 Recap
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 51

  • @kevon217
    @kevon217 4 หลายเดือนก่อน +3

    DSPartY is bumpin’
    Love your tutorials and the engagement you’ve been putting in within the DSPy community.

  • @simingzhao6449
    @simingzhao6449 4 หลายเดือนก่อน +4

    great tutorial Connor, looking forward to more advanced stuff like Agent application!

  • @donb5521
    @donb5521 4 หลายเดือนก่อน +17

    Connor - you can pan in and out as much as you want IMO, shows your excitement about the subject. The quality of the content is awesome. Also appreciate the shoutouts to the broader community. Thanks for sharing!

    • @connorshorten6311
      @connorshorten6311  4 หลายเดือนก่อน +1

      Thank you so much!! Haha, appreciated! Although I see far less negative comments this time around without the zooming haha! Thank you so much! Beyond grateful for all the help the DSPy community has given me in learning about this!

  • @joser100
    @joser100 4 หลายเดือนก่อน +3

    Great one Connor! good to see your progress that, naturally, help us all...

    • @connorshorten6311
      @connorshorten6311  4 หลายเดือนก่อน

      Thank you so much Jose, really happy to hear that! Learning a new tool is certainly quite the journey haha!

  • @dshorten1766
    @dshorten1766 4 หลายเดือนก่อน +3

    Very exciting stuff, thanks Connor!

  • @ClintSearchEngineer
    @ClintSearchEngineer 4 หลายเดือนก่อน +2

    Thank you Connor. This is exactly what the world needed.

    • @connorshorten6311
      @connorshorten6311  4 หลายเดือนก่อน

      Thank you so much Clint, appreciate it as always!

  • @saivamsi441
    @saivamsi441 4 หลายเดือนก่อน +4

    Thanks for the detailed video Connor, This is a great help. I am working on the lang graph and multi agent models. I had to optimise some of my prompts manually to reduce the number of agent hops to llm model. With BaysianSignature optimizer, I believe every prompt can be optimised and it'll reduce the hops made by agents

    • @connorshorten6311
      @connorshorten6311  4 หลายเดือนก่อน +2

      Ah, I need to learn a little more about LangGraph and I think Crew AI as the latest Multi-Agent framework before I can really comment on this!

  • @BradJonesus
    @BradJonesus 4 หลายเดือนก่อน +2

    Brilliant Connor, thanks so much for this video and looking forward to more about this subject!

    • @connorshorten6311
      @connorshorten6311  4 หลายเดือนก่อน

      Thank you so much Brad! Really happy to hear it! DSPy!

  • @ricardocosta9336
    @ricardocosta9336 4 หลายเดือนก่อน +3

    looking fresh my dude

  • @robboerman9378
    @robboerman9378 2 หลายเดือนก่อน

    Thanks for the great content. One of the things I am missing is how to save the optimized program so I can use it after that without constantly re-training.

  • @jakobkristensen2390
    @jakobkristensen2390 4 หลายเดือนก่อน +1

    Great walkthrough, thanks so much!

  • @gumshoe9496
    @gumshoe9496 4 หลายเดือนก่อน

    Great tutorial! I'm looking forward to building on this! Thank you

  • @robro612
    @robro612 4 หลายเดือนก่อน +3

    Nice video, Connor. Could you do a more in-depth video on the optimization process? In particular, looking at the series of prompts/examples selected throughout the optimization (analogous to doing a small lin. regression/backprop example by hand for intuition) and the overall token cost of these optimizations.

    • @connorshorten6311
      @connorshorten6311  4 หลายเดือนก่อน +2

      Ah indeed this is quite the test of my comprehension! Thank you so much, this is a fantastic idea! Give me a little bit of time to work through this though -- I will send this message through to the DSPy discord, I'm sure Omar, Michael, or Krista would be happy to walk us through this!

  • @davidtindell950
    @davidtindell950 4 หลายเดือนก่อน +1

    Thank You. This particular vid motivated me to SUBSCRIBE !

  • @mysticaltech
    @mysticaltech 2 หลายเดือนก่อน +1

    Awesome, super inspiring!

  • @YA-yr8tq
    @YA-yr8tq 4 หลายเดือนก่อน +1

    Thank you, Connor! Keep it up!

  • @knoxfromthebunker2770
    @knoxfromthebunker2770 4 หลายเดือนก่อน +1

    Conner - Thanks for the shoutout!! ❤

    • @connorshorten6311
      @connorshorten6311  4 หลายเดือนก่อน

      No thank *you*! Ollama in DSPy!! Amazing!

  • @jakobkristensen2390
    @jakobkristensen2390 4 หลายเดือนก่อน

    This was a fantastic walkthrough! Would love some insight into extracting structured data - I find this extremely useful, and being able to do this with a 7B/13B model (instead of GPT-4, for instance) would greatly decrease the cost of running my application. Thanks so much!

  • @user-bs6ih7ww8g
    @user-bs6ih7ww8g 4 หลายเดือนก่อน +2

    You should also make a video on each GPT call cost. I believe there are hundreds (if not thousands) of calls happening every execution. DSPy is best paired with local model like mistral 7b. Otherwise, it will be impossible to scale such a tool on hundreds of docs.

    • @neoxelox
      @neoxelox 4 หลายเดือนก่อน +3

      If you are not compiling the program there aren't that many calls happening... Just one call per module (ChainOfThough/Predict/ReAct..) actually. You can check every step in the pipeline with dspy-inspector for example

    • @connorshorten6311
      @connorshorten6311  4 หลายเดือนก่อน +2

      Yes this is exactly where my thinking is going after getting the bill for the video hahah, but more generally yeah my suspicion is that llamas connected in DSPy programs is where the value is -- need to test more to say for sure!

    • @connorshorten6311
      @connorshorten6311  4 หลายเดือนก่อน +2

      @@neoxelox Ah thank you! A new DSPy tool to try out haha `dspy-inspector`!

    • @user-bs6ih7ww8g
      @user-bs6ih7ww8g 4 หลายเดือนก่อน

      @@connorshorten6311 Can you make a video about it? and also another video on some of the pros & cons of using DSPy in production (if any - wrt cost, latency, scalability, & flexibility)?

  • @ricardocosta9336
    @ricardocosta9336 4 หลายเดือนก่อน +1

    lets gooo

  • @andrewdang3401
    @andrewdang3401 3 หลายเดือนก่อน

    So many haters wtf. Great video !! I been lazy in python bc of copy paste and langchain and llama-index. This video makes python more fun !

  • @runsenliu4704
    @runsenliu4704 3 หลายเดือนก่อน

    Hay man, great video! I have a few questions tho. Can you use other vector DB as retriever like Milvus? Also, is it possible to use LLM that are less known like Baichuan, Kimi etc? Thank you!

  • @user-bs6ih7ww8g
    @user-bs6ih7ww8g 4 หลายเดือนก่อน +1

    Thank you for fixing the zooming!

    • @connorshorten6311
      @connorshorten6311  4 หลายเดือนก่อน

      Haha you got it! Apologies for last time! The zooming has been fired!

  • @3MandMatt
    @3MandMatt 2 หลายเดือนก่อน

    could we cover the creation of the schema from an empty database such that the notebook flow actually runs through

  • @vitalybulgakov7181
    @vitalybulgakov7181 3 หลายเดือนก่อน

    Is it possible to run DSPY on local windows environment, say with Mistral 7b model? It fails to for me because of default value of url param, which I do know how to avoid.

  • @stat_life
    @stat_life 2 หลายเดือนก่อน

    You tried with weaviem is there any way you could do with pinecone ?

  • @codea1273
    @codea1273 3 หลายเดือนก่อน

    Any idea why the bootstrap with random search performed worse on the eval set? @ 29:00

  • @jasperlaiwoenyon5034
    @jasperlaiwoenyon5034 3 หลายเดือนก่อน

    Can I conclude that this framework is simply a prompt optimization framework? The rest is almost the same as llamaindex and langchain?

  • @fox_trot
    @fox_trot 4 หลายเดือนก่อน

    How can I load and use my own data to Weaviate and start implementing DSpy's implementation of RAG?

  • @edmald1978
    @edmald1978 9 วันที่ผ่านมา

    What we can do to have bigger answers? I want it to generate code, but after executing it gives me 4 lines of code
    Someone have some idea?

  • @kaziahmedasiffuadpollen2727
    @kaziahmedasiffuadpollen2727 2 หลายเดือนก่อน

    Can you apply DSPy RAG on PDF files?

  • @explorer945
    @explorer945 4 หลายเดือนก่อน +4

    No offense but you took 4 min to get to the point. Time is the most valuable resource. And it is even more important with the plethora of information in the fast moving generative AI space. So please be ruthless in cutting down non-value add content. I'm not criticizing but I'm just voicing an opinion on great videos like this where you can be even more due diligent on our audience time

    • @edwardgao5388
      @edwardgao5388 4 หลายเดือนก่อน +3

      This comment took you longer than 4

    • @explorer945
      @explorer945 4 หลายเดือนก่อน

      @@edwardgao5388 true. I did that to see if the OP can save me some time in the future

    • @ahmadzaimhilmi
      @ahmadzaimhilmi 3 หลายเดือนก่อน +1

      Thanks. Saved my 4 minutes 😅

  • @redflipper992
    @redflipper992 2 หลายเดือนก่อน

    so for production, we'd just copy paste the optimized signature and few-shots into the system prompt? I'm a bit confused on how to wield this tool in production.