ofa_private_rag¶
Ingest a user’s own data into a per-user private RAG store.
Backs ofa --add-private / --list-private / --forget-private.
The private store is a ChromaDB instance under $OFA_SCRATCH — separate
from the shared corpora in $OFA_VECTORDB — so a user can index their own
data and have it retrieved alongside the built-in collections without any
write access to the shared install. See retrieve_private_context in
ofa_main.py for the read side.
Chunking / embedding reuse rebuild_indices.py so the private store is
byte-for-byte compatible with what the shared pipeline produces.
Functions
|
Index every supported file under directory into the private store. |
|
Delete one private collection, or everything with |
- ofa_private_rag.add_private(directory, collection_label=None, ocr='auto')[source]¶
Index every supported file under directory into the private store.
Re-running with the same collection upserts (stable chunk IDs), so an edited corpus can be refreshed by pointing at the same directory again.
ocr(“auto” | “force” | “off”) controls vision-OCR of PDF pages. Default “auto” self-heals degraded pages (garbled equations / scans); it downgrades to “off” with one notice if the active model has no vision head, rather than emitting a per-page skip.