Skip to content

Nevvyboi/GroundZero

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

90 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 GroundZero AI

Your Personal AI That Learns and Grows With You

GroundZero AI is a complete AI system that continuously learns from your interactions, builds a knowledge graph, remembers conversations, and improves over time. It's built to be "your own" AI that you can train and customize.


✨ Features

🧠 Intelligent Reasoning

  • Chain-of-thought reasoning with visible thinking steps
  • Self-verification against knowledge graph and web
  • Confidence scoring for all responses

πŸ“š Knowledge Graph

  • Stores and connects concepts, facts, and relationships
  • Grows automatically as you interact
  • Verifies information from multiple sources
  • Semantic search and path finding

πŸ’Ύ Memory System

  • Conversation history - remembers all chats
  • User profiles - learns your name, preferences, behaviors
  • Long-term memory - stores facts and events
  • Working memory - context for current conversation

πŸ” Web Search & Verification

  • Multi-engine search (DuckDuckGo, Wikipedia, arXiv)
  • Source reliability scoring
  • Fact verification with evidence
  • Deep research mode for comprehensive learning

πŸ“ˆ Continuous Learning

  • Learns from your feedback (πŸ‘/πŸ‘Ž)
  • Learns from corrections ("no, that's wrong...")
  • Learns topics from the web
  • Background learning cycles

πŸ’» Code Execution (NEW!)

  • Run Python code with full output capture
  • Execute bash/shell commands
  • Install packages on the fly
  • Persistent execution environment

πŸ“„ Document Understanding (NEW!)

  • Read ANY file type (PDF, Excel, Word, CSV, images, etc.)
  • Extract tables, text, and structure
  • Ask questions about document content
  • Multi-document analysis for analytics

πŸ“ File Creation (NEW!)

  • Create Word documents (.docx)
  • Create PDF files
  • Create Excel spreadsheets (.xlsx)
  • Create PowerPoint presentations (.pptx)
  • Create CSV, Markdown, and more

🎨 Modern Dashboard (Claude-like)

  • Beautiful chat interface
  • Real-time reasoning display
  • Conversation history
  • Knowledge graph visualization
  • User settings

πŸš€ Quick Start

1. Install Dependencies

cd groundzero
pip install -r requirements.txt

2. Run Tests (Verify Everything Works)

python test.py

3. Start Interactive Chat

python run.py
# or
python run.py --chat

4. Start Web Dashboard

python run.py --dashboard

Then open http://localhost:8080


πŸ“¦ Project Structure

groundzero/
β”œβ”€β”€ config/
β”‚   └── config.yaml              # Main configuration
β”œβ”€β”€ data/                        # All data storage
β”‚   β”œβ”€β”€ knowledge/               # Knowledge graph
β”‚   β”œβ”€β”€ memory/                  # Long-term memory
β”‚   β”œβ”€β”€ models/                  # Downloaded models
β”‚   β”œβ”€β”€ training/                # Training data
β”‚   β”œβ”€β”€ conversations/           # Chat history
β”‚   └── users/                   # User profiles
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ core/                    # Model management
β”‚   β”œβ”€β”€ knowledge/               # Knowledge graph system
β”‚   β”œβ”€β”€ memory/                  # Memory system
β”‚   β”œβ”€β”€ search/                  # Web search & verification
β”‚   β”œβ”€β”€ reasoning/               # Chain-of-thought reasoning
β”‚   β”œβ”€β”€ continuous_learning/     # Learning from interactions
β”‚   β”œβ”€β”€ dashboard/               # Web interface
β”‚   β”‚   β”œβ”€β”€ templates/           # HTML
β”‚   β”‚   └── static/              # CSS & JS
β”‚   β”œβ”€β”€ utils/                   # Utilities
β”‚   └── groundzero.py            # Main AI class
β”œβ”€β”€ run.py                       # Entry point
β”œβ”€β”€ test.py                      # Test suite
└── requirements.txt

πŸ’» Usage Examples

Basic Chat

from src.groundzero import GroundZeroAI

ai = GroundZeroAI()

# Chat
response, reasoning = ai.chat("Hello! What can you do?", return_reasoning=True)
print(response)

