RAG — Dokumenty (baza wiedzy)
Przycisk Documents otwiera zarządzanie bazą wiedzy RAG. Dostępne są dwie odrębne funkcje — często mylone ze sobą:
| Funkcja | Przycisk | Trwałość |
|---|---|---|
| Biblioteka RAG (baza wiedzy) | 📚 Documents | Trwała — per repozytorium EA |
| Załącznik do wiadomości | 📎 Attach | Jednorazowy — znika po wysłaniu |
Obsługiwane formaty
Word (.docx), PDF, Excel (.xlsx), TXT, Markdown (.md), RTF, CSV
Uwaga: PDF bez warstwy tekstowej (skan) nie jest obsługiwany — brak OCR.
Jak działa biblioteka RAG
- Dodajesz dokumenty do bazy: kliknij Add files… lub przeciągnij pliki na okno dialogowe Documents (nie na okno czatu)
- Włącz toggle Use documents in chat
- Przy każdej rozmowie OneRAI automatycznie wyszukuje relevantne fragmenty
- Model wywołuje narzędzia
ext_search/ext_get_itemgdy potrzebuje danych z biblioteki - Znalezione fragmenty trafiają do kontekstu jako dodatkowa wiedza z cytowaniem źródła
Cytowania
Gdy model korzysta z dokumentów, cytuje źródło w formacie [plik.docx §sekcja, str. N].
Gdzie przechowywana jest baza
Baza jest per repozytorium EA (nie globalna), zapisywana lokalnie w:
%LocalAppData%\OneRAI
epos\<repoHash>\library.db
Przetrwa restart EA i restart sesji czatu.
Przykłady dokumentów do RAG
- Firmowy standard nazewnictwa EA
- Katalog wzorцów architektonicznych
- Słownik pojęć biznesowych
- Wymagania projektowe (SRS, BRD)
RAG — Documents (Knowledge Base)
The Documents button opens RAG knowledge base management. There are two distinct file features — often confused with each other:
| Feature | Button | Persistence |
|---|---|---|
| RAG Library (knowledge base) | 📚 Documents | Persistent — per EA repository |
| Message Attachment | 📎 Attach | One-time — gone after sending |
Supported Formats
Word (.docx), PDF, Excel (.xlsx), TXT, Markdown (.md), RTF, CSV
Note: PDFs without a text layer (scans) are not supported — no OCR.
How the RAG Library Works
- Add documents: click Add files… or drag files onto the Documents dialog window (not onto the chat window)
- Enable the Use documents in chat toggle
- During each conversation, OneRAI automatically searches for relevant fragments
- The model invokes
ext_search/ext_get_itemtools when it needs data from the library - Found fragments are added to context as additional knowledge with source citations
Citations
When the model uses documents, it cites the source as [file.docx §section, p. N].
Where the Database Is Stored
The database is per EA repository (not global), stored locally at:
%LocalAppData%\OneRAI
epos\<repoHash>\library.db
It survives EA restarts and chat session restarts.
Example Documents for RAG
- Company EA naming standard
- Architecture pattern catalog
- Business glossary
- Project requirements (SRS, BRD)