Skip to content

UchiaObito004/Cold_Email_Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

35 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“§ AI Cold Email Generator

Python Streamlit LangChain ChromaDB Groq License

An AI-powered cold email generator that creates personalised outreach emails from job posting URLs. Paste a job link or job description, get a tailored cold email in seconds β€” powered by LLaMA 3, semantic search, and your own portfolio.


πŸ–₯️ Demo

img1

img2

🧠 How It Works

Job Posting URL / Pasted Job Description
            ↓
  BeautifulSoup scrapes the page
            ↓
  clean_text() removes HTML noise & unicode
            ↓
  LLaMA 3 (Groq) extracts:
  role Β· skills Β· experience Β· description
            ↓
  ChromaDB semantic search
  β†’ finds matching portfolio projects
            ↓
  LLaMA 3 generates a personalised cold email
            ↓
  User copies / downloads the email

✨ Features

  • πŸ”— URL-based scraping β€” paste any Lever-hosted job URL and scrape automatically
  • πŸ“‹ Direct text input β€” paste job description from any website (LinkedIn, Naukri, Internshala)
  • πŸ€– LLM-powered extraction β€” understands role requirements, not just keywords
  • πŸ” Semantic portfolio matching β€” ChromaDB finds your most relevant projects
  • 🌍 Multi-language support β€” English, Hindi, Spanish, French, German
  • 🎨 Tone control β€” Professional, Friendly, Assertive, or Concise
  • βš™οΈ Fully configurable β€” sender name, company name, tone from the sidebar
  • πŸ“₯ Download as .txt β€” one-click export
  • πŸ•˜ Email history β€” all generated emails saved in session

πŸ› οΈ Tech Stack

Layer Technology
LLM LLaMA 3.3 70B via Groq API
Orchestration LangChain
Vector Database ChromaDB
Frontend Streamlit
Web Scraping BeautifulSoup + Requests
Language Python 3.10+

πŸ“ Project Structure

Cold_Email_Generator/
β”œβ”€β”€ app.py              # Streamlit UI β€” sidebar config, input, email display, history
β”œβ”€β”€ chains.py           # LLM logic β€” job extraction & email generation
β”œβ”€β”€ portfolio.py        # ChromaDB β€” vector store for portfolio projects
β”œβ”€β”€ utils.py            # Text cleaning β€” strips HTML tags & unicode noise
β”œβ”€β”€ my_portfolio.csv    # Your portfolio data (Techstack + Links)
β”œβ”€β”€ requirements.txt    # Python dependencies
β”œβ”€β”€ dockerfile          # Docker setup
└── .env                # API keys (not committed)

βš™οΈ Setup & Installation

1. Clone the repository

git clone https://github.com/UchiaObito004/Cold_Email_Generator.git
cd Cold_Email_Generator

2. Install dependencies

pip install -r requirements.txt

3. Set up environment variables

Create a .env file in the root directory:

GROQ_API_KEY=your_groq_api_key_here

Get your free Groq API key at πŸ‘‰ console.groq.com

4. Add your portfolio data

Edit my_portfolio.csv with your own projects:

Techstack,Links
"React, Node.js, MongoDB",https://github.com/you/project1
"Python, FastAPI, PostgreSQL",https://github.com/you/project2

5. Run the app

streamlit run app.py

Open your browser at http://localhost:8501


πŸš€ Usage

Option 1 β€” Scrape from URL

  1. Go to any Lever-hosted job posting β€” https://jobs.lever.co
  2. Copy the job URL
  3. Select "Scrape from URL" in the app
  4. Paste the URL and click Generate Email

Option 2 β€” Paste Job Description

  1. Go to any job posting β€” LinkedIn, Naukri, Internshala, anywhere
  2. Select all text (Ctrl+A) and copy (Ctrl+C)
  3. Select "Paste Job Description Text" in the app
  4. Paste and click Generate Email

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           Streamlit UI (app.py)         β”‚
β”‚  Sidebar: name Β· company Β· tone Β· lang  β”‚
β”‚  Input: URL scrape or paste text        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
       β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚   chains.py    β”‚  ← LangChain + LLaMA 3 (Groq)
       β”‚  extract_jobs  β”‚     extracts role, skills,
       β”‚  write_mail    β”‚     generates cold email
       β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
       β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚  portfolio.py  β”‚  ← ChromaDB vector store
       β”‚  load_portfolioβ”‚     semantic search on
       β”‚  query_links   β”‚     your portfolio projects
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ”‘ Key Technical Decisions

Why Groq? Groq's LPU delivers ultra-fast inference speeds β€” critical for real-time email generation UX. Response times are significantly faster than standard GPU inference.

Why ChromaDB? Lightweight embedded vector database with no server required. Perfect for portfolio-scale semantic search out of the box β€” no complex infrastructure needed.

Why LangChain? Clean abstraction for prompt templates, output parsers, and LLM chaining. Keeps chains.py modular, readable, and easy to extend with new models or providers.

Why BeautifulSoup over WebBaseLoader? BeautifulSoup's get_text() extracts clean visible content from HTML far more reliably than WebBaseLoader, which often leaves behind tag fragments and noise that confuse the LLM's JSON parser.


🀝 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.


πŸ‘€ Author

Bhushan Verma


πŸ“„ License

MIT

About

This project is an AI-powered cold email generator that creates personalized outreach emails from job descriptions. It uses LLaMA 3 via the Groq API with LangChain to understand job requirements, performs semantic search on portfolio data stored in ChromaDB using vector embeddings, and automatically selects the most relevant work.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages