Prompt Like a Data Scientist: Auto Prompt Optimization and Testing with DSPy | by Julian Yip | Towards Data Science
LLMs are grounded in data science, but our approach to prompt engineering might strike us as unscientific: To address these issues, Stanford NLP has published a paper introducing a new approach with prompt writing: instead of manipulating free-form strings, we generate prompts via modularized programming. The associated library, called DSPy, can be found here. This article aims to show how this “prompt programming” is done, to go deeper in explaining what’s happening behind the optimization process. The code can also be found here. (Speaking of which, you might also find coaxing LLMs to output properly formatted JSON very unscientific too, I have also written an article about how to address this with Function Calling. Check it out !) towardsdatascience.com We will spend some time to go over the environment preparation. Afterwards, this article is divided into 3 sections: We are now ready to start! They are the building blocks of prompt programming in DSPy. Let’s dive in to see what the
Prompt Like a Data Scientist: Auto Prompt Optimization and Testing with DSPy | Towards Data Science Data Science Prompt Like a Data Scientist: Auto Prompt Optimization and Testing with DSPy Applying machine learning methodology to prompt building Julian Yip May 5, 2024 49 min read Share Drawn by the author LLMs are grounded in data science, but our approach to prompt engineering might strike us as unscientific: Manual prompt engineering which does not generalize well : LLMs are highly sensitive to how they are prompted for each task, so we need to handcraft long strings of instructions and dem
Explore this link on the map →saved by
related reading
- Prompt Engineering | Kagglekaggle.com
- GitHub - brexhq/prompt-engineering: Tips and tricks for working with Large Language Models like OpenAI's GPT-4. · GitHubgithub.com
- Newest Annual Compilation Of The Best Prompt Engineering Techniquesforbes.com
- The Shape of AI | UX Patterns for Artificial Intelligence Designshapeof.ai
- Prompt Engineering Tips and Tricks with GPT-3 · andrew makes thingsblog.andrewcantino.com
- Prompts for Work & Play: Launching the Wolfram Prompt Repository-Stephen Wolfram Writingswritings.stephenwolfram.com
- Prompt Engineering | Lil'Loglilianweng.github.io
- Prompt engineering | OpenAI APIplatform.openai.com
- Cookbookcookbook.openai.com
- My 5 Favorite AI Prompts for Writing - by Peter Yangcreatoreconomy.so
- Generated Knowledge Prompting | Prompt Engineering Guidepromptingguide.ai
- Chain-of-Thought Prompting | Prompt Engineering Guidepromptingguide.ai