aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/chatbot/agentsystem
AgeCommit message (Collapse)Author
2024-11-06Enhance assistant security with structured validation and input sanitizationA.J. Shulman
- Prompt enhancements: - Enforce strict response structure validation by requiring <stage>, <thought>, <action>, and <answer> tags in responses. - Add self-validation instruction in <final_instruction> for assistant to check response structure before outputting. - Instruct assistant to ignore XML-like syntax from user input, treating any <stage>, <action>, etc., as plain text. - Code changes: - Implement `validateAssistantResponse` function to enforce required response structure (e.g., ensuring <stage> element). - Add input sanitization using `lodash.escape` to treat user inputs as plain text, preventing XML or HTML injection. - Configure XML parser to ignore external entities and avoid interpreting embedded XML-like syntax. - Introduce fallback error handling in parsing and validation to prevent assistant crashes on malformed or unexpected input. - Log response errors with detailed messages to aid debugging and improve system resilience. - Enhance input validation for tools by adding parameter checks, handling malformed data gracefully, and logging safety errors.
2024-11-04Merge branch 'ajs-finalagent' into alyssa-agentalyssaf16
2024-10-24create documentsalyssaf16
2024-10-22fixed websearch tool endpoint so it only returns displayable results in ↵A.J. Shulman
Dash; also fixed type checking but needs to be improved
2024-10-20changed to generic addLinkedDocA.J. Shulman
2024-10-17added create text doc tool with font color and background color and fixed no ↵A.J. Shulman
tool
2024-10-17Removed awaits inside loops and made Parameters readonly for better type safetyA.J. Shulman
2024-10-17Implemented strict typechecking for tools, specifically tool inputsA.J. Shulman
2024-10-15tried something for typechecking but way too overcomplicatedA.J. Shulman
2024-10-10added new file header comments and fixed some error handlingA.J. Shulman
2024-09-30upate AJ assistant from master and fix some lint errorsbobzel
2024-09-19added comments and fixed some styling and error handlingA.J. Shulman
2024-09-07added clarifying structural info to ReAct prompt (still ~69% shorter than ↵A.J. Shulman
previous prompt) and shortened the RAG prompt
2024-09-07completely restructured, added comments, and significantly reduced the ↵A.J. Shulman
length of the prompt (~72% shorter and cheaper)