Adding Depth to DSPy Programs

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 มิ.ย. 2024
  • Hey everyone! Thank you so much for watching the 3rd edition of the DSPy series, Adding Depth to DSPy Programs!! This video begins with some DSPy news such as STORM, DSPy Assertions, and Typed Signatures! We then dive into the concept of adding depth to DSPy programs, taking a further look at what it means to have unique input-output examples for each component and how we can compose DSPy programs with different LLMs per component! We then dive into two notebooks illustrating adding depth to RAG programs and a 4-layer question to blog post writer!
    Demo #1 Notebook: github.com/weaviate/recipes/b...
    Demo #2 Notebook: github.com/weaviate/recipes/b...
    You can find the examples and links to community resources / news on github.com/weaviate/recipes!
    Chapters
    0:00 Intro
    0:50 Chapters Overview
    5:06 Weaviate Recipes
    5:24 DSPy News and Community Notes
    13:51 Adding Depth to RAG Programs
    18:40 Multi-Model DSPy Programs
    20:18 DSPy Optimizers
    25:30 Deep Dive Optimizers
    27:55 Into the Optimizer Code!
    37:48 Demo #1: Adding Depth to RAG
    1:05:25 Demo #2: Questions to Blogs
    1:07:48 Thank you so much for watching!
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    dude, you provide so much alpha for us by doing these actional pragmatic rundowns of the documentation. Thanks again.

  • @MachineLearningStreetTalk
    @MachineLearningStreetTalk 3 หลายเดือนก่อน +5

    The man is back in the game!!!

  • @Karl-Asger
    @Karl-Asger 3 หลายเดือนก่อน +11

    DSPy to the moon 👏

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

    Hi Connor, thanks for the awesome content. I have one small suggestion - Instead of covering maximum information, if it was topic by topic it would be more better. Example: In depth Information on 1 topic "Optimizers (formerly Teleprompters)". Thank you🙂

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

    Love how easy it is to plugin different models for different tasks within the same DSPy program.

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

    Super interesting examples! I think your videos are really underrated. Your explanation is clear and concise.

  • @AyaAya-fh2wx
    @AyaAya-fh2wx 2 หลายเดือนก่อน +3

    Dude, you must be getting millions in karma for this. Thanks. Great tutorial

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

    Thank you Connor for these updates and "adding depth" to the DSPy topic ;) I really appreciate it and it looks like you're about to become Mr DSPy here on youtube, keep the content coming.

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

    My head is spinning, but man this is really opening up possibilities for optimizing and overcome all childdiseases of llm inference. Thans conner, keep up the great work

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

      Teaching too fast for this complex topic.

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

    I love your energy throughout this video Connor!

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

    Could someone please clarify what "parse float rating" means? Generally speaking, I admire your enthusiasm and appreciate the effort you put into your content. However, I found myself a bit perplexed by some of the new jargon and terminology. Providing clear definitions could significantly enhance comprehension for us, the audience. Keep up the excellent work-I'm eagerly looking forward to your upcoming content.

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

      Thank you so much for the kind words of encouragement! "Parse float rating" refers to extracting a float value from the initial response from an LLM -- this is one way to achieve structured output parsing with LLMs, there are many others as this is one of the biggest issues in LLM programming these days. DSPy also has DSPy Assertions with `dspy.Suggest` / `dspy.Assert` that is similar to this 2 model call philosophy, another idea is to first validate a response with a pydantic schema and then if it fails, format a retry prompt -- so I guess also 2 model calls in philosophy. The other approach would be maybe like deeply integrated decoding in the LLM itself -- idk, I've settled on the 2 model call solution personally, hope it works for you as well!

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

    Awesome video!

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

    If DSPy can autonomously optimize prompts, what about doing the same with code on the fly?
    How might we go about having code examine itself, its operation efficiency, its results and come up with self improvements
    Could DSPy be harnessed for this task?
    I could see doing both at once to get increased performance across 2 domains of prompt + code optimization

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

      Yeah I think you are definitely thinking on the right path. It is crazy how you can connect the loop with synthetic data to achieve this. You could use the python interpreter and use things like `time.time() - start`, but I'm not sure how you might interface deeper performance inspections like a cpu or lock profile for example.

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

      Performance as in speed is not always the target. In order for the code to be optimizable, you would need to give it data matching the real world.
      If you just optimize for unrealistic dummy data, the optimized one may be faster for that use case but completely fail in the real world.
      I think a more realistic approach would be something where the LLM can have a discussion with you and showcase different approaches with their pro's and con's, and allow you to decide.

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

      @ that’s not at all realistic or imaginative. You seem to be stuck in legacy thinking. Try using your imagination.

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

    Would love a video on the TRACE
    great video!

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

    I think spending quite a lot of time in the DSPy code is not ideal. You have to race through it because of the time constraints. Maybe get GPT4 to describe the code and use that to explain how it works?

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

    Connor be experimenting with video formats.

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

    Maybe we could be dividing by 4 instead of 5.

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

    Hi! have you tried DSPY with the Google Gemini API? because it gives me an authentication error with GCP

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

    Is there video about optimization with gradient descent?

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

    can you share a link to the notebook?

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

      Hey! Just updated the description! Thanks so much!

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

      @@connorshorten6311thanks to you for the amazing video

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

    How can we get metadata that is associated with any chunk of docs

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

    How do you get the final optimized prompt?

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

      print(f"""I'm actually a

      retard""")

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

    My dude... I can tell this is an 'extra-curricular activity' that you've done for us. But there is a lot of handwaving especially toward the end when you're getting tired. I really appreciate the video and production, but certain parts are an all-or-none type of deal. It would be good if you could take a breather and give those sections the attention and unpackaging that they deserve.
    Anyhow, thank you for what you've done so far~