A generated image of an impressionist style painting (oil on canvas) of a robot creating another robot.

Building a prompt to generate chatbot persona prompts

I’ve recently been experimenting with the idea of creating a generative AI prompt which can build other prompts for specific personas. Sometimes I know roughly what I want, but I don’t really know all of the required detail of how to describe it. For example, let’s say you want to have a conversation with a Large Language Model (LLM) which directs you to Cognitive Behavioural Therapy (CBT) techniques. You might know that this is what you want, but you might not know all of the detail of how to describe this. To do that you’ll first need to know how to write a good, detailed, targeted prompt. On top of that, you’ll need to understand exactly how CBT works and then describe it in terms of a prompt. The idea behind this approach is to use the autoregressive nature of generative AI (text-to-text) to first have a conversation that extracts exactly what you want, amend and confirm what it suggests, and then narrow this down into a prompt template which you can keep and use in a repeatable way. I will show some examples of how to do this with ChatGPT, however you could experiment with the same approach using any other similar LLM provider, or even a local LLM via GPT4All or Ollama. ...

21 December, 2023

Quickly import your ssh public keys from Github with ssh-import-id

There’s a neat Ubuntu command which allows you to easily import your ssh public keys from Github to your server user account. 1 ssh-import-id-gh <github username> By default, it will append the fetched public key (or keys if you specify multiple accounts) to the current user’s ~/.ssh/authorized_keys file. Once you’ve run the above, you will be able to ssh to your server account using the same key you would use to push code to Github. ...

7 June, 2020

Short Variable Names in Go

When I first started learning Go, I heard a lot of people talk about the idiomatic way of doing things. “Sure, that way works, but this is the way we do it in Go.” I’m OK with that - a strict convention can give every piece of code a strong sense of familiarity - and Go has quite a few of these. One such convention is to use short variable names. Variable names in Go should be short rather than long. This is especially true for local variables with limited scope. Prefer c to lineCount. Prefer i to sliceIndex. ...

24 May, 2020

Cache Busting with Jekyll

If you’re running Jekyll and updating styles fairly regularly, you may want to add a cache busting line to your styles and scripts to ensure you (and your visitors) are always accessing the latest version of your assets. ...

9 February, 2020

Murfitt.net is now on Jekyll

This website has been run on various CMSs and frameworks over the years. Joomla, Drupal, Laravel, Symfony…and now Jekyll. ...

7 February, 2020