In this lesson, you will learn about what DSPy is, and more importantly, what is special about DSPy and why many developers are using DSPy to power their GenAI apps. Let's dive. So what is DSPy? At a very high level, DSPy is a GenAI authoring framework that simplifies the development of GenAI applications. You can use it to build a RAG system to agent. But as a user, I would ask this very natural question? Are we reinventing the wheel? We already have so many options over there. The answer is no. Let's explore together. Before we learn about the specialty of the DSPy, let's talk about the problems we're facing. Since late 2022, due to the success of genAI models, there came the rise of compound AI system. Here you can see a question-answering system and also a code generator. Compound AI system is a system that has multiple modules. Each module handles a subtask, which can make LLM calls, or could just be a regular tool calling. Combining all these modules together, we form a big and powerful AI system that can handle complex tasks like retrieval augmented that can handle complex tasks like retrieval augmented generation or code generator as you see in the picture. When building a compound AI system, we're all facing the problem from prompt engineering. We do prompt engineering because we know that with a better prompt, we'll get a better result from the language model. But prompt engineering could be very messy because we are tweaking the strings and we don't really know what changes make an actual difference. In practice, that usually means we end up iterating over 50 or 100 or even more prompts, and each prompt could be very long, like tens of thousands of words. Making that even worse, if we switch a model, then we need to start over because prompt engineering is heavily biased towards a language model. As a summary prompt engineering is both brittle and time-consuming. The other problem comes from the framework itself. Frameworks are very powerful because I simplify and standardize the experience of building things like agents or RAG and so on. But there have been more and more complaints that I don't like the use of frameworks, because instead of value, I'm seeing more trouble. One very solid concern is that I'm being forced to learn the framework contract, which sometimes means unnecessary overhead for me, rather than keeping me focused on the logics. And it's really hard to migrate off the framework existing code if I decide to switch over to another one. To address both problems then came the DSPy. Now let's answer the question what is DSPy again with more details. DSPy is a flexible, lightweight framework that simplifies the interaction with LM and provides automatic program optimization, including prompt optimization and LM weights finetuning through the DSPy optimizer. DSPy also provides seamless productization support like streaming async, and so on. We provide you with the building blocks for AI applications in DSPy, but we don't restrict that the way you build the applications. It's both easy to migrate to DSPy and migrate off DSPy. We have three special things inside DSPy: And the first one is LM-agnostic programing instead of LM-biased prompting. Basically instead of doing prompt engineering, DSPy interacts with our LLM by defining input fields and the output fields. In DSPy context, you can choose how I'm and the point has a well engineered RESTful API. But different from traditional APIs, the input and output are defined at the client side. Don't worry if this is not fully clear yet, we'll cover this in the next lesson. The second part is seamless productization through both native DSPy features like streaming, cache and also through the close integration with MLflow. MLflow is an ML and AI ops tool that streamlines end-to-end development of AI applications. For example, helps debugging AI programs by MLflow tracing, tracking development MLflow experiments, and deploy the application with MLflow deployments. We'll learn more about it in lesson three. And in lesson four, you'll learn about automatic program optimization help to build your applications with DSPy. You can create a DSPy optimizer and then apply it on your program and automatically get quality improvements. DSPy is trusted by industry. We have many successful integration with lots of enterprise users. Please check it out more at DSPy.ai/community/use-cases. That's all about this lesson. In the next lesson you'll learn how to build your GenAI applications in DSPy. See you there.