Unveiling DSPy - Farewell, LLM Prompting; Welcome, Machine learning programming!

Nikhil R (~nikhil0)




Remember those days when you did machine learning programmatically - loading data, defining parameters, training/optimizing models and running evaluations! Well, DSPy is here to bring back the old charm of machine learning to LLM applications. Don't spend hours writing the right prompt, finding the right few-shot examples and writing custom evaluation code from scratch. DSPy gives you the ability to build agent pipelines programmatically without dealing with prompts and helps tune pipelines in a data-driven and LLM-agnostic way.

DSPy is a framework for automatically prompting and fine-tuning language models. It provides composable and declarative APIs that allow developers to describe the architecture of their LLM application in the form of a "module" (inspired by PyTorch's nn.Module). It has most of the general purpose modules w.r.t. prompting like Few Shot, Chain of thought, ReAct, etc. It can routinely "teach" powerful models like GPT or Gemini and local models like Llama to be much more reliable at tasks, i.e. having higher quality and/or avoiding specific failure patterns. In this talk, we will go from zero to one to learn more about DSPy and how you can leverage it to build your own LLM powered applications in a more programmatic & systematic way.

Outline of the talk

  1. Introduction (5 mins)
  2. Building blocks of DSPy (5 mins)
  3. Best Practices on using DSPy (5 mins)
  4. DSPy vs LangChain (5 mins)
  5. Code walkthrough on building and optimizing RAG application using DSPy & local LLMs like Gemma (5 mins)
  6. Q&A (5 mins)


  • Understand if DSPy is the right fit for your LLM prototypes or applications
  • Learn how easy is it to optimize prompts or evaluate your LLM workflows using DSPy
  • Insights into current challenges and best practices


  • Basic familiarity with Python programming
  • Understanding of fundamental NLP concepts
  • Basic understanding of Pytorch or any deep learning frameworks(Not mandatory)

Content URLs:

To be uploaded soon

Speaker Info:

Nikhil is an AI Consultant at Google Cloud. He has been an applied data science professional with over a decade of experience in developing and implementing Machine learning, Deep Learning, and NLP-based solutions for a variety of industries like Finance, FMCG, etc. He is a passionate advocate for the use of data science to solve real-world problems and is always looking for new ways to use data to make a positive impact on the world.

Speaker Links:

  • https://www.linkedin.com/in/nikhilrana9/

Previous talks:

  • https://www.youtube.com/watch?v=S0TTQxK_OZI
  • https://www.youtube.com/watch?v=z1luvuetYxo
  • https://www.linkedin.com/posts/orkes-inc_google-vertex-orkes-activity-7190706561516793856-YwT6/
  • https://www.linkedin.com/feed/update/urn:li:activity:7109400580195811329
  • https://www.linkedin.com/posts/gdevs-educators-community_indiaeduprogram-genai-googleaieducators-activity-7109784472803295232-8N-x

Section: Artificial Intelligence and Machine Learning
Type: Talk
Target Audience: Beginner
Last Updated: