Getting Started with RAG in DSPy CShorten on February 12, 2024 at 09:01 Hacker News: Newest

Hello world, DSPy! I am SUPER excited to share a new video walking through the end-to-end of how to use DSPy to optimize the CIFAR-10 for LLM programs, RAG with FAQs!

This tutorial contains 4 major parts: (1) library installation, settings, and creating a dataset with dspy.Example objects, (2) LLM metrics, (3) The DSPy programming model, and (4) Optimization!!

We’ll initialize our RAG prompt off with a very simple `Please answer the question based on the context` prompt, and DSPy then optimizes a new description of the task more aligned with the domain of the FAQs, as well as input-output examples from few-shot learning! All guided by the judgement of our LLM metric!

If you’ve ever trained a neural network and had the joy of watching your loss function decrease with each epoch, you will enjoy compiling DSPy programs! I haven’t personally been as excited since training my first CIFAR-10 classifier with Keras!

It is such an exciting time to be learning about DSPy! I am super grateful to everyone on the DSPy team and members of the DSPy community both on Twitter/X and Discord, who have all helped tremendously in developing my understanding of the tool! We are just scratching the surface with DSPy and there is so much more to come! Here is the video, I hope you find it useful!

Comments URL: https://news.ycombinator.com/item?id=39345484

Points: 1

# Comments: 0

Leave a Reply

Your email address will not be published. Required fields are marked *