Thanks to visit codestin.com
Credit goes to github.com

Skip to content

AI chatbots of Donald Trump and Joe Biden, fine-tuned Mistral-7B models with RAG for realistic dialogue, discourse, and policy discussions.

Notifications You must be signed in to change notification settings

SecretLabOU/aipolitician

Repository files navigation

AI Politician USA

Mistral AI Fine-tuned Python 3.10 CUDA 12.4

An advanced AI system for simulating political discourse through natural language processing


Overview

AI Politician is a cutting-edge research project leveraging fine-tuned Mistral-7B language models to faithfully recreate the speaking styles, discourse patterns, and policy positions of prominent political figures. The system creates an immersive experience for users to engage with AI representations through:

  • Interactive Conversations — Direct one-on-one dialogues with political figures
  • Dynamic Debates — Realistic simulations of political discussions on contemporary issues
  • Fact-Validated Responses — Knowledge retrieval through advanced RAG technology

Key Features

💬 Personality Modeling 🎤 Debate Simulation 🔍 Knowledge Retrieval
Distinctive communication styles accurately reflect each politician's unique voice and rhetorical patterns Sophisticated moderator-controlled debates with fact-checking and natural topic progression Real-time information access ensures responses are grounded in factual context

Architecture

The system consists of three integrated components:

Chat System Debate System RAG System
Topic extraction, sentiment analysis, and personalized response generation Structured format control, cross-examination, and balanced speaking time Vector search, contextual filtering, and knowledge integration

Technology Stack

  • Foundation: Mistral-7B-Instruct-v0.2 base models
  • Personalization: Custom LoRA adapters with PEFT for efficient fine-tuning
  • Orchestration: LangChain and LangGraph for complex workflow management
  • Knowledge Base: ChromaDB vector database with SentenceTransformers embeddings
  • Performance: 4-bit quantization enabling efficient inference on consumer hardware

Quick Start

# Chat with Biden
python aipolitician.py chat biden

# Chat with Trump
python aipolitician.py chat trump

# Run a moderated debate
python aipolitician.py debate --topic "Climate Change"

Pretrained Models

Access our fine-tuned politician models on Hugging Face:

  • Biden Model — Emulates former President Biden's communication style
  • Trump Model — Captures President Trump's distinctive rhetoric

System Requirements

  • Python: 3.9+ (3.10 recommended)
  • GPU: CUDA 12.0+ (optional, significantly improves performance)
  • Storage: 8GB minimum for models and vector database

Documentation

Comprehensive guides available in the docs directory:

License

This project is available under the MIT License. See the LICENSE file for details.

Acknowledgements

We extend our appreciation to:

About

AI chatbots of Donald Trump and Joe Biden, fine-tuned Mistral-7B models with RAG for realistic dialogue, discourse, and policy discussions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages