RAG — Dokumenty (baza wiedzy)

Przycisk Documents otwiera zarządzanie bazą wiedzy RAG. Dostępne są dwie odrębne funkcje — często mylone ze sobą:

FunkcjaPrzyciskTrwałość
Biblioteka RAG (baza wiedzy)📚 DocumentsTrwała — per repozytorium EA
Załącznik do wiadomości📎 AttachJednorazowy — 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

  1. Dodajesz dokumenty do bazy: kliknij Add files… lub przeciągnij pliki na okno dialogowe Documents (nie na okno czatu)
  2. Włącz toggle Use documents in chat
  3. Przy każdej rozmowie OneRAI automatycznie wyszukuje relevantne fragmenty
  4. Model wywołuje narzędzia ext_search / ext_get_item gdy potrzebuje danych z biblioteki
  5. Znalezione fragmenty trafiają do kontekstu jako dodatkowa wiedza z cytowaniem źródła
ℹ️ Wyszukiwanie w bibliotece jest pełnotekstowe (BM25) — nie wektorowe. Dokładne słowa kluczowe w pytaniu mają znaczenie.

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)
⚠️ Przeciągnięcie pliku na okno czatu obsługuje wyłącznie pliki .puml / .plantuml (import diagramu PlantUML). Aby dodać dokument do biblioteki RAG, przeciągnij na okno dialogowe Documents.
ℹ️ Dokumenty RAG to osobna funkcja od Scope. Scope = elementy z repozytorium EA. Dokumenty = zewnętrzne pliki z Twojego dysku.

RAG — Documents (Knowledge Base)

The Documents button opens RAG knowledge base management. There are two distinct file features — often confused with each other:

FeatureButtonPersistence
RAG Library (knowledge base)📚 DocumentsPersistent — per EA repository
Message Attachment📎 AttachOne-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

  1. Add documents: click Add files… or drag files onto the Documents dialog window (not onto the chat window)
  2. Enable the Use documents in chat toggle
  3. During each conversation, OneRAI automatically searches for relevant fragments
  4. The model invokes ext_search / ext_get_item tools when it needs data from the library
  5. Found fragments are added to context as additional knowledge with source citations
ℹ️ Library search is full-text (BM25) — not vector-based. Exact keywords in your question matter.

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)
⚠️ Dragging a file onto the chat window only handles .puml / .plantuml files (PlantUML diagram import). To add a document to the RAG library, drag onto the Documents dialog.
ℹ️ RAG Documents is a separate feature from Scope. Scope = elements from the EA repository. Documents = external files from your disk.