Dhruv Pawar
commited on
Commit
Β·
e90676e
1
Parent(s):
a43361e
new README.md
Browse files
README.md
CHANGED
|
@@ -1,103 +1,192 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# π§ Advanced AI Reasoning System Pro
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
###
|
| 8 |
-
- **
|
| 9 |
-
- **
|
| 10 |
-
- **
|
| 11 |
-
- **
|
| 12 |
-
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
### β‘ Performance Features
|
| 16 |
-
- **
|
| 17 |
-
- **Rate Limiting
|
| 18 |
-
- **Streaming
|
| 19 |
-
- **Multi-threading
|
| 20 |
|
| 21 |
### π Analytics & Monitoring
|
| 22 |
-
- **
|
| 23 |
-
- **Conversation Analytics
|
| 24 |
-
- **Cache Statistics
|
| 25 |
-
- **Session Tracking
|
| 26 |
|
| 27 |
### π€ Export Capabilities
|
| 28 |
-
- **
|
| 29 |
-
- **Metadata
|
| 30 |
-
- **
|
| 31 |
-
- **Search
|
| 32 |
|
| 33 |
-
|
| 34 |
-
- **Collapsible Sidebar** - Clean, distraction-free workspace
|
| 35 |
-
- **Multiple Tabs** - Reasoning, Export, Analytics, Settings
|
| 36 |
-
- **Live Metrics Display** - Real-time performance indicators
|
| 37 |
-
- **Responsive Design** - Mobile-friendly interface
|
| 38 |
|
| 39 |
## π Quick Start
|
| 40 |
|
| 41 |
### Prerequisites
|
| 42 |
-
- Python 3.9
|
| 43 |
-
- Groq API Key ([Get one here](https://console.groq.com))
|
| 44 |
|
| 45 |
### Installation
|
| 46 |
|
| 47 |
-
|
| 48 |
-
1.
|
| 49 |
git clone <repository-url>
|
| 50 |
cd reasoning-system-pro
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
2. **Create virtual environment**
|
| 55 |
python -m venv venv
|
| 56 |
-
source venv/bin/activate
|
| 57 |
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
3. **Install dependencies**
|
| 61 |
pip install -r requirements.txt
|
| 62 |
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
4. **Configure environment**
|
| 66 |
cp .env.example .env
|
|
|
|
| 67 |
|
| 68 |
-
|
| 69 |
-
text
|
| 70 |
-
|
| 71 |
-
5. **Run the application**
|
| 72 |
python main.py
|
| 73 |
|
| 74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
|
| 76 |
-
|
| 77 |
-
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
-
|
| 80 |
|
| 81 |
## π Project Structure
|
| 82 |
|
|
|
|
| 83 |
reasoning-system-pro/
|
| 84 |
βββ src/
|
| 85 |
-
β
|
| 86 |
-
β
|
| 87 |
-
β
|
| 88 |
-
β
|
| 89 |
-
β
|
| 90 |
-
β
|
| 91 |
-
β
|
| 92 |
-
βββ tests/
|
| 93 |
-
βββ exports/
|
| 94 |
-
βββ backups/
|
| 95 |
-
βββ logs/
|
| 96 |
-
βββ main.py
|
| 97 |
-
βββ requirements.txt
|
| 98 |
-
βββ .env
|
| 99 |
-
|
| 100 |
-
text
|
| 101 |
|
| 102 |
## π§ Configuration
|
| 103 |
|
|
@@ -105,18 +194,18 @@ text
|
|
| 105 |
|
| 106 |
Key configuration options in `.env`:
|
| 107 |
|
| 108 |
-
|
|
|
|
| 109 |
GROQ_API_KEY=your_key_here
|
| 110 |
|
| 111 |
-
Performance
|
| 112 |
CACHE_SIZE=100
|
| 113 |
RATE_LIMIT_REQUESTS=50
|
| 114 |
|
| 115 |
-
Features
|
| 116 |
ENABLE_PDF_EXPORT=true
|
| 117 |
ENABLE_CACHE=true
|
| 118 |
-
|
| 119 |
-
text
|
| 120 |
|
| 121 |
### Advanced Configuration
|
| 122 |
|
|
@@ -130,10 +219,10 @@ Edit `src/config/settings.py` for fine-tuned control over:
|
|
| 130 |
## π Usage Examples
|
| 131 |
|
| 132 |
### Basic Query
|
|
|
|
| 133 |
Simply type your question in the chat interface
|
| 134 |
"Explain quantum entanglement using the Tree of Thoughts method"
|
| 135 |
-
|
| 136 |
-
text
|
| 137 |
|
| 138 |
### With Self-Critique
|
| 139 |
Enable "Self-Critique" checkbox for automatic validation and refinement.
|
|
@@ -149,16 +238,16 @@ Select from pre-built templates:
|
|
| 149 |
|
| 150 |
## π§ͺ Testing
|
| 151 |
|
| 152 |
-
|
|
|
|
| 153 |
pytest
|
| 154 |
|
| 155 |
-
With coverage
|
| 156 |
pytest --cov=src --cov-report=html
|
| 157 |
|
| 158 |
-
Specific test file
|
| 159 |
pytest tests/test_reasoner.py
|
| 160 |
-
|
| 161 |
-
text
|
| 162 |
|
| 163 |
## π Available Models
|
| 164 |
|
|
@@ -178,31 +267,31 @@ And many more! See `src/config/constants.py` for the full list.
|
|
| 178 |
## π οΈ Development
|
| 179 |
|
| 180 |
### Code Style
|
| 181 |
-
|
|
|
|
| 182 |
black src/
|
| 183 |
|
| 184 |
-
Check linting
|
| 185 |
flake8 src/
|
| 186 |
|
| 187 |
-
Type checking
|
| 188 |
mypy src/
|
| 189 |
-
|
| 190 |
-
text
|
| 191 |
|
| 192 |
### Adding New Reasoning Modes
|
| 193 |
|
| 194 |
1. Add to `src/config/constants.py`:
|
|
|
|
| 195 |
class ReasoningMode(Enum):
|
| 196 |
-
YOUR_MODE = "Your Mode Name"
|
| 197 |
-
|
| 198 |
-
text
|
| 199 |
|
| 200 |
2. Add system prompt in `src/core/prompt_engine.py`:
|
|
|
|
| 201 |
SYSTEM_PROMPTS = {
|
| 202 |
-
ReasoningMode.YOUR_MODE: "Your prompt here..."
|
| 203 |
}
|
| 204 |
-
|
| 205 |
-
text
|
| 206 |
|
| 207 |
## π API Documentation
|
| 208 |
|
|
@@ -211,20 +300,20 @@ text
|
|
| 211 |
#### AdvancedReasoner
|
| 212 |
Main reasoning engine with streaming support.
|
| 213 |
|
|
|
|
| 214 |
reasoner = AdvancedReasoner()
|
| 215 |
for response in reasoner.generate_response(query, ...):
|
| 216 |
-
print(response)
|
| 217 |
-
|
| 218 |
-
text
|
| 219 |
|
| 220 |
#### ResponseCache
|
| 221 |
Thread-safe LRU cache with TTL.
|
| 222 |
|
|
|
|
| 223 |
cache = ResponseCache(maxsize=100, ttl=3600)
|
| 224 |
cache.set(key, value)
|
| 225 |
result = cache.get(key)
|
| 226 |
-
|
| 227 |
-
text
|
| 228 |
|
| 229 |
## π Troubleshooting
|
| 230 |
|
|
@@ -267,4 +356,4 @@ For issues and questions:
|
|
| 267 |
|
| 268 |
---
|
| 269 |
|
| 270 |
-
**Built with β€οΈ using Gradio and Groq**
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Advanced AI Reasoning System Pro
|
| 3 |
+
emoji: π§
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: blue
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: "5.0.0"
|
| 8 |
+
app_file: main.py
|
| 9 |
+
pinned: false
|
| 10 |
+
license: mit
|
| 11 |
+
short_description: Next-gen AI reasoning platform with multiple research methodologies
|
| 12 |
+
tags:
|
| 13 |
+
- llm
|
| 14 |
+
- reasoning
|
| 15 |
+
- groq
|
| 16 |
+
- ai
|
| 17 |
+
- research
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
# π§ Advanced AI Reasoning System Pro
|
| 21 |
|
| 22 |
+
<div align="center">
|
| 23 |
+
|
| 24 |
+

|
| 25 |
+

|
| 26 |
+

|
| 27 |
+

|
| 28 |
+
|
| 29 |
+
**Next-Generation AI Research Platform with Stunning Dark Theme UI**
|
| 30 |
+
|
| 31 |
+
*Production-ready AI reasoning application featuring multiple research-backed methodologies, beautiful dark theme interface, advanced caching, real-time analytics, and comprehensive export capabilities.*
|
| 32 |
+
|
| 33 |
+
[π Live Demo](#quick-start) β’ [π Documentation](#documentation) β’ [π¨ UI Features](#ui-features) β’ [π§ Installation](#installation)
|
| 34 |
+
|
| 35 |
+
</div>
|
| 36 |
+
|
| 37 |
+
---
|
| 38 |
+
|
| 39 |
+
## β¨ Screenshots
|
| 40 |
+
|
| 41 |
+
<div align="center">
|
| 42 |
+
|
| 43 |
+
### π Modern Dark Theme Interface
|
| 44 |
+

|
| 45 |
+
|
| 46 |
+
*Professional branding with animated logo, clear typography, and interactive feature badges*
|
| 47 |
+
|
| 48 |
+
### π― Reasoning Workspace
|
| 49 |
+

|
| 50 |
+
|
| 51 |
+
*Clean, distraction-free workspace with collapsible sidebar and live metrics*
|
| 52 |
+
|
| 53 |
+
### π Analytics Dashboard
|
| 54 |
+

|
| 55 |
+
|
| 56 |
+
*Real-time performance insights with beautiful visual indicators*
|
| 57 |
+
|
| 58 |
+
</div>
|
| 59 |
+
|
| 60 |
+
## π¨ Modern Dark Theme UI
|
| 61 |
+
|
| 62 |
+
Dive into a **stunning, professionally designed interface** that sets new standards for AI applications.
|
| 63 |
+
|
| 64 |
+
### **π Visual Excellence**
|
| 65 |
+
- **Perfect Typography**: Space Grotesk for headlines, Inter for body text, JetBrains Mono for code
|
| 66 |
+
- **High-Contrast Dark Theme**: Crisp white text on carefully selected dark backgrounds for optimal readability
|
| 67 |
+
- **Font Smoothing**: Anti-aliased fonts with optimized rendering for crystal-clear text display
|
| 68 |
+
- **Professional Branding**: Animated logo, gradient accents, and polished visual elements
|
| 69 |
+
|
| 70 |
+
### **β‘ Interactive Animations**
|
| 71 |
+
- **Smooth Transitions**: Cubic-bezier transitions for all interactive elements
|
| 72 |
+
- **Status Indicators**: Pulsing animations for live system status
|
| 73 |
+
- **Hover Effects**: Elegant lift and glow effects on buttons and cards
|
| 74 |
+
- **Loading States**: Beautiful spinners and progress indicators
|
| 75 |
|
| 76 |
+
### **π± Responsive Design**
|
| 77 |
+
- **Mobile-Optimized**: Centered layouts and touch-friendly interactions
|
| 78 |
+
- **Breakpoint-Specific**: Tailored designs for tablets, phones, and desktops
|
| 79 |
+
- **Flexible Components**: Adaptive feature badges and navigation elements
|
| 80 |
|
| 81 |
+
### **π― User Experience Enhancements**
|
| 82 |
+
- **Clear Visual Hierarchy**: Intuitively organized information with proper spacing
|
| 83 |
+
- **Interactive Badges**: Hover effects on feature tags with smooth animations
|
| 84 |
+
- **Modern Card Designs**: Black cards with subtle borders and soft shadows
|
| 85 |
+
- **Accessibility First**: Focus indicators, high contrast ratios, reduced motion support
|
| 86 |
+
|
| 87 |
+
---
|
| 88 |
+
|
| 89 |
+
## β¨ Research Features
|
| 90 |
+
|
| 91 |
+
### π¬ Advanced Reasoning Modes
|
| 92 |
+
- **π³ Tree of Thoughts (ToT)** - Systematic exploration of multiple reasoning paths (*Yao et al., 2023*)
|
| 93 |
+
- **π Chain of Thought (CoT)** - Step-by-step logical reasoning (*Wei et al., 2022*)
|
| 94 |
+
- **π Self-Consistency** - Multiple solution paths with consensus validation
|
| 95 |
+
- **πͺ Reflexion** - Self-critique and iterative improvement cycles
|
| 96 |
+
- **π₯ Multi-Agent Debate** - Multiple AI perspectives with synthesis
|
| 97 |
+
- **π Analogical Reasoning** - Problem-solving through structured analogies
|
| 98 |
|
| 99 |
### β‘ Performance Features
|
| 100 |
+
- **Smart Caching**: LRU cache with TTL for accelerated responses
|
| 101 |
+
- **Rate Limiting**: Token bucket algorithm preventing API overload
|
| 102 |
+
- **Streaming**: Real-time response generation
|
| 103 |
+
- **Multi-threading**: Concurrent request processing
|
| 104 |
|
| 105 |
### π Analytics & Monitoring
|
| 106 |
+
- **Live Metrics**: Real-time performance visualization
|
| 107 |
+
- **Conversation Analytics**: Usage patterns and insights
|
| 108 |
+
- **Cache Statistics**: Hit/miss ratios and efficiency
|
| 109 |
+
- **Session Tracking**: Individual session identification
|
| 110 |
|
| 111 |
### π€ Export Capabilities
|
| 112 |
+
- **Multi-Format**: JSON, Markdown, Plain Text, PDF
|
| 113 |
+
- **Rich Metadata**: Timestamps, models, and performance metrics
|
| 114 |
+
- **Auto Backups**: Scheduled conversation preservation
|
| 115 |
+
- **Smart Search**: Keyword-based historical retrieval
|
| 116 |
|
| 117 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
|
| 119 |
## π Quick Start
|
| 120 |
|
| 121 |
### Prerequisites
|
| 122 |
+
- **Python 3.9+**
|
| 123 |
+
- **Groq API Key** ([Get one here](https://console.groq.com))
|
| 124 |
|
| 125 |
### Installation
|
| 126 |
|
| 127 |
+
```bash
|
| 128 |
+
# 1. Clone the repository
|
| 129 |
git clone <repository-url>
|
| 130 |
cd reasoning-system-pro
|
| 131 |
|
| 132 |
+
# 2. Create virtual environment
|
|
|
|
|
|
|
| 133 |
python -m venv venv
|
| 134 |
+
source venv/bin/activate # Windows: venv\Scripts\activate
|
| 135 |
|
| 136 |
+
# 3. Install dependencies
|
|
|
|
|
|
|
| 137 |
pip install -r requirements.txt
|
| 138 |
|
| 139 |
+
# 4. Configure environment
|
|
|
|
|
|
|
| 140 |
cp .env.example .env
|
| 141 |
+
# Edit .env and add your GROQ_API_KEY
|
| 142 |
|
| 143 |
+
# 5. Run the application
|
|
|
|
|
|
|
|
|
|
| 144 |
python main.py
|
| 145 |
|
| 146 |
+
# 6. Open in browser
|
| 147 |
+
# http://localhost:7860
|
| 148 |
+
```
|
| 149 |
+
|
| 150 |
+
---
|
| 151 |
+
|
| 152 |
+
## π Latest Updates
|
| 153 |
+
|
| 154 |
+
### **v1.0.0 - Complete UI Redesign**
|
| 155 |
+
- β¨ **Stunning Dark Theme**: Professional dark interface with optimal contrast
|
| 156 |
+
- π¨ **Enhanced Typography**: Space Grotesk + Inter fonts for modern aesthetics
|
| 157 |
+
- β‘ **Smooth Animations**: Subtle transitions and interactive elements
|
| 158 |
+
- π― **Improved UX**: Better visual hierarchy and navigation
|
| 159 |
+
- π± **Responsive Design**: Optimized for all device sizes
|
| 160 |
+
- πͺ **Interactive Features**: Hover effects, animations, and feedback
|
| 161 |
|
| 162 |
+
### Key Improvements:
|
| 163 |
+
- **Visual Clarity**: Crystal-clear text rendering with anti-aliasing
|
| 164 |
+
- **Brand Enhancement**: Animated logo and refined branding elements
|
| 165 |
+
- **Performance**: Optimized CSS and smooth interactions
|
| 166 |
+
- **Accessibility**: High contrast ratios and focus indicators
|
| 167 |
|
| 168 |
+
---
|
| 169 |
|
| 170 |
## π Project Structure
|
| 171 |
|
| 172 |
+
```
|
| 173 |
reasoning-system-pro/
|
| 174 |
βββ src/
|
| 175 |
+
β βββ api/ # API client management
|
| 176 |
+
β βββ core/ # Core business logic
|
| 177 |
+
β βββ models/ # Data models
|
| 178 |
+
β βββ services/ # Business services
|
| 179 |
+
β βββ ui/ # Gradio interface
|
| 180 |
+
β βββ utils/ # Utilities
|
| 181 |
+
β βββ config/ # Configuration
|
| 182 |
+
βββ tests/ # Test suite
|
| 183 |
+
βββ exports/ # Generated exports
|
| 184 |
+
βββ backups/ # Conversation backups
|
| 185 |
+
βββ logs/ # Application logs
|
| 186 |
+
βββ main.py # Entry point
|
| 187 |
+
βββ requirements.txt # Dependencies
|
| 188 |
+
βββ .env # Environment config
|
| 189 |
+
```
|
|
|
|
| 190 |
|
| 191 |
## π§ Configuration
|
| 192 |
|
|
|
|
| 194 |
|
| 195 |
Key configuration options in `.env`:
|
| 196 |
|
| 197 |
+
```env
|
| 198 |
+
# API
|
| 199 |
GROQ_API_KEY=your_key_here
|
| 200 |
|
| 201 |
+
# Performance
|
| 202 |
CACHE_SIZE=100
|
| 203 |
RATE_LIMIT_REQUESTS=50
|
| 204 |
|
| 205 |
+
# Features
|
| 206 |
ENABLE_PDF_EXPORT=true
|
| 207 |
ENABLE_CACHE=true
|
| 208 |
+
```
|
|
|
|
| 209 |
|
| 210 |
### Advanced Configuration
|
| 211 |
|
|
|
|
| 219 |
## π Usage Examples
|
| 220 |
|
| 221 |
### Basic Query
|
| 222 |
+
```
|
| 223 |
Simply type your question in the chat interface
|
| 224 |
"Explain quantum entanglement using the Tree of Thoughts method"
|
| 225 |
+
```
|
|
|
|
| 226 |
|
| 227 |
### With Self-Critique
|
| 228 |
Enable "Self-Critique" checkbox for automatic validation and refinement.
|
|
|
|
| 238 |
|
| 239 |
## π§ͺ Testing
|
| 240 |
|
| 241 |
+
```bash
|
| 242 |
+
# Run all tests
|
| 243 |
pytest
|
| 244 |
|
| 245 |
+
# With coverage
|
| 246 |
pytest --cov=src --cov-report=html
|
| 247 |
|
| 248 |
+
# Specific test file
|
| 249 |
pytest tests/test_reasoner.py
|
| 250 |
+
```
|
|
|
|
| 251 |
|
| 252 |
## π Available Models
|
| 253 |
|
|
|
|
| 267 |
## π οΈ Development
|
| 268 |
|
| 269 |
### Code Style
|
| 270 |
+
```bash
|
| 271 |
+
# Format code
|
| 272 |
black src/
|
| 273 |
|
| 274 |
+
# Check linting
|
| 275 |
flake8 src/
|
| 276 |
|
| 277 |
+
# Type checking
|
| 278 |
mypy src/
|
| 279 |
+
```
|
|
|
|
| 280 |
|
| 281 |
### Adding New Reasoning Modes
|
| 282 |
|
| 283 |
1. Add to `src/config/constants.py`:
|
| 284 |
+
```python
|
| 285 |
class ReasoningMode(Enum):
|
| 286 |
+
YOUR_MODE = "Your Mode Name"
|
| 287 |
+
```
|
|
|
|
| 288 |
|
| 289 |
2. Add system prompt in `src/core/prompt_engine.py`:
|
| 290 |
+
```python
|
| 291 |
SYSTEM_PROMPTS = {
|
| 292 |
+
ReasoningMode.YOUR_MODE: "Your prompt here..."
|
| 293 |
}
|
| 294 |
+
```
|
|
|
|
| 295 |
|
| 296 |
## π API Documentation
|
| 297 |
|
|
|
|
| 300 |
#### AdvancedReasoner
|
| 301 |
Main reasoning engine with streaming support.
|
| 302 |
|
| 303 |
+
```python
|
| 304 |
reasoner = AdvancedReasoner()
|
| 305 |
for response in reasoner.generate_response(query, ...):
|
| 306 |
+
print(response)
|
| 307 |
+
```
|
|
|
|
| 308 |
|
| 309 |
#### ResponseCache
|
| 310 |
Thread-safe LRU cache with TTL.
|
| 311 |
|
| 312 |
+
```python
|
| 313 |
cache = ResponseCache(maxsize=100, ttl=3600)
|
| 314 |
cache.set(key, value)
|
| 315 |
result = cache.get(key)
|
| 316 |
+
```
|
|
|
|
| 317 |
|
| 318 |
## π Troubleshooting
|
| 319 |
|
|
|
|
| 356 |
|
| 357 |
---
|
| 358 |
|
| 359 |
+
**Built with β€οΈ using Gradio and Groq**
|