Spaces:
Sleeping
Sleeping
Commit
Β·
a51583a
1
Parent(s):
460c5c1
update the readme file
Browse files- README.md +42 -1
- backend/README.md +15 -0
README.md
CHANGED
|
@@ -774,6 +774,31 @@ See `SUPABASE_SETUP.md` and `SUPABASE_MIGRATION_COMPLETE.md` for detailed instru
|
|
| 774 |
- Check backend logs for specific error messages
|
| 775 |
- Verify PostgreSQL connection for RAG storage
|
| 776 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 777 |
#### Tenant Isolation Issues
|
| 778 |
- **Issue**: Documents or data leaking between tenants
|
| 779 |
- **Solution**:
|
|
@@ -888,6 +913,17 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
|
|
| 888 |
|
| 889 |
## Recent Enhancements
|
| 890 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 891 |
### Role Propagation & Permission Handling (Latest)
|
| 892 |
- **Fixed Role Propagation**: User role (`viewer`, `editor`, `admin`, `owner`) is now properly passed through the entire ingestion pipeline:
|
| 893 |
- UI sends role in `x-user-role` header
|
|
@@ -904,9 +940,14 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
|
|
| 904 |
|
| 905 |
### Admin Rules System (Latest)
|
| 906 |
- **File Upload Support**: Upload rules from TXT, PDF, DOC, DOCX files with drag-and-drop interface
|
| 907 |
-
- **LLM Enhancement**:
|
|
|
|
|
|
|
|
|
|
| 908 |
- **Intelligent Fallback Explanations**: When LLM enhancement times out or fails, the system automatically generates basic explanations using keyword extraction, providing useful examples and pattern suggestions without requiring LLM availability
|
| 909 |
- **Chunk Processing**: Large rule sets processed in chunks of 5 to prevent timeouts (handles 100+ rules efficiently)
|
|
|
|
|
|
|
| 910 |
- **Comment Filtering**: Comment lines (starting with #) automatically ignored when uploading rules
|
| 911 |
- **Rule-First Processing**: Admin rules checked before intent classification - enables behavior control (brief responses vs blocking)
|
| 912 |
- **Supabase Integration**: Production-ready Supabase support with automatic table creation
|
|
|
|
| 774 |
- Check backend logs for specific error messages
|
| 775 |
- Verify PostgreSQL connection for RAG storage
|
| 776 |
|
| 777 |
+
#### Document Display Issues
|
| 778 |
+
- **Issue**: Document list shows `[object Object]` instead of document details
|
| 779 |
+
- **Solution**: This has been fixed. Documents now display properly with:
|
| 780 |
+
- Document ID (number)
|
| 781 |
+
- Document Type (text, pdf, faq, link)
|
| 782 |
+
- Preview (first 200 characters)
|
| 783 |
+
- Length (character count)
|
| 784 |
+
- Created date
|
| 785 |
+
- **If still seeing issues**: Refresh the Knowledge Base Library tab
|
| 786 |
+
|
| 787 |
+
#### Rule Addition Timeouts
|
| 788 |
+
- **Issue**: "Chunk 1/1 timed out after 45s" when adding rules
|
| 789 |
+
- **Solution**:
|
| 790 |
+
- **Quick Fix**: Uncheck the "Enable LLM Enhancement" checkbox before adding rules - rules will be added immediately without LLM processing
|
| 791 |
+
- **With Enhancement**: Keep checkbox checked but be patient - enhancement can take up to 180s for 5 rules (30s per rule)
|
| 792 |
+
- **Best Practice**: Add rules in smaller batches (1-3 rules at a time) when using enhancement
|
| 793 |
+
- **Note**: Enhancement is optional - you can always add rules quickly without it, then enhance them later if needed
|
| 794 |
+
|
| 795 |
+
#### Rule Deletion Issues
|
| 796 |
+
- **Issue**: "404 Not Found" when trying to delete a rule
|
| 797 |
+
- **Solution**: You can now delete rules in two ways:
|
| 798 |
+
- **By Number**: Enter the rule number (e.g., "1", "2", "3") as shown in the rules table
|
| 799 |
+
- **By Text**: Enter the exact rule text as displayed in the rules table
|
| 800 |
+
- **If rule not found**: Make sure you're entering the exact text or a valid rule number. Refresh the rules table to see current rules.
|
| 801 |
+
|
| 802 |
#### Tenant Isolation Issues
|
| 803 |
- **Issue**: Documents or data leaking between tenants
|
| 804 |
- **Solution**:
|
|
|
|
| 913 |
|
| 914 |
## Recent Enhancements
|
| 915 |
|
| 916 |
+
### UI & UX Improvements (Latest)
|
| 917 |
+
- **Document Display Fix**: Fixed document list showing `[object Object]` - now properly displays document ID, type, preview, length, and creation date in a formatted table
|
| 918 |
+
- **Rule Deletion Enhancement**: Can now delete rules by entering either:
|
| 919 |
+
- Rule number (e.g., "1", "2", "3") - automatically finds the corresponding rule
|
| 920 |
+
- Full rule text - deletes the exact matching rule
|
| 921 |
+
- **LLM Enhancement Toggle**: Added checkbox to enable/disable LLM enhancement when adding rules:
|
| 922 |
+
- **Quick Add**: Uncheck to add rules immediately without LLM processing (no timeout issues)
|
| 923 |
+
- **Enhanced Add**: Check to get better patterns, explanations, and examples (takes longer but higher quality)
|
| 924 |
+
- **Improved Timeouts**: Increased timeout for rule enhancement from 45s to 180s to handle multiple rules properly
|
| 925 |
+
- **Better Error Messages**: Clearer error messages for rule deletion, document operations, and permission errors
|
| 926 |
+
|
| 927 |
### Role Propagation & Permission Handling (Latest)
|
| 928 |
- **Fixed Role Propagation**: User role (`viewer`, `editor`, `admin`, `owner`) is now properly passed through the entire ingestion pipeline:
|
| 929 |
- UI sends role in `x-user-role` header
|
|
|
|
| 940 |
|
| 941 |
### Admin Rules System (Latest)
|
| 942 |
- **File Upload Support**: Upload rules from TXT, PDF, DOC, DOCX files with drag-and-drop interface
|
| 943 |
+
- **LLM Enhancement Toggle**: Optional LLM enhancement with checkbox control:
|
| 944 |
+
- **Quick Add Mode**: Uncheck to add rules immediately without LLM processing (no timeouts)
|
| 945 |
+
- **Enhanced Mode**: Check to get better patterns, explanations, examples, and edge case detection
|
| 946 |
+
- **LLM Enhancement**: When enabled, automatic rule enhancement identifies edge cases, improves regex patterns, and suggests severity levels
|
| 947 |
- **Intelligent Fallback Explanations**: When LLM enhancement times out or fails, the system automatically generates basic explanations using keyword extraction, providing useful examples and pattern suggestions without requiring LLM availability
|
| 948 |
- **Chunk Processing**: Large rule sets processed in chunks of 5 to prevent timeouts (handles 100+ rules efficiently)
|
| 949 |
+
- **Enhanced Timeouts**: Increased timeout from 45s to 180s per chunk to accommodate LLM processing
|
| 950 |
+
- **Flexible Rule Deletion**: Delete rules by entering either rule number (e.g., "1") or full rule text
|
| 951 |
- **Comment Filtering**: Comment lines (starting with #) automatically ignored when uploading rules
|
| 952 |
- **Rule-First Processing**: Admin rules checked before intent classification - enables behavior control (brief responses vs blocking)
|
| 953 |
- **Supabase Integration**: Production-ready Supabase support with automatic table creation
|
backend/README.md
CHANGED
|
@@ -185,6 +185,12 @@ Every tool now returns strict JSON schemas for consistency:
|
|
| 185 |
|
| 186 |
**Schema Definitions**: `backend/api/services/tool_metadata.py` contains `TOOL_OUTPUT_SCHEMAS` with validation functions.
|
| 187 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 188 |
### Role Propagation & Permission Handling
|
| 189 |
- **Fixed Role Propagation**: User role is now properly passed from API route β `process_ingestion()` β RAG client β MCP server
|
| 190 |
- `rag_client.ingest_with_metadata()` now accepts `user_role` parameter
|
|
@@ -381,6 +387,15 @@ Agents that speak the Model Context Protocol should connect to the `integrachat`
|
|
| 381 |
- **404 Not Found**: Verify the document_id exists and belongs to the correct tenant
|
| 382 |
- **Tenant ID mismatch**: The system normalizes tenant IDs, but ensure you're using the same tenant_id format as when documents were ingested
|
| 383 |
- **Check logs**: Database deletion logs show detailed information about tenant ID matching and document existence
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 384 |
|
| 385 |
### Supabase Configuration Issues
|
| 386 |
- **Data still going to SQLite**: Check that `SUPABASE_URL` and `SUPABASE_SERVICE_KEY` are set correctly in `.env` (no quotes, no spaces)
|
|
|
|
| 185 |
|
| 186 |
**Schema Definitions**: `backend/api/services/tool_metadata.py` contains `TOOL_OUTPUT_SCHEMAS` with validation functions.
|
| 187 |
|
| 188 |
+
### UI & UX Improvements
|
| 189 |
+
- **Document Display**: Fixed document list formatting - now properly displays as table rows instead of `[object Object]`
|
| 190 |
+
- **Rule Deletion**: Enhanced to support both rule numbers and rule text for easier deletion
|
| 191 |
+
- **LLM Enhancement Toggle**: Added option to disable LLM enhancement for faster rule addition
|
| 192 |
+
- **Timeout Improvements**: Increased timeout for bulk rule operations from 45s to 180s
|
| 193 |
+
|
| 194 |
### Role Propagation & Permission Handling
|
| 195 |
- **Fixed Role Propagation**: User role is now properly passed from API route β `process_ingestion()` β RAG client β MCP server
|
| 196 |
- `rag_client.ingest_with_metadata()` now accepts `user_role` parameter
|
|
|
|
| 387 |
- **404 Not Found**: Verify the document_id exists and belongs to the correct tenant
|
| 388 |
- **Tenant ID mismatch**: The system normalizes tenant IDs, but ensure you're using the same tenant_id format as when documents were ingested
|
| 389 |
- **Check logs**: Database deletion logs show detailed information about tenant ID matching and document existence
|
| 390 |
+
- **Role Propagation**: Ensure user role is being passed correctly - deletion requires `admin` or `owner` role. The role is now properly propagated from UI β API β RAG Client β MCP Server
|
| 391 |
+
|
| 392 |
+
### Rule Management Issues
|
| 393 |
+
- **Timeout Errors**: If rule enhancement times out:
|
| 394 |
+
- Disable LLM enhancement in the UI (uncheck the checkbox)
|
| 395 |
+
- Add rules in smaller batches (1-3 rules at a time)
|
| 396 |
+
- Enhancement timeout increased to 180s per chunk (5 rules)
|
| 397 |
+
- **Rule Deletion 404**: Can now delete by rule number or full text. If using number, ensure it's a valid index (1-based)
|
| 398 |
+
- **Permission Errors**: Rule management requires `admin` or `owner` role. Check that role is set correctly in the UI
|
| 399 |
|
| 400 |
### Supabase Configuration Issues
|
| 401 |
- **Data still going to SQLite**: Check that `SUPABASE_URL` and `SUPABASE_SERVICE_KEY` are set correctly in `.env` (no quotes, no spaces)
|