Files
anything-llm-rag/README.md
salvacybersec 98ed69653d Update all docs: 29 personas, 88 paths, 39K files, --reassign mode
Sync README, skill, memory, and Obsidian note with current state:
- 29 persona workspaces across 5 clusters
- 88 mapped paths covering 39,754 files (67 GB)
- New --reassign --reset mode for fast vector recovery
- Expanded skip_extensions list
- Gitea repo reference added

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 00:19:27 +03:00

112 lines
3.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# AnythingLLM × Persona RAG Integration
29 persona workspace'i olan, 39,754 dosyalık (67 GB) kitap kütüphanesinden beslenen RAG sistemi. 88 mapped path, 0 unmapped içerik klasörü. Diskte duplicate yok — aynı klasör birden fazla persona'ya atanabiliyor, her workspace kendi vektör embedding'ini tutar.
## Mimari
- **AnythingLLM Desktop** — `http://localhost:3001`
- **LLM:** Ollama local (qwen3:14b)
- **Embedding:** Google Gemini (gemini-embedding-001)
- **Vector DB:** LanceDB
- **OCR:** ocrmypdf (tur+eng)
- **Kitap Kaynağı:** `/mnt/storage/Common/Books/` (39,754 dosya, 67 GB)
## Personalar (5 Cluster)
| Cluster | Personalar |
|---------|-----------|
| Intel | Frodo, Echo, Ghost, Oracle, Wraith, Scribe, Polyglot |
| Cyber | Neo, Bastion, Sentinel, Specter, Phantom, Cipher, Vortex |
| Military | Marshal, Centurion, Corsair, Warden, Medic |
| Humanities | Chronos, Tribune, Arbiter, Ledger, Sage, Herald, Scholar, Gambit |
| Engineering | Forge, Architect |
## Kullanım
### Durum Kontrolü
```bash
python3 setup.py --status
```
### Workspace Oluştur / Güncelle
```bash
python3 setup.py --create-workspaces
python3 setup.py --create-workspaces --persona frodo
```
### Tam Pipeline (upload + OCR + embed)
```bash
python3 setup.py --upload-documents --resume
python3 setup.py --upload-documents --cluster cyber --resume
python3 setup.py --upload-documents --persona neo --priority 1 --resume
python3 setup.py --upload-documents --dry-run
```
### Re-assign (vektör recovery — tarama/upload yapmadan)
Dokümanlar zaten upload edilmiş ama vektörler silinmişse veya workspace atamaları bozulmuşsa:
```bash
# Önizleme
python3 setup.py --reassign --reset --dry-run
# Tüm workspace'leri sıfırla + yeniden embed et
python3 setup.py --reassign --reset
# Sadece tek persona veya cluster
python3 setup.py --reassign --reset --persona frodo
python3 setup.py --reassign --reset --cluster intel
# Sıfırlamadan sadece eksik atamaları tamamla
python3 setup.py --reassign
```
| Flag | Açıklama |
|------|----------|
| `--reassign` | Disk taraması ve upload yapmadan, `upload_progress.json`'daki mevcut dosyaları workspace'lere embed eder |
| `--reset` | `--reassign` ile birlikte kullanılır. Önce `workspace_docs` kaydını sıfırlar, sonra tümünü yeniden atar |
## Pipeline
```
Phase A: Text dosyaları upload
Phase B: Scanned PDF'leri OCR (ocrmypdf)
Phase C: OCR'lı dosyaları upload
Final: Workspace'lere assign/embed
```
`--reassign` modu sadece "Final" adımını çalıştırır — diğer fazları atlar.
## Recovery
### Vektör DB Silinirse
```bash
python3 setup.py --reassign --reset
```
### Tek Persona Vektörü Bozulursa
```bash
python3 setup.py --reassign --reset --persona frodo
```
### Tam Sıfırlama (her şey baştan)
```bash
rm upload_progress.json
python3 setup.py --all
```
## Dosyalar
| Dosya | Açıklama |
|-------|----------|
| `setup.py` | Ana entegrasyon scripti (upload, OCR, workspace assignment, reassign) |
| `config.yaml` | Persona-klasör eşlemeleri, API config, batch ayarları |
| `upload_progress.json` | Upload/atama state tracker (gitignore'd, makineye özel) |
| `ocr_output/` | OCR çıktıları (gitignore'd, büyük dosyalar) |