# Show reasoning
if reasoning:
    print(f"Confidence: {reasoning.confidence:.0%}")
    for step in reasoning.steps:
        print(f"  {step.step_number}. {step.thought}")

Teaching Knowledge

# Teach directly
ai.teach("Python", "Python is a programming language created by Guido van Rossum")

# Have it learn from the web
ai.learn("machine learning transformers")

Feedback & Corrections

# Rate a response
ai.feedback("What is X?", "Response...", rating=5)  # 1-5

# Correct a mistake
ai.correct(
    prompt="What is the capital of Australia?",
    wrong_response="Sydney",
    correct_response="Canberra"
)

Query Knowledge

# Search knowledge
result = ai.ask_knowledge("machine learning")
print(result["results"])

# Verify a fact
verification = ai.verify_fact("The Earth orbits the Sun")
print(f"Verified: {verification['verified']}, Confidence: {verification['confidence']}")

βš™οΈ Configuration

Edit config/config.yaml:

model:
  name: "GroundZero-AI"
  version: "1.0.0"
  base_model: "deepseek-ai/DeepSeek-R1-Distill-Qwen-7B"
  quantization: "4bit"  # For GPU memory efficiency

knowledge:
  auto_verify: true
  min_confidence: 0.7

search:
  engines:
    - duckduckgo
    - wikipedia
    - arxiv
  verify_sources: true

continuous_learning:
  enabled: true
  auto_evolve_threshold: 100

dashboard:
  host: "0.0.0.0"
  port: 8080

πŸ–₯️ System Requirements

Demo Mode (No GPU)

  • Python 3.9+
  • 4GB RAM
  • Works on any CPU

Full Mode (With Training)

  • Python 3.9+
  • 16GB+ RAM
  • NVIDIA GPU with 8GB+ VRAM (RTX 3060+)
  • CUDA 11.8+

πŸ”„ How Learning Works

User Input β†’ Generate Response β†’ Observe Interaction
                                        ↓
                              [Learning Signal Queue]
                                        ↓
Feedback (πŸ‘/πŸ‘Ž) ─────────────────→ Process Signals
Corrections ──────────────────────→      ↓
Web Research ─────────────────────→ Training Data
                                        ↓
                              [Training Cycle]
                                        ↓
                              Improved Model
  1. Observe: Every interaction is recorded
  2. Feedback: Ratings create learning signals
  3. Corrections: Direct corrections are high-priority
  4. Research: Web learning adds knowledge
  5. Evolve: Training on accumulated signals

πŸ“Š Dashboard Features

Chat Interface

  • Clean, modern design
  • Typing indicators
  • Reasoning panel
  • Feedback buttons

History

  • Browse past conversations
  • Search chats

Knowledge

  • Visualize the knowledge graph
  • Search concepts

Stats

  • Model status
  • Knowledge count
  • Learning progress

πŸ›‘οΈ Privacy

  • All data stored locally in /data
  • No external transmission except explicit web searches
  • User profiles stay on your machine
  • You control what it learns

πŸ“ CLI Reference

# Interactive chat
python run.py --chat

# Web dashboard
python run.py --dashboard --port 8080

# Learn about a topic
python run.py --learn "quantum computing"

# Download model (requires GPU)
python run.py --download

πŸ”§ API Reference

GroundZeroAI

Method Description
chat(message) Chat and get response with optional reasoning
learn(topic) Research and learn from web
teach(subject, content) Directly add knowledge
feedback(prompt, response, rating) Rate a response (1-5)
correct(prompt, wrong, correct) Correct a mistake
ask_knowledge(query) Query knowledge graph
verify_fact(claim) Verify a fact
evolve() Run training on learning queue
get_stats() Get system statistics
save() Save all data

🀝 Contributing

Areas to help:

  • Better reasoning algorithms
  • More search engines
  • UI improvements
  • Test coverage
  • Documentation

πŸ“„ License

MIT License - Use freely!


πŸ™ Acknowledgments

  • Built on DeepSeek-R1-Distill
  • Inspired by Claude AI's interface
  • Uses QLoRA for efficient fine-tuning

Made with ❀️ for AI enthusiasts who want their own personal AI

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published