Prompting Advice
Tips on how to best prompt and redirect Devin
Devin needs guidance on what your preferences are and how to check if it’s on the right track. If not specified, Devin will make its own judgment calls. We recommend following a simple structure in your prompts to make sure Devin stays on track and checks its own work:
- What: describe the task you want Devin to complete
- How: describe some do’s and don’t’s for Devin when completing the task (e.g. deploy using Modal, etc.)
- Result: describe the expected results or behaviors Devin should test for so Devin knows when the task is complete
Prompt Library
Split complex tasks into simpler sub-tasks, across multiple sessions
As with any entry-level engineer, Devin is more likely to succeed if complex projects are broken down into clear sub-tasks.
We also recommend working with Devin across multiple separate sessions as Devin’s performance can sometimes degrade as the session gets longer. If this happens, consider using snapshots as a way to maintain the progress on Devin’s machine image in your new sessions.
Tell Devin how to check its progress
Devin works best when it can independently test or verify that it’s on the right track.
Give Devin checkpoints to verify its work before moving on, and specify how Devin should sanity check its progress. For example, if you ask Devin to find a dataset, make sure Devin finds the right one by specifying dataset characteristcs it should expect (e.g. there should be more than 500 rows).
Be clear and specific
Provide clear, detailed instructions and requirements for Devin. For example, try to:
- Specify the key steps necessary to complete a task
- Name specific repos, libraries, branches, etc you want Devin to work with
Nothing is “too obvious” for Devin, but it will do its best to clarify and ask questions along the way.
Use Playbooks
For repetitive or complex tasks, we suggest using and iterating on Playbooks. Playbooks are easily reusable and shareable prompts.
Provide references or examples
When available, link documentation or examples that are relevant for the task. If you don’t provide any resources, Devin may search for documentation independently.
Jump in!
Ask Devin questions and give Devin instructions while it’s working, just as you would with any other teammate!