mirror of
https://github.com/Tencent/WeKnora.git
synced 2026-08-30 16:53:21 +08:00
37a517612d
- Updated the agent system prompt to emphasize the use of regex for chunk searches, improving retrieval accuracy and efficiency. - Introduced a new `Capabilities` field in the `KnowledgeBaseInfo` struct to define the retrieval surfaces available for each knowledge base, guiding the agent's strategy selection. - Enhanced the `grep_chunks` tool to support regex queries, allowing for more flexible and powerful text pattern matching in knowledge base chunks. - Improved JSON handling in the `RepairJSON` function to address invalid escape sequences, particularly for regex patterns, ensuring robust parsing and error handling. - Updated documentation and comments across various files to clarify usage and expectations for regex and knowledge base capabilities. These changes significantly enhance the agent's ability to retrieve relevant information while ensuring the integrity of input data handling.