Knowledge base
Give ShiritaiBot your manuals, rules, spreadsheets and lecture notes, and let it quote them when needed.
The knowledge base holds documents that don't change: product manuals, company rules, lecture notes, data tables. ShiritaiBot searches them when needed and answers by quoting the original text.
How it differs from memory
| Long-term memory | Knowledge base | |
|---|---|---|
| Content | People, things and events that change over time | Fixed documents |
| Written by | Organized automatically from conversations | You, by importing files |
| Changes | New facts replace old ones; conflicts are checked with you | Delete the whole document and import it again |
| Use | Added to the conversation each turn as needed | Searched when the model decides to, never added automatically |
Import documents
There are two ways:
- Upload in the WebUI: open Library → Knowledge Base in the sidebar, pick the library to manage and upload files.
- Send it in a private chat: as the owner, send the file in your QQ private chat and say "save this to the knowledge base". If you only send a file without saying what it's for, ShiritaiBot asks first.
Supported formats:
| Type | Formats |
|---|---|
| Text | txt, md, rst, log, json, yaml, xml |
| Tables | csv, tsv, xlsx, xls |
| Documents | pdf, docx, doc |
| Slides | pptx, ppt (including notes) |
Each file can be up to 50 MB. Scanned PDFs have no text layer and need OCR first. Encrypted files and RTF aren't supported yet.
Importing only parses and splits documents; it doesn't call a text model. Markdown and Word files are split by heading, PDFs and slides by page, and every table chunk repeats the header row so it still makes sense on its own.
Search
ShiritaiBot runs a keyword search and a meaning-based search and merges the results. The keyword search handles Chinese word splitting and English word forms, so it finds a passage even when your question words it differently. Meaning-based search needs an embedding model in Models and routing; without one, only keywords are used, and imports still work.
Once it finds a relevant passage, the model can page backward and forward through the surrounding text before answering.
Several knowledge libraries
You can create libraries for different purposes, such as "Project files" and "Course notes", and bind them to WebUI chats, private chats or group chats:
- Open Settings → Knowledge base and add a library.
- Choose a library for each chat, or turn the knowledge base off for it. One library can be bound to many chats.
- Save.
Each chat can only search and import into its own library. Removing a library from settings doesn't delete its data; add it again with the same ID to restore it.
Group chats and permissions
| Tool | Does | Who can use it |
|---|---|---|
kb_search | Search | Per chat permissions; also in Chat mode |
kb_read | Read the text around a match | Same as above |
kb_list | List documents | Same as above |
kb_import | Import a file | Owner's private chat only |
kb_delete | Delete a document | Owner's private chat only |
A group chat bound to a library can search the whole library, which makes it a handy Q&A helper for the group.