DiscoverDeep PapersDSPy Assertions: Computational Constraints for Self-Refining Language Model Pipelines
DSPy Assertions: Computational Constraints for Self-Refining Language Model Pipelines

DSPy Assertions: Computational Constraints for Self-Refining Language Model Pipelines

Update: 2024-07-23
Share

Description

Chaining language model (LM) calls as composable modules is fueling a new way of programming, but ensuring LMs adhere to important constraints requires heuristic “prompt engineering.” 

The paper this week introduces LM Assertions, a programming construct for expressing computational constraints that LMs should satisfy. The researchers integrated their constructs into the recent DSPy programming model for LMs and present new strategies that allow DSPy to compile programs with LM Assertions into more reliable and accurate systems. They also propose strategies to use assertions at inference time for automatic self-refinement with LMs. They reported on four diverse case studies for text generation and found that LM Assertions improve not only compliance with imposed rules but also downstream task performance, passing constraints up to 164% more often and generating up to 37% more higher-quality responses.

We discuss this paper with Cyrus Nouroozi, DSPY key contributor. 

Read it on the blog: https://arize.com/blog/dspy-assertions-computational-constraints/

To learn more about ML observability, join the Arize AI Slack community or get the latest on our LinkedIn and Twitter.

Comments 
In Channel
Anthropic Claude 3

Anthropic Claude 3

2024-03-2543:01

RAG vs Fine-Tuning

RAG vs Fine-Tuning

2024-02-0839:49

Phi-2 Model

Phi-2 Model

2024-02-0244:29

loading
00:00
00:00
x

0.5x

0.8x

1.0x

1.25x

1.5x

2.0x

3.0x

Sleep Timer

Off

End of Episode

5 Minutes

10 Minutes

15 Minutes

30 Minutes

45 Minutes

60 Minutes

120 Minutes

DSPy Assertions: Computational Constraints for Self-Refining Language Model Pipelines

DSPy Assertions: Computational Constraints for Self-Refining Language Model Pipelines

Arize AI