top | item 37417699

(no title)

okhat | 2 years ago

DSPy provides composable and declarative modules for instructing LMs in a familiar Pythonic syntax and an automatic compiler that teaches LMs how to conduct the declarative steps in your program. Specifically, the DSPy compiler will internally trace your program and then craft high-quality prompts for large LMs (or train automatic finetunes for small LMs) to teach them the steps of your task.

discuss

order

simonw|2 years ago

"Specifically, the DSPy compiler will internally trace your program and then craft high-quality prompts for large LMs"

I'm having trouble understanding the value provided here.

A prompt is a string. Why abstract that string away from me like this?

My instinct is that this will make it harder, not easier, for me to understand what's going on and make necessary changes.

okhat|2 years ago

"A neural network layer is just a matrix. Why abstract that matrix and learn it?" Well, because it's not your job to figure out how to hardcode delicate string or floats that work well for a given architecture & backend.

We want developers to iterate quickly on system designs: How should we break down the task? Where do we call LMs? What should they do?

---

If you can guess the right prompts right away for each LLM, tweak them well for any complex pipeline, and rarely have to change the pipeline (and hence all prompts in it), then you probably won't need this.

That said, it turns out that (a) prompts that work well are very specific to particular LMs, large & especially small ones, (b) prompts that work well change significantly when you tweak your pipeline or your data, and (c) prompts that work well may be long and time-consuming to find.

Oh, and often the prompt that works well changes for different inputs. Thinking in terms of strings is a glaring anti-pattern.

pama|2 years ago

Agreed. I don’t understand the trend for abstracting away the best possible human interface.

fassssst|2 years ago

Because there are magic strings that work considerably better than what you might come up with. Like “think step by step.”