Universal Neural AI Assistant
A hobby project exploring intelligent AI model routing and RAG-based query classification.
UNAI started as a side project driven by curiosity: what if you could automatically choose the right AI model for each question? Instead of manually switching between ChatGPT, DeepSeek, or Gemini, what if the system just knew which one to use?
This project explores that idea. It's a modular chat system that unifies multiple AI models into a single interface, using similarity search and context analysis to route queries to the most appropriate model.
The result is a learning experiment that combines RAG concepts, vector databases, and multi-model orchestration into one practical application.
The idea is straightforward: what if an AI assistant could know which model to use for each task? A system that combines the reasoning power of DeepSeek, the versatility of GPT, and the capabilities of Gemini into one unified experience.
This project is an exploration of that concept. Instead of manually switching between AI services, users interact with an intelligent router that attempts to automatically select the right tool for the job.
The goal: learn how RAG and vector similarity can improve model selection, and build something useful in the process.
- React with TypeScript and JavaScript
- Next.js for server-side rendering and routing
- Tailwind CSS for modern, responsive styling
- Supabase as vector database and backend
- Similarity search for intelligent query routing
- Real-time synchronization for live updates
- OpenAI GPT for general-purpose conversation and reasoning
- DeepSeek with transparent thinking mode for complex problem-solving
- Google Gemini for multimodal capabilities
| Feature | Description |
|---|---|
| Multi-Model Integration | Seamlessly connects GPT, DeepSeek, and Gemini in one interface |
| Automatic Model Selection | Analyzes queries and routes to the optimal model |
| Manual Override | Gives users control to select specific models when needed |
| Vector Search | Uses similarity search for context-aware routing |
- Chat History Management - Never lose a conversation
- Folder Organization - Structure your chats logically
- Template System - Create and reuse common prompts
- Markdown Rendering - Beautiful, formatted responses
- DeepSeek Thinking Mode - See the reasoning process in real-time
- Persistent Storage - All conversations saved to Supabase
- Custom Folders - Organize chats your way
- Reusable Templates - Speed up common workflows
- Cloud Sync - Access your data from anywhere
UNAI/
├── app/ # Next.js app router pages
├── components/ # React components and UI elements
├── lib/ # Core logic and utilities
│ ├── models/ # AI model integrations (GPT, DeepSeek, Gemini)
│ ├── router.js # Intelligent routing logic
│ └── supabase.js # Database configuration
├── supabase_vector_data_for_exp/ # Vector database import data
│ └── documents_rows.csv # Embeddings for similarity matching
├── public/ # Static assets
└── styles/ # Global styles and theme
Hobby Project - Active Experimentation
This is a personal side project, built out of curiosity about AI model routing and RAG systems. The core functionality is complete and working.
What works now:
- All three AI models integrated and functional
- Automatic model selection using similarity search
- Manual model override when needed
- Context tracking with usage visibility
- Chat interface with history and organization
- Template system
- Supabase integration for persistence
What's being explored:
- Optimizing similarity search and matching algorithms
- Improving routing accuracy for edge cases
- Fine-tuning the balance between different models
- Performance improvements
Build a functional AI assistant that explores these ideas:
Intelligence - The auto-chooser works. Now the question is: how much better can similarity matching get?
Simplicity - How simple can the interface be while still offering useful functionality?
Control - What's the right balance between automation and manual selection?
Learning - Use this as a playground to understand multi-model orchestration, vector databases, and intelligent routing optimization
Usefulness - Make something that's actually helpful, even as a learning project
- Node.js 18+ installed
- Supabase account and project
- API keys for OpenAI, DeepSeek, and Gemini
# Clone the repository
git clone https://github.com/YOUR_USERNAME/UNAI.git
cd UNAI
# Install dependencies
npm install1. Set up Supabase
You'll need your own Supabase project for the vector database:
- Create a new project at Supabase
- Import the vector data from
supabase_vector_data_for_exp/documents_rows.csvinto your Supabase database - This CSV contains the embeddings used for similarity matching and model selection
2. Configure Environment Variables
Create a .env.local file in the project root:
# Supabase Configuration (use YOUR project credentials)
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
# AI Model API Keys
OPENAI_API_KEY=your_openai_api_key
DEEPSEEK_API_KEY=your_deepseek_api_key
GEMINI_API_KEY=your_gemini_api_keynpm run devOpen http://localhost:3000 in your browser.
npm run build
npm startUNAI is optimized for deployment on Vercel, the platform built for Next.js applications.
- Push your code to GitHub
- Import the repository in Vercel
- Add environment variables in Vercel dashboard
- Deploy
Every push to your main branch will automatically deploy updates.
Contributions are welcome. Whether it's bug fixes, feature additions, or documentation improvements, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
Built with modern tools and powered by cutting-edge AI models:
- Next.js - The React framework for production
- Supabase - Open source Firebase alternative
- OpenAI - GPT models
- DeepSeek - Advanced reasoning AI
- Google Gemini - Multimodal AI
UNAI - One interface. Multiple minds. Optimal answers.