This project is a simple prototype aimed to give a demonstration of how fine-tuning Large Language Models like GPT-3 is a simple and very effective way of creating a recommendation system.
- The API can be accessed here: http://139.59.133.64/
Please refer to http://139.59.133.64/docs
Large language models are very powerful tools for natural language processing, and this of course includes classification tasks. In the current case of extracting attributes from a free input query, we can see that the model performs significantly well on a high level classification with just a few basic examples given directly with the prompt.
Fine-tuning GPT-3 (or other open source language models like GPT-2) with a more suitable training set (i.e. from real use-cases) including input queries and their corresponding categories would be a simple and highly effective solution for creating a state-of-the-art recommendation system.
You will need to setup an account at https://openai.com/api/ and get your API KEY.
If you are new to Docker, click here to install and get started.
- Pull docker image from hub
docker pull plasticfruits/gpt3-classifier
- Run container
docker run -e OPENAI_API_KEY={your API KEY} --name mycontainer -p 80:80 plasticfruits/gpt3-classifier
- Open the URL where the app is being served [http://0.0.0.0:80]
- Exit with
ctrl + c
- See
prompt.txt
for reference on the prompt text that I used. - There is a limit on the quota for the API usage, too much use will lead to blocking the requests to avoid further costs.
- This is not intended as a working solution but as a demonstration of its possibilities.