For Technical & AI
RAG & provenance
Lazy page indexing, pgvector retrieval, and verified citations.
Public reading guide · Source: docs/03-Architecture.md
A reviewed summary of the repository documentation and current implementation. Private operational details and phase-test records are omitted.
Lazy indexing
The first question prepares missing compatible indexes across all retained workspace documents. Documents are transcribed in bounded page ranges and split into overlapping chunks that do not cross page boundaries. Index metadata includes the document version, embedding model, dimension, and chunk version.
Retrieval and answers
A server-scoped pgvector query retrieves at most six chunks from the authorized workspace. The RAG Q&A Agent receives the question, recent scoped chat context, and retrieved evidence. Gemini may cite only the retrieved opaque chunk IDs; code resolves them to filenames and pages.
No support or deleted evidence
Unsupported questions receive: “I could not find this in your uploaded documents.” Optional general guidance is separately labeled and cannot create dates or events. Deletion removes derived vectors and citations and invalidates assistant turns based on the deleted file.