GenerativeAIExamples icon indicating copy to clipboard operation
GenerativeAIExamples copied to clipboard

SQL retriever enhancements for Dell AIDp

Open vikalluru opened this issue 1 month ago • 0 comments

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.py and vanna_util.py with 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.db for 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:

  • ModuleNotFoundError for 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

vikalluru avatar Oct 06 '25 01:10 vikalluru