I hope you had a lovely Easter (if you are celebrating it) and now ready to be back in business!
It's no secret that both David and I regularly go to a psychologist currently.
I go because I have stuff I need to work on and I want to work on.
Recently I'm struggling a lot with anxiety, especially when it comes to thoughts around work. To help gain a better understanding of my psyche, my therapist gave me a questionnaire of over 230 questions.
It's your typical statement questions where you have to put in from 1 to 6 on how much you think that statement is true to you.
Then based on the answers you give, it gives you an assessment on the different areas of your schemas.
How to clone a therapist
And as the ChatGPT nerd I am, I thought: oh this is amazing. A written document on how my brain works in different areas of life!
I could configure a pocket psychologist using this!
So my idea was to:
- Create a CustomGPT that has a psychologist persona that uses the methods that my therapist currently uses, plus it has background information on me.
- Save the questionnaire responses to a knowledge base, so the GPT can use these responses to guide me 24/7.
First, I began with the System prompt (the Custom GPT Instructions). It currently sounds like this, but I keep adjusting it based on the performance:
Act as a clinical psychologist who helps Dave overcome his daily difficulties.
Your methods: Adopt an integrative approach. You are closely aligned with psychoanalysis. Aim for exploratory work that facilitates meaningful solutions and the development of deeper understanding, thereby initiating necessary changes in Dave through insights.
When speaking with Dave, ask no more than one question at a time or provide a professional reflection to help him articulate what is happening to him professionally, or offer advice.
Avoid generalizations, oversimplifications, and long, overwhelming responses containing too many questions, pieces of advice, or too much information. Less is more: use as few words as possible to convey what you want to say.
Basically 4 elements out of 6 from our Prompt Engineering course.
- Persona & context
- Your methods (expected behaviour element)
- How to respond (What is a good response element)
- What not to do (limitations and constraints elements)
Can you tell which ones I didn't use? Can you also explain why? Think about it for a second, I'll provide the answer in the P.S.
Then I give it more context about myself:
About Dave: A 27-year-old, single entrepreneur who is successful in his profession but struggles in his personal life. He wants to read more, meditate, and develop his emotional intelligence. He has seen many psychologists. He finds it difficult to introspect on his current emotions and to process them appropriately. You can find his answers to the Young Schema Questionnaire in the "Dave Young Questionnaire Answers.pdf" file. Always refer back to these before responding, so you have more context on the problem.
Here I also tell it how to refer to the knowledge base. Which brings me to my next point.
Structuring the Knowledge Base file
I could've just uploaded the statements and the scores I gave to them, but I didn't think that it would've worked well, because the numbers encode meaning only when the "Legend" that explains what the numbers mean are also in close proximity to the statements.
So instead, I took ChatGPT for a ride, and asked it to rewrite each statement by baking in my numerical evaluation.
So I went from this text: "I always fail. 2 (means it's mostly untrue of me)" to ➔ "I rarely feel like I am failing."
This way, the number is converted to semantic meaning and it's contextually built into the sentence. This helps a lot with the performance of the embedding.
So now I have a PDF with all statements rephrased to reflect how I think or feel about them + the final evaluation summary.
I uploaded this to the Custom GPT, and it works really well.
Here is an example:
As you can see, the GPT did a phenomenal job at making the response highly relevant to me. It used my responses from the questionnaire, and correctly identified that I indeed hold myself to extremely high standards, and when I don't work or I'm not productive, I feel guilty, unloveable and worthless.
It also suggested ways that I indeed find relaxing and fulfilling, like reading or meditating. (this was based on the prompt, not the knowledge base.)
What's so cool about this
The amazing thing about this whole thing is that I put this together this Monday evening in roughly an hour once I had the questionnaire responses.
And it really works. Last night, I was having anxious thoughts right before going to sleep. The GPT recommended me to journal my thoughts. I said "I DON'T WANNA JOURNAL". Yet it convinced me to just give it a try and see what happens.
I spent 4 minutes to write down all my fears I had on top of mind, and once I was done, the anxiety went away and I could go to sleep.
If you are reading this newsletter, and you want to build this into a software product, where you can create a system, where people respond to a questionnaire and then you automatically create the personalized therapist bot for them, let me know if you do it, I'd be happy to promote it to the list (but only if it works really well 😉).
Technically it's just yet another OpenAI API wrapper, but that doesn't mean it couldn't be tremendeously helpful to millions.
And if you want to learn how to use ChatGPT like this and personalize it to your use cases, take our new 2024 Prompt Master course. It's available at a ridiculous discount until April 9th, I'd hate for you to miss it.
Talk soon,
Dave (the short, bald David with the beard and glasses)
P.S. #1: Answer to the question: In my Custom GPT instruction prompt, I didn't use the "Examples" element and the "Steps to achieve the goal". Why? Because it performed well without the examples (that's usually useful for just fine tuning), and it didn't need to do a complex step-by-step process.
P.S. #2: Something I want to do to improve this GPT is to configure a custom action that can upload the insights from the chats to the knowledge base, so it can keep learning about me. I think I'll use the Keymate GPT Action to do that, but I haven't found the time yet. I'll keep you updated about how that goes.