Amazon Q Developer Tips: No.10 Personalise Amazon Qs output
Published Dec 10, 2024
Reading time 3 minutes
In this series I will be sharing daily hints and tips to help you get ahead and start to accelerate you on your own journey. Each day I will share something new tip, categorised against a few themes and topics. If you have your own tips, or your own experiences with tips I share, please use the comment feature or feel free to contact me directly. Check out the previous tips here.
Ok, time for today’s tip….
Tip 10 - Guiding Amazon Q : Personalise Amazon Q’s output
In the previous Amazon Q Developer tip I walked you through setting up Amazon Q Developer Workspace Index, a powerful feature than enables Amazon Q Developer to index all the files in your IDE workspace, and then use that to provide useful context when using the @workspace command.
Today’s tip uses this capability.
When I am interacting with Amazon Q Developer via the chat interface, I often have to repeat or add the following to prompts to influence the output:
- Provide no explaination
- Generate all code suggestions for the Flask framework
- Use only open source libraries and projects
These have become second nature, but it would be great to simplify this. After reading Massimo’s blog post (DIY personalization for Amazon Q Developer) I tried this out for myself and found that this is a really great tip for providing consistent or “personalised” output.
To do this I create a folder in my local workspace - I always call this “.qdeveloper” but it does not matter what you call this. Within this folder I create a series of markdown files that I want to use to personalise the output. For example, I might want to create personalisations for database code suggestions, so I would create a file called DBA.md and in this file add the following:
DBA
Only when I explicitly ask for code, follow this guidance:
- Only provide SQL code unless I explicitly ask for another language
- I am an expert in SQL and I did not need a walk through
- I have a strong preference for Sqlite and PostgreSQL
After saving the file, I can now invoke this personalisation by using “@workspace DBA” followed by the rest of the prompt.
Check out this short video of this in action.
You can see some additional examples of how I use this here. Here is an example of me personalising the output for a Java developer.
That’s it for today’s tip. Let me know how you get on with this tip, and if you have your own drop me a message or reply. I would love to feature them here.
Try Amazon Q Developer today, and claim your free Builder ID
You can try Amazon Q Developer for free today, by signing up for a Builder ID. You can also check out my other posts on community.aws, as I have been sharing a lot of tips and use cases of how I am using Amazon Q Developer. You can also keep up to date with all the new features and improvements of Amazon Q Developer by checking out the changelog.
Made with ♥ from DevRel