8000 GitHub - gear/dsp: The Demonstrate-Search-Predict Framework: Composing retrieval and language models for knowledge-intensive NLP · GitHub
[go: up one dir, main page]

Skip to content
7FFF
gearPublic
forked from stanfordnlp/dspy

About

The Demonstrate-Search-Predict Framework: Composing retrieval and language models for knowledge-intensive NLP

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

40 Commits

Folders and files

Repository files navigation

🎓𝗗𝗦𝗣: Demonstrate–Search–Predict

DSP is a framework for composing retrieval models (RMs) and language models (LMs) into powerful pipelines that tackle knowledge-intensive tasks.

You write a DSP program in a few lines of code. The program specifies an NLP system by describing a pipeline of interactions between RMs and LMs.

In DSP, you don't hard-code few-shot prompts. Instead, the DSP runtime annotates the examples for your pipeline, starting from a few end-task examples (e.g., question and final answer) that are pipeline-agnostic.

You can get an overview via our Twitter threads:

And read more in the paper:

Installation

pip install dsp-m 64C9 l

🏃 Getting Started

Our intro notebook provides examples of five "multi-hop" question answering programs of increasing complexity written in DSP.

You can open the intro notebook in Google Colab. You don't even need an API key to get started with it.

Once you go through the notebook, you'll be ready to create your own DSP pipelines!

[NEW!] DSP Compiler

Our compiler notebook introduces the new experimental compiler, which can optimize DSP programs automatically for (much) cheaper execution.

You can open the compiler notebook in Google Colab. You don't even need an API key to get started with it.

✍️ Reference

If you use DSP in a research paper, please cite our work as follows:

@article{khattab2022demonstrate,
  title={Demonstrate-Search-Predict: Composing Retrieval and Language Models for Knowledge-Intensive {NLP}},
  author={Khattab, Omar and Santhanam, Keshav and Li, Xiang Lisa and Hall, David and Liang, Percy and Potts, Christopher and Zaharia, Matei},
  journal={arXiv preprint arXiv:2212.14024},
  year={2022}
}

About

The Demonstrate-Search-Predict Framework: Composing retrieval and language models for knowledge-intensive NLP

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0