Skip to content

superU-ai/User-Persona

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

User Profile for LLM

Overview

This tool is designed to identify the persona of a user based on their conversations or statements. By analyzing the text, it extracts and identifies key aspects of a user's persona, such as age, gender, profession, hobbies, relationship status, and city.

Key data points: age, gender, city, profession, relationship status, interests, contact info.

Installation

Step 1: Clone the Repository

First, clone the repository to your local machine using the following command:

git clone <repository-url>

Replace <repository-url> with the actual URL of the repository.

Step 2: Install Dependencies

Navigate into the cloned repository directory and install the required Python package (openai):

pip install openai

Setting Up Your OpenAI API Key

To use this tool, you will need an API key from OpenAI. Once you have your API key, you can set it in your code like this:

# test.py
openai.api_key = 'YOUR_API_KEY_HERE'

Usage

Here's a simple example to get you started with the User Persona Identifier:

  1. Import the necessary modules and set your OpenAI API key:
# test.py

from userpersona_using_openai import UserPersonaIdentifier
import openai
openai.api_key = 'YOUR_API_KEY_HERE'
  1. Create an instance of UserPersonaIdentifier and pass in the openai module:
conversation_analyzer = UserPersonaIdentifier(openai)
  1. Define a list of statements or conversation snippets from the user:
User_Msgs = [
    'how are you doing today',
    'what do you weld ? houses ?',
    'how does that feel for you',
    'i watch kids for a living	i come from a large family .',
    'i want candy .',
    'my wedding is set for april 11 .	i do not travel .',
    'i handle cash .',
    'i need to educate myself more .'
]
  1. Analyze the conversation and print the results:
result = conversation_analyzer.analyze_conversation(User_Msgs)
print(result)

This will output the identified persona attributes based on the provided conversation snippets.

Room for Improvement:

Slow Changing Dimension Database Integration Future data points to be added from backend

  • User Engagement metrics
    • Interactions
    • Impression
    • Clicks
    • Purchases
  • GEO Location
    • IP
  • Device Information
  • Price Sensitivity

Note

The accuracy of the persona identification depends on the quality and quantity of the conversation data provided. Ensure that the conversations are representative of the user's typical communication style for the best results.

About

This repository contains the tool that is designed to identify the persona of a user based on their conversations or statements.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages