Managing Knowledge Base
Managing Knowledge Base overview
What is Memories?
Memories is a local knowledge base feature in Sapientia that stores documents and important information into a vector database. This data is used to answer your questions more personally and relevantly using semantic search techniques.
Benefits:
- Data is stored entirely on your local device
- AI can answer based on private/internal documents
- Smart search using embedding similarity
How to Upload Files to Memories
- Click the "Insert" button on the Memories page
- Select one or multiple files (PDF/DOCX)
- Progress is displayed in real-time (number of chunks processed)
- Complete → files ready to use for RAG
Notes:
- Upload can only be performed when LLM is already running (requires embedding model)
- Large files will be split into multiple chunks according to file size
Filter Memories
Filter Query:
- Input:
source = 'C:\Users\Admin\notes.pdf' - Uses WHERE clause to filter vector database
Search Fragment (Semantic Search):
- Input: free text such as "project documentation"
- System converts to embedding → finds most similar chunks
How Memories are Used in RAG
When you ask something:
- Your query is converted into an embedding vector
- System finds top-5 most relevant chunks
- Those chunks are sent as context to AI:
--- CONTEXT (Use ONLY the information below...) --- [Fragment 1], Source: file.pdf [Fragment 2], Source: document.docx --- END OF CONTEXT --- - AI answers based on that context
Example:
- User: "What's in notes.pdf about the meeting?"
- System: Find chunks from notes.pdf → send as context → AI answers