You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SmartRAG handles both document search and general conversation automatically:
407
+
382
408
```bash
383
-
# Ask questions about your documents
409
+
# Ask questions about your documents (RAG mode)
384
410
curl -X POST "http://localhost:5000/api/search/search" \
385
411
-H "Content-Type: application/json" \
386
412
-d '{
387
413
"query": "What are the main risks mentioned in the financial report?",
388
414
"maxResults": 5
389
415
}'
416
+
417
+
# General conversation (Direct AI chat mode)
418
+
curl -X POST "http://localhost:5000/api/search/search" \
419
+
-H "Content-Type: application/json" \
420
+
-d '{
421
+
"query": "How are you today?",
422
+
"maxResults": 1
423
+
}'
390
424
```
391
425
392
-
**Response Example:**
426
+
**Document Search Response Example:**
393
427
```json
394
428
{
395
429
"query": "What are the main risks mentioned in the financial report?",
@@ -402,18 +436,71 @@ curl -X POST "http://localhost:5000/api/search/search" \
402
436
"relevanceScore": 0.94
403
437
}
404
438
],
405
-
"processingTimeMs": 1180
439
+
"searchedAt": "2025-08-16T14:57:06.2312433Z",
440
+
"configuration": {
441
+
"aiProvider": "Anthropic",
442
+
"storageProvider": "Redis",
443
+
"model": "Claude + VoyageAI"
444
+
}
445
+
}
446
+
```
447
+
448
+
**General Chat Response Example:**
449
+
```json
450
+
{
451
+
"query": "How are you today?",
452
+
"answer": "I'm doing well, thank you for asking! I'm here to help you with any questions you might have about your documents or just general conversation. How can I assist you today?",
453
+
"sources": [],
454
+
"searchedAt": "2025-08-16T14:57:06.2312433Z",
455
+
"configuration": {
456
+
"aiProvider": "Anthropic",
457
+
"storageProvider": "Redis",
458
+
"model": "Claude + VoyageAI"
459
+
}
406
460
}
407
461
```
408
462
409
463
410
464
## ๐ Performance & Scaling
411
465
412
466
### **Benchmarks**
413
-
-**Document Upload**: ~500ms for 10MB PDF
414
-
-**Semantic Search**: ~200ms with 10K documents
415
-
-**AI Response**: ~2-5s depending on provider
416
-
-**Memory Usage**: ~50MB base + documents in memory
467
+
-**Document Upload**: ~500ms for 100KB file, ~1-2s for 1MB file
468
+
-**Semantic Search**: ~200ms for simple queries, ~500ms for complex queries
469
+
-**AI Response**: ~2-5s for 5 sources, ~3-8s for 10 sources
470
+
-**Memory Usage**: ~50MB base + documents, ~100MB with Redis cache
471
+
472
+
### **Performance Testing**
473
+
SmartRAG includes built-in benchmark tools to measure performance:
474
+
475
+
```bash
476
+
# Run comprehensive performance test
477
+
curl -X POST "http://localhost:5000/api/benchmark/performance-test" \
478
+
-H "Content-Type: application/json" \
479
+
-d '{
480
+
"testDocumentUpload": true,
481
+
"testSearch": true,
482
+
"testAIResponse": true,
483
+
"testEndToEnd": true,
484
+
"documentSizeKB": 100,
485
+
"searchQuery": "What are the main topics discussed?",
0 commit comments