At ALIRI, we always try to test out new things and learn from them. Feel free to check out some of the experiments we have done and the lessons learned we have done.
Alter Ego – 150+ personalities answer questions using OpenAI
It’s hard to have missed the hype of ChatGPT and what type of benefits that can give you. We have built a web application that emulates different personalities and responds to user questions using the OpenAI API in the background.
Try it out here: https://www.aliritech.se/alterego
The Alter Ego application operates as follows:
- A PHP script loads a JSON file containing a list of personalities and example questions for each one.
- The user can modify an existing question or add a new one.
- The prompt is designed for a natural language processing (NLP) technique called GPT-3, part of the OpenAI API. GPT-3 generates responses based on a sizeable pre-trained language model that can understand and develop human-like text.
- The prompt is sent to the OpenAI API for processing using a unique API token.
- As of 2023-03-04, it’s using the latest gpt-3.5-turbo model
- Easy API: Very easy to utilize the OpenAI API
- Prompting is hard: Not so easy to write good prompts to the OpenAI engines – since it’s more or less an advanced pattern matching engine – it can sometimes imagine things to fill the pattern it sees.
- Cost: The OpenAI API is a paid service, and this cost can be a limiting factor for some projects.
- Size of the request: Currently, a limit on the size of requests to the OpenAI API makes it hard to process more important documents, for instance. But there are ways around that – splitting up documents and having the engine summarise before processing, for example.
- Other information: The model used in this test was gpt-3.5-turbo. See all models from OpenAI that are available now on this page we have: https://www.aliritech.se/openai/