This project is a Generative AI-powered Reddit User Persona Generator that analyzes a user's public Reddit activity - comments and posts to generate a rich, human-like persona. It leverages Large Language Models (LLMs) via Groq and is orchestrated using LangChain, providing deep behavioral insights, motivations, and personality traits based on natural language patterns.
- π Accepts any public Reddit user profile URL
- π§Ή Scrapes all available comments and posts using Reddit's PRAW API
- π§ Generates an in-depth user persona using Groq's LLM (e.g., Mixtral)
- π Outputs the persona to a clean
.txt
file in theoutputs/
folder - π Cites specific posts/comments for each personality trait
π§ AI Persona Generator UI | π Example Output |
---|---|
![]() |
![]() |
Purpose | Technology Used |
---|---|
Web scraping | Python + PRAW |
LLM pipeline | LangChain + Groq (Mixtral) |
Secrets mgmt | python-dotenv |
Output | .txt user persona files |
User Interface | Streamlit |
Future (optional) | python-pptx for visual persona |
Reddit_Persona_Generator/
βββ reddit_scraper.py # Fetches user comments/posts
βββ persona_generator.py # Generates persona using LLM
βββ main.py # Main entry point
βββ .env # API credentials (ignored in .gitignore)
βββ requirements.txt # Python dependencies
βββ README.md # Project documentation
βββ .gitignore # Hides secrets, venv, and outputs
βββ outputs/
βββ kojied.txt
βββ Hungry-Move-6603.txt
Create a .env
file in the root folder with:
REDDIT_CLIENT_ID=your_reddit_client_id
REDDIT_CLIENT_SECRET=your_reddit_client_secret
REDDIT_USERNAME=your_reddit_username
REDDIT_PASSWORD=your_reddit_password
USER_AGENT=YourScriptName by u/yourusername
GROQ_API_KEY=your_groq_api_key
- Clone the Repo
git clone https://github.com/your-username/beyondchats_ai_intern.git cd beyondchats_ai_intern
- Create Virtual Environment
python -m venv reddit_persona # Windows: reddit_persona\Scripts\activate # macOS/Linux: source reddit_persona/bin/activate
- Install Dependencies
pip install -r requirements.txt
- Run the Script
python main.py
- π Enter a Reddit profile URL when prompted.
- π Output will be saved in
outputs/<username>.txt
- Run the Script in Terminal
streamlit run app.py
- Strategic Thinker
- Analytical
- Socially Aware
- Strategic resource management
- Creative consistency
- "You have to kill the bandit units..." β [Reddit Comment]
- Only public Reddit profiles with visible comment/post history can be analyzed.
- Quotes are extracted to reflect traits where applicable.
- Personality bars and inferred professions are approximations based on LLM predictions.
- Generate persona slides or images using
python-pptx
- Visualize traits with charts or graphs
Feel free to fork, star, or submit a pull request to contribute improvements!