Live data from Hacker News

DSPy – Programming–not prompting–LMs

dspy.ai

31–40 of 46 posts

Re: DSPy – Programming–not prompting–LMs

#31

I use DSPy often, and it’s the only framework that I have much interest in using professionally. Evaluations are first class and have a natural place in optimization. I still usually spend some time adjusting initial prompts, but more time doing traditional ML things… like working with SMEs, building training sets, evaluating models and developing the pipeline. If you’re an ML engineer that’s frustrated by the “loose…

What do you actually use it for? I've never been able to actually get it to perform on anything remotely close to what it claims. Sure, it can help optimize few shot prompting...but what else can it reliably do?

It isn’t for every application, but I’ve used it for tasks like extraction, summarization and generating commands where you have specific constraints you’re trying to meet.

Most important to me is that I can write evaluations based on feedback from the team and build them into the pipeline using suggestions and track them with LLM as a judge (and other) metrics. With some of the optimizers, you can use stronger models to help propose and test new instructions for your student model to follow, as well as optimize the N shot examples to use in the prompt (MIPROv2 optimizer).

It’s not that a lot of that can’t be done other ways, but as a framework it provides a non-trivial amount of value to me when I’m trying to keep track of requirements that grow over time instead of playing the whack a mole game in the prompt.

Re: DSPy – Programming–not prompting–LMs

#32
post #15

I found it interesting how DSPy created the Signatures concept: https://dspy.ai/learn/programming/signatures/ We took this kind of concept all the way to making a DSL called BAML, where prompts look like literal functions, with input and output types. Playground link here https://www.promptfiddle.com/ https://github.com/BoundaryML/baml (tried pasting code but the formatting is completely off here, sorry). We think we…

Good dx? BAML looks even worse than the current API call based paradigm. Even your toy examples look bad - wouldn't want to see what an actual program would look like. Hopefully this, dspy and the like that have poor design, inelegant won't become common standards

How do you organize your prompts? Do you use a templating language like jinja? How complex are your prompts? Do you have any open source examples?

I’m genuinely curious since if we can convince someone like you that BAML is amazing we’re on a good track.

We’ve helped people remove really ugly concatenated strings or raw yaml files with json schemas just by using our prompt format (which uses jinja2!)

Re: DSPy – Programming–not prompting–LMs

#33

DSPy seems unnecessarily convoluted, inelegant or am I just stupid?

I think you read it right. It is in my mind a kind of wish casting that adding other modeling to LLMs can improve their use, but the ideas all sound like playing with your food at best, and deliberately confusing people to prey on their excitement at the worst.

Re: DSPy – Programming–not prompting–LMs

#34
post #33

DSPy seems unnecessarily convoluted, inelegant or am I just stupid?

I think you read it right. It is in my mind a kind of wish casting that adding other modeling to LLMs can improve their use, but the ideas all sound like playing with your food at best, and deliberately confusing people to prey on their excitement at the worst.

I'm torn - I like the promise and people are getting value out of it. I need to try it myself on a toy project!

What experiences/evidence do you have that informed your opinion? It sounds like you've had pretty negative experiences.

Re: DSPy – Programming–not prompting–LMs

#35

Earlier quoted context omitted.

What do you actually use it for? I've never been able to actually get it to perform on anything remotely close to what it claims. Sure, it can help optimize few shot prompting...but what else can it reliably do?

It isn’t for every application, but I’ve used it for tasks like extraction, summarization and generating commands where you have specific constraints you’re trying to meet. Most important to me is that I can write evaluations based on feedback from the team and build them into the pipeline using suggestions and track them with LLM as a judge (and other) metrics. With some of the optimizers, you can use stronger model…

Yeah so like I said, I get the in-context optimization bit…which is nice, but pretty limited.

I have had precisely zero success with the LLM-prompt-writer elements. I would love to be wrong, but DSpy makes huge promises and falls painfully short on basically all of them.

I do not see any reason to use it.

Re: DSPy – Programming–not prompting–LMs

#37
DSPy is both great and frustrating at times. It's designed dort prompt and response. Textgrad and DSPy share this design decision and this is where the frustration begins.

I'd like the modules (dspy speak for inference ) to be aware of the chat history. Without this I'm not able to test the accuracy of the responses in the various chat contexts they appear.

It's been asked for in the TextGrad & Dspy GitHub issues.

Re: DSPy – Programming–not prompting–LMs

#39
post #15

I found it interesting how DSPy created the Signatures concept: https://dspy.ai/learn/programming/signatures/ We took this kind of concept all the way to making a DSL called BAML, where prompts look like literal functions, with input and output types. Playground link here https://www.promptfiddle.com/ https://github.com/BoundaryML/baml (tried pasting code but the formatting is completely off here, sorry). We think we…

Wouldn't try and convince the nay sayers. I have a few comments (or opinions rather) This coming from a recent dspy user hitting its pain points.

- The GitHub page is very busy

- A clear example should come up early on the page. It's only when I got to the fiddle I could see a motivating example i.e the extractions, functions and tests.

- Then a section for running tests/evaluations

-Then deployment or run with/without the baml cli

- I do wonder if all the functions have to be so tightly coupled with the model. In dspy my modules are model agnostic and I can evaluate behaviour across different models.

Re: DSPy – Programming–not prompting–LMs

#40

DSPy is both great and frustrating at times. It's designed dort prompt and response. Textgrad and DSPy share this design decision and this is where the frustration begins. I'd like the modules (dspy speak for inference ) to be aware of the chat history. Without this I'm not able to test the accuracy of the responses in the various chat contexts they appear. It's been asked for in the TextGrad & Dspy GitHub issues.

why can’t you feed the chat history back in at every forward call?
Post reply on HN