This repository contains a Google Colab notebook that I wrote while learning DSPy. It explains:
- How to define a Language Model, a Signature and a Module
- How to define a dataset of Examples and a Metric to Evaluate your module
- How to optimize your module using DSPy's internal optimizers
There are three versions of the notebook: one with solutions, one with strong hints on what to do and how to do it, and a third blank one with only the problem definition.
DSPy is a declarative framework for building modular AI software. Read more on their docs.
The Gilded Rose kata is originally a refactoring exercise. The goal is to refactor some questionable inventory updater code that encompass a set of inn rules.
We propose a different approach: give the rules and an item to a LM and let it provide its updated version.
More info in the notebooks !
Simply download the version of the notebook you want, then access Google Colab: https://colab.research.google.com/ and upload the notebook. Alternatively, put the notebook in your Google Drive and double click it.
This notebook is a solution to the Gilded Rose Refactoring Kata, originally created by Terry Hughes. The kata is a popular exercise for practicing code refactoring. You can find more information about it and various implementations in different languages, notably popularized by Emily Bache.