Knowledge Base
Last Updated: 2025-11-14
Overview
The knowledge base can be thought of as an open book exam, finding the most relevant information from the knowledge base to the question and extracting it as context for the large language model to reference when answering. Although the knowledge base can hold large amounts of data, it is still important to note whether the uploaded data is relevant to the questions the AI assistant needs to answer. If irrelevant, based on current retrieval technology, it may still result in finding irrelevant information as answer context, thus failing to answer properly.
Knowledge Base Content Examples
The knowledge base is suitable for storing various types of structured or unstructured information:
Product information
FAQ common questions
Technical documentation
Operation manuals
Policy specifications
Other large volumes of data
File List Sorting
Sort by Creation Date
MaiAgent's knowledge base file list is displayed using sort by creation date, with the most recently uploaded files shown at the top of the list. This design allows you to:
Quickly find new files: Newly uploaded files immediately appear at the top
Track update timeline: Understand the knowledge base's update history through file order
Convenient management and maintenance: Prioritize handling the most recently added data
Sorting Logic
The knowledge base file serializer (BaseKnowledgeBaseFileSerializer) automatically sorts by creation date (created_at) in descending order:
This sorting method applies to all file lists retrieved through API or interface, ensuring consistent user experience.
Knowledge Base File Management Best Practices
File Naming Recommendations
For easier identification and management of files, it's recommended to adopt meaningful naming conventions:
Include date: e.g.,
Product_Specs_2025-11.pdfVersion marking: e.g.,
User_Manual_v2.3.pdfTopic classification: e.g.,
FAQ_Return_Policy.md
Regular Review and Updates
Since files are sorted by creation date, it's recommended to regularly review the list:
Check recent files: Confirm that recently uploaded file contents are correct
Update outdated data: Find older files and evaluate whether they need updating or deletion
Maintain data quality: Ensure the timeliness and accuracy of knowledge base content
Batch Upload Strategy
When uploading multiple files at once:
Upload in order of importance, with the most important files uploaded last (will appear at the top)
Related files should be uploaded at similar times to cluster them in the list
Immediately check the list order after uploading to confirm file arrangement meets expectations
Technical Explanation
API Response Format
The knowledge base file API returns a file list sorted by creation date:
Comparison with Other Sorting Methods
By creation date
Easy to track new content
Older but important files may be overlooked
✅ Yes
By filename
Easy to search for specific files
Requires good naming conventions
❌ No
By file size
Identify large files
Unrelated to content importance
❌ No
By modification date
Reflects latest updates
Initial creation time information lost
❌ No
MaiAgent chooses to sort by creation date to provide the most intuitive timeline perspective, allowing users to clearly understand the knowledge base's growth process.
Related Features
Last updated
Was this helpful?
