UHK Macro Creator (OpenAI GPTs)

I’ve used the newly introduced GPTs feature from OpenAI to create a ChatGPT interface that attempts to assist in generating UHK macros from natural language descriptions.

This is a combination of prompts and providing it the user guide and reference manual for RAG. I plan to upload additional example documents with my own macros and those I find here.

I believe for now access to the GPTs interface does require a Plus subscription.

1 Like

Here is the system prompt that was generated by using the creation wizard here:

Macro Master is a specialized GPT created to interpret natural language and generate valid UHK macro syntax, with a focus on accuracy, referencing the newly uploaded UHK user guide and the reference manual to ensure the most up-to-date and comprehensive information is used. It provides precise, ready-to-use macros, focusing on clarity and efficiency while avoiding potential security risks. Maintaining a professional and technical demeanor, it asks for clarifications when necessary and refrains from using direct addresses in interactions.

I’m also a ChatGPT subscriber, but up until this time, I wasn’t aware of the GPTs feature.

Here’s my short conversation with UHK Macro Master. Its double-tap answer was spot-on, but for some reason, it used the non-existent incrementVar keyword for triple-taps.

I’m still blown away by this application; it will only get better, and this is the way long term. Thanks for sharing!

Your “system prompt” links to the generic https://chat.openai.com/auth/login?next=%2Fgpts%2Feditor URL. Would you correct it? I’m unsure whether you mean the GPT instructions you provided, but I’m especially interested in them.

The link is to the form creation wizard I used to actually generate the system prompt. You answer a series of questions, and then upload any relevant documentation for RAG.

I included the system prompt it generated above, but here it is again:

Macro Master is a specialized GPT created to interpret natural language and generate valid UHK macro syntax, with a focus on accuracy, referencing the newly uploaded UHK user guide and the reference manual to ensure the most up-to-date and comprehensive information is used. It provides precise, ready-to-use macros, focusing on clarity and efficiency while avoiding potential security risks. Maintaining a professional and technical demeanor, it asks for clarifications when necessary and refrains from using direct addresses in interactions.

Its double-tap answer was spot-on, but for some reason, it used the non-existent incrementVar keyword for triple-taps.

Yeah hallucinations are a common problem. This could possibly be improved by providing more documented examples of macros. That’s actually why I did this in the first place, I’m finding the macro syntax difficult to break into without examples.

user-guide.md is full of examples, why exactly do you find it insufficient?

List examples you are missing and I am happy to fill them in!

I personally prefer using ChatGPT to code basic code templates started. I’ve used it for applescript and the likes.

So I think having a ChatGPT bot for this usecase is helpful. I only refer to the docs after having the template since there is dodgy code but atleast ChatGPT will point me in the concepts I need to read up on to get stated.

@Zetaphor Thanks for elaborating! It’ll be worth experimenting with GPTs more and extending our documentation, as this is already useful, and it’ll keep getting better. We may dedicate some time to this.

I tried uploading the reference doc to the Knowledge of my GPT but still hallucinates commands very badly. The best results for me have been uploading the full doc via the API, then the answers are spot on, but, we are talking about 25k tokens min, so $1 per call or around that which is super expensive.

I’ll definitely gonna give this GPT a try later today, seems promising.

As for reducing hallucinations when using the front end (as using the api with the full documents in context is very expensive), I would suggest gathering as much examples as possible and feeding it via the knowledge settings of the GPT. The more examples we can get, including from this forum, the better it should get.

1 Like