CU-Autovate is a Python project that automates "innovation"/product ideas by leveraging openAIs APIs to generate focus groups and iterate over product design.
When run, the program does the following:
- Creates an initial set of focus group personas
- Interviews the initial focus group around their needs
- Based on the initial focus group data, "innovates" a set of new products
- Brings that set of new product ideas back to the focus group and conducts feedback interviews
- Summarizes that feedback
- Evolves the products based on the focus group feedback
- Repeats steps 4-7 a set number of iterations
- Produces final products based on the iterations
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You will need to install the "openai" Python library.
You will need to have an account with OpenAI and have an API key.
Clone this repository to your local machine.
git clone https://github.com/tombarkley/cu-autovate.git
Save your OpenAI API key to your environment variables as OPENAI_API_KEY
.
Before running the program, you will need to update the settings in the settings.json
file to your preference. You will also need to update the prompts in the prompts
folder prior to running the program.
The settings.json
file contains all of the settings to control the program. You will need to update the settings to your preference prior to running the program.
There are the following sections in the settings.json
file:
- focus_group (object) - contains the settings for the initial focus group personas
- min_personas (int) - controls the minimum number of personas to generate for the initial focus group
- api (object) - contains the settings for the openAI API call
- temperature (float) - controls the randomness of the output
- frequency_penalty (float) - controls how often the same word is repeated
- presence_penalty (float) - controls how often the same word is repeated
- max_retries (int) - controls how many times the API call will be retried if it fails
- init_interview (object) - contains the settings for the initial focus group interviews (only api settings)
- api (object) - contains the settings for the openAI API call
- temperature (float) - controls the randomness of the output
- frequency_penalty (float) - controls how often the same word is repeated
- presence_penalty (float) - controls how often the same word is repeated
- max_retries (int) - controls how many times the API call will be retried if it fails
- api (object) - contains the settings for the openAI API call
- init_interview_questions (object) - contains the settings for the initial focus group interview questions
- question_count (int) - controls the number of questions to ask the initial focus group
- api (object) - contains the settings for the openAI API call
- temperature (float) - controls the randomness of the output
- frequency_penalty (float) - controls how often the same word is repeated
- presence_penalty (float) - controls how often the same word is repeated
- max_retries (int) - controls how many times the API call will be retried if it fails
- imagine_products (object) - contains the settings for the inital product generation
- product_count (int) - controls the number of products to generate
- sample_size (int) - controls the number of responses to feed to the generation function
- api (object) - contains the settings for the openAI API call
- temperature (float) - controls the randomness of the output
- frequency_penalty (float) - controls how often the same word is repeated
- presence_penalty (float) - controls how often the same word is repeated
- max_retries (int) - controls how many times the API call will be retried if it fails
- feedback_questions (object) - contains the settings for the feedback questions
- question_count (int) - controls the number of questions to ask the focus group
- api (object) - contains the settings for the openAI API call
- temperature (float) - controls the randomness of the output
- frequency_penalty (float) - controls how often the same word is repeated
- presence_penalty (float) - controls how often the same word is repeated
- max_retries (int) - controls how many times the API call will be retried if it fails
- feedback_interviews (object) - contains the settings for the feedback interviews (only api settings)
- api (object) - contains the settings for the openAI API call
- temperature (float) - controls the randomness of the output
- frequency_penalty (float) - controls how often the same word is repeated
- presence_penalty (float) - controls how often the same word is repeated
- max_retries (int) - controls how many times the API call will be retried if it fails
- api (object) - contains the settings for the openAI API call
- summarize_feedback (object) - contains the settings for the feedback summary (only api settings)
- api (object) - contains the settings for the openAI API call
- temperature (float) - controls the randomness of the output
- frequency_penalty (float) - controls how often the same word is repeated
- presence_penalty (float) - controls how often the same word is repeated
- max_retries (int) - controls how many times the API call will be retried if it fails
- api (object) - contains the settings for the openAI API call
- evolve_product (object) - contains the settings for the product evolution (only api settings)
- api (object) - contains the settings for the openAI API call
- temperature (float) - controls the randomness of the output
- frequency_penalty (float) - controls how often the same word is repeated
- presence_penalty (float) - controls how often the same word is repeated
- max_retries (int) - controls how many times the API call will be retried if it fails
- api (object) - contains the settings for the openAI API call
- iterations (array of objects) - contains the settings for the iterations
- new_personas (bool) - controls whether new personas will be generated
- min_personas (int) - controls the minimum number of personas to generate
- new_questions (bool) - controls whether new questions will be generated
- question_count (int) - controls the number of questions to ask the focus group
The prompts
folder contains the prompt files for the program. The prompt files are used to generate the personas, questions, and products. They can be changed to allow different purposes without having to change the underlying code.
The prompt files are combined in the order below for each function:
- Creating Initial Interview Questions
market_research_firm.context
interview_questions.instruction
autovator.input
interview_questions.output
- Creating Focus Group Personas
market_research_firm.context
focus_group.instruction
autovator.input
focus_group.output
- Conducting Initial Interviews
consumer_init_interview.context
consumer_init_interview.instruction
autovator.input
text_conversation.output
- Creating Initial Products
autovator.input
imagine_products.instruction
imagine_products.input
imagine_products.output
- Creating Feedback Questions
market_research_firm.context
feedback_questions.instruction
autovator.input
feedback_questions.output
- Conducting Feedback Interviews
consumer_feedback.context
- The instruction here feeds the personas and products from the previous steps
autovator.input
text_conversation.output
- Summarizing Feedback
autovator.input
analyze_feedback.instruction
analyze_feedback.input
- Either of:
number_scale.output
summary.output
- Evolving Products
autovator.input
edit_product.instruction
- The input is the feedback from the interviews
edit_json.output
To run the program, simply execute the cu-autovate.py
file.
python cu-autovate.py
Example results can be found in the example-results
branch.
This project is open source under the MIT License.