fazeel007 commited on
Commit
484ea5f
Β·
1 Parent(s): c96d7dc

Add comprehensive service breakdown: Nebius AI vs Modal.com usage

Browse files

βœ… Clear Service Division:
- Nebius AI: 'The Brain' - Language intelligence, AI reasoning, content analysis
- Modal.com: 'The Engine' - Heavy computation, OCR, vector operations, batch processing

βœ… Specific Use Cases:
- Document analysis, query enhancement, research synthesis β†’ Nebius AI
- OCR processing, FAISS indexing, distributed computing β†’ Modal.com

βœ… Integration Workflows:
- Step-by-step document processing pipeline showing which service handles each step
- Search workflow demonstrating coordinated service usage

βœ… Feature Comparison Table:
- Clear checkmarks showing exactly which service handles which operations
- Notes on overlapping areas (embeddings: real-time vs batch)

βœ… Specific API Endpoints:
- Listed exact endpoints that use each service
- Removed confusion about service responsibilities

This section provides crystal clear understanding of why both services are needed
and how they complement each other in the architecture.

Files changed (1) hide show
  1. README.md +73 -12
README.md CHANGED
@@ -343,18 +343,79 @@ npm run build
343
  - High-performance semantic similarity search
344
  - Persistent storage across sessions
345
 
346
- ### **Service Integration**
347
-
348
- #### **Nebius AI** - Language Intelligence
349
- - **Purpose**: Advanced language understanding and content analysis
350
- - **Models**: DeepSeek-R1-0528 (chat), BAAI/bge-en-icl (embeddings)
351
- - **Functions**: Query enhancement, document analysis, research synthesis
352
-
353
- #### **Modal.com** - Heavy Computation
354
- - **Purpose**: Distributed processing for computationally intensive tasks
355
- - **Workloads**: OCR processing, FAISS indexing, batch document processing
356
- - **Resources**: Auto-scaling compute with persistent storage
357
- - **Live Deployment**: [Modal App](https://fazeelusmani18--knowledgebridge-main-fastapi-app.modal.run)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
358
 
359
  ### **Intelligent Fallbacks**
360
  - **Modal Unavailable**: Local processing for text files, basic search
 
343
  - High-performance semantic similarity search
344
  - Persistent storage across sessions
345
 
346
+ ### **Service Integration & Division of Responsibilities**
347
+
348
+ ## **🧠 Nebius AI: Language Intelligence & AI Reasoning**
349
+
350
+ ### **Used For:**
351
+ - **πŸ“ Document Analysis**: Classification, summarization, key points extraction, quality scoring
352
+ - **πŸ” Search Intelligence**: Query enhancement, intent understanding, relevance scoring
353
+ - **πŸ’­ AI Reasoning**: Research synthesis, explanations, conversational responses
354
+ - **🎯 Embeddings**: Real-time text-to-vector conversion using BAAI/bge-en-icl model
355
+ - **πŸ“Š Content Understanding**: All language comprehension and semantic analysis
356
+
357
+ ### **Specific Endpoints:**
358
+ - `/api/analyze-document` - Document analysis with DeepSeek-R1 model
359
+ - `/api/enhance-query` - AI-powered query improvement
360
+ - `/api/embeddings` - Generate vector embeddings
361
+ - `/api/research-synthesis` - Combine insights from multiple sources
362
+ - `/api/ai-search` - Enhanced semantic search
363
+
364
+ ---
365
+
366
+ ## **⚑ Modal.com: Heavy Computation & Distributed Processing**
367
+
368
+ ### **Used For:**
369
+ - **πŸ“„ OCR Processing**: PDF and image text extraction using Tesseract
370
+ - **πŸ”§ Vector Operations**: FAISS index building and high-performance search
371
+ - **πŸ“¦ Batch Processing**: Concurrent processing of large document collections
372
+ - **πŸ’Ύ Infrastructure**: Serverless scaling, persistent storage, distributed compute
373
+ - **πŸš€ Heavy Workloads**: All computationally intensive operations
374
+
375
+ ### **Specific Endpoints:**
376
+ - `/api/documents/process/:id` - OCR text extraction via Modal
377
+ - `/api/documents/index/build` - FAISS vector index creation
378
+ - `/api/documents/search/vector` - High-performance vector search
379
+ - `/api/documents/process/batch` - Distributed batch processing
380
+
381
+ ### **Live Deployment**: [Modal App](https://fazeelusmani18--knowledgebridge-main-fastapi-app.modal.run)
382
+
383
+ ---
384
+
385
+ ## **πŸ”„ How They Work Together**
386
+
387
+ ### **Document Processing Pipeline:**
388
+ 1. **Upload** β†’ Local file storage
389
+ 2. **OCR** β†’ **Modal** extracts text from PDFs/images
390
+ 3. **Analysis** β†’ **Nebius** analyzes content and generates embeddings
391
+ 4. **Indexing** β†’ **Modal** builds FAISS vector index
392
+ 5. **Search** β†’ **Modal** performs vector search, **Nebius** scores relevance
393
+
394
+ ### **Search Workflow:**
395
+ 1. **Query Enhancement** β†’ **Nebius** improves user queries
396
+ 2. **Vector Search** β†’ **Modal** finds similar documents
397
+ 3. **Traditional Search** β†’ Local database + external APIs
398
+ 4. **Ranking** β†’ **Nebius** scores and ranks combined results
399
+ 5. **Synthesis** β†’ **Nebius** generates insights
400
+
401
+ ---
402
+
403
+ ## **πŸ“Š Clear Division:**
404
+
405
+ | Feature | Nebius AI | Modal.com |
406
+ |---------|-----------|-----------|
407
+ | **OCR Processing** | ❌ | βœ… |
408
+ | **Document Analysis** | βœ… | ❌ |
409
+ | **Vector Search** | ❌ | βœ… |
410
+ | **Query Enhancement** | βœ… | ❌ |
411
+ | **Batch Processing** | ❌ | βœ… |
412
+ | **Embeddings** | βœ… | βœ…* |
413
+ | **Research Synthesis** | βœ… | ❌ |
414
+
415
+ *Modal only for batch embeddings, Nebius for real-time
416
+
417
+ **Nebius = "The Brain"** (AI intelligence)
418
+ **Modal = "The Engine"** (computational power)
419
 
420
  ### **Intelligent Fallbacks**
421
  - **Modal Unavailable**: Local processing for text files, basic search