Skip to content

dgo2dance/Agent_Date

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Agents for Dating Apps

A system where AI agents representing two people have virtual dates and decide if the real people should meet. The agents are based on the people's personality, texting style, dreams, hopes, and other characteristics extracted from their WhatsApp chat data.

Features

  • WhatsApp Chat Parsing: Extracts and processes WhatsApp chat exports
  • Personality Profiling: Analyzes personality traits, texting style, interests, dreams, and values
  • AI Agent Creation: Creates personalized AI agents based on user profiles
  • Virtual Date Simulation: Simulates conversations between two AI agents
  • Compatibility Assessment: Determines if real people should meet based on agent interactions
  • Vision-Language Integration: Analyzes faces and generates compliments using VL models

Project Structure

.
├── data_collection/
│   ├── whatsAPP_Chat_Parser.py    # WhatsApp chat parsing and embedding
│   ├── personality_profiler.py    # Personality trait extraction
│   └── user_profile_builder.py    # Comprehensive profile building
├── agents/
│   ├── ai_agent.py                # AI agent representing a person
│   ├── virtual_date_simulator.py  # Virtual date conversation simulator
│   └── vision_language_integration.py  # Face analysis and compliments
├── main.py                        # Main orchestration script
└── requirements.txt              # Python dependencies

Installation

  1. Install dependencies:
pip install -r requirements.txt
  1. Set up OpenAI API key (optional, for LLM responses and face analysis):
export OPENAI_API_KEY="your-api-key-here"

Usage

Step 1: Export WhatsApp Chats

Export your WhatsApp chats:

  1. Open WhatsApp
  2. Go to the chat you want to export
  3. Click the three dots menu → More → Export chat
  4. Save as text file (without media)

Step 2: Build User Profiles

Build profiles for two users:

python main.py --mode build \
    --chat1 path/to/user1_chat.txt \
    --chat2 path/to/user2_chat.txt \
    --user1 "User1 Name" \
    --user2 "User2 Name" \
    --output-dir profiles

Step 3: Run Virtual Date

Simulate a virtual date between the two agents:

python main.py --mode date \
    --user1 "User1 Name" \
    --user2 "User2 Name" \
    --output-dir profiles \
    --openai-key your-api-key \
    --max-turns 20 \
    --face1 path/to/user1_face.jpg \
    --face2 path/to/user2_face.jpg

Full Pipeline

Run both steps together:

python main.py --mode full \
    --chat1 path/to/user1_chat.txt \
    --chat2 path/to/user2_chat.txt \
    --user1 "User1 Name" \
    --user2 "User2 Name" \
    --output-dir profiles \
    --openai-key your-api-key \
    --max-turns 20 \
    --face1 path/to/user1_face.jpg \
    --face2 path/to/user2_face.jpg

How It Works

1. Data Collection

  • Parses WhatsApp chat exports
  • Extracts messages, timestamps, and authors
  • Creates embeddings using sentence transformers
  • Builds FAISS index for semantic search

2. Personality Profiling

  • Analyzes texting style (message length, emoji usage, formality)
  • Extracts interests from keywords
  • Identifies personality traits (humor, curiosity, empathy, etc.)
  • Extracts dreams, hopes, and values using pattern matching

3. AI Agent Creation

  • Creates agents based on personality profiles
  • Uses semantic search to find relevant context from chat history
  • Generates responses matching the person's texting style

4. Virtual Date Simulation

  • Agents converse using LLM (GPT-3.5/GPT-4)
  • Responses are personalized based on personality profiles
  • Interest levels are tracked and updated
  • Conversation continues until agents decide to stop

5. Compatibility Decision

  • Both agents make individual decisions
  • Compatibility score calculated from:
    • Interest level
    • Conversation quality
    • Mutual interest
  • Final recommendation: meet or not meet

6. Vision-Language Integration

  • Analyzes face images using GPT-4 Vision
  • Extracts facial features and style
  • Generates personalized compliments
  • Integrates into agent conversations

Output

The system generates:

  • Profile files: JSON files with personality data, FAISS indices, and corpus
  • Conversation log: Full transcript of the virtual date
  • Decision report: Compatibility scores and recommendations

Example Output

FINAL DECISIONS
============================================================

User1:
  Decision: meet
  Compatibility Score: 0.75
  Interest Level: 0.82
  Reasoning: High compatibility (0.75). Interest level: 0.82. Good conversation flow.

User2:
  Decision: meet
  Compatibility Score: 0.71
  Interest Level: 0.78
  Reasoning: High compatibility (0.71). Interest level: 0.78. Good conversation flow.

FINAL RECOMMENDATION
============================================================

Should they meet? YES ✓
Average Compatibility: 0.73
Reasoning: Both agents show interest. Average compatibility: 0.73. Recommended to meet.

Customization

Adding Manual Data

You can enhance profiles by adding manual data:

from data_collection.user_profile_builder import UserProfileBuilder

builder = UserProfileBuilder()
profile, index, embeddings = builder.build_from_whatsapp("chat.txt", "User Name")

# Add dreams, hopes, values
profile = builder.add_manual_data(
    profile,
    dreams=["Travel to Japan", "Start a business"],
    hopes=["Find meaningful relationships", "Make a positive impact"],
    values=["Honesty", "Creativity", "Adventure"]
)

Adjusting Compatibility Thresholds

Edit agents/ai_agent.py to adjust:

  • Interest level thresholds
  • Compatibility score weights
  • Decision criteria

Requirements

  • Python 3.8+
  • OpenAI API key (for LLM responses and face analysis)
  • WhatsApp chat exports (text format)

Notes

  • The system works best with substantial chat history (100+ messages)
  • Face analysis requires GPT-4 Vision API access
  • For production use, consider fine-tuning models on dating conversation data
  • Privacy: All data is processed locally except for API calls to OpenAI

Future Enhancements

  • Support for multiple chat sources (Instagram, SMS, etc.)
  • Fine-tuned models for better personality matching
  • Real-time conversation interface
  • Multi-modal analysis (voice, video)
  • Advanced compatibility algorithms

About

AI Agents Goes on Virtual Dates Before you Do

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 97.7%
  • PowerShell 1.7%
  • Jupyter Notebook 0.6%