GenerativeAIExamples
GenerativeAIExamples copied to clipboard
SQL retriever enhancements for Dell AIDp
SQL Retriever Enhancements for Dell AIDp
Summary
Enhances the Asset Lifecycle Management Agent's SQL retrieval capabilities with improved database connectivity and Dell AIDp sandbox compatibility.
Key Changes
SQL Retriever Improvements:
- Enhanced
vanna_manager.pyandvanna_util.pywith better error handling and database connectivity - Improved SQL query generation and retrieval tool functionality
Dell AIDp Sandbox Compatibility:
- Fixed database path to use
/workspace/database/nasa_turbo.dbfor sandboxed environments - Fixed module import paths (
sys.path.append("/workspace")) - Made utils imports conditional (only for RUL transformations)
- Disabled automatic retries in code generation (set to 0 for sandbox stability)
Developer Experience:
- Added comprehensive installation guide (
INSTALLATION.md) - Added detailed configuration documentation (
configs/README.md) - Added
utils_template/with pre-built RUL transformation utilities - Updated dependencies in
pyproject.toml
Testing
Addresses customer-reported issues:
ModuleNotFoundErrorfor utils and mysql modules- Database connection failures in sandboxed environments
- Fixed critical embed_query interface compatibility issue between ChromaDB and NVIDIA embeddings
Input format fix: ChromaDB passes ['query text'] (list) but langchain expects string - now extracts string to prevent API 500 errors Output format fix: ChromaDB expects [[embedding]] but langchain returns [embedding] - now wraps result to prevent TypeError: 'float' object cannot be converted to 'Sequence' Resolves embedding failures that prevented SQL query vector search from working