ai/studio

Quantum Minds Integration Guide

Introduction

This guide explains how to integrate Quantum Minds with Lightning RAG and other systems in the ParamAI ecosystem. By connecting these powerful platforms, you can create comprehensive AI solutions that leverage the strengths of each component for more sophisticated applications.

Lightning RAG Integration

Overview

Lightning RAG provides powerful document processing and knowledge management capabilities, while Quantum Minds offers workflow automation and advanced analytics. Together, they create a complete solution for extracting insights from all your data sources.

Integration Points

Lightning RAG Feature Quantum Minds Capability Integration Benefit
Document Collections Document Operators Query and process document-based knowledge
SQL Connections SQL Operators Analyze both structured and unstructured data
MongoDB Collections MongoDB Operators Work with flexible data models and document databases
Excel Processing Excel and Table Operators Transform spreadsheet data into insights
API Connections API Operators Enrich internal data with external services

Using Lightning RAG Collections in Quantum Minds

Lightning RAG collections can be directly accessed in Quantum Minds using document operators:

  1. Create and build a collection in Lightning RAG:

    • Upload documents or connect to data sources
    • Process and index the content
    • Ensure the collection is in "Ready" state
  2. Reference the collection in Quantum Minds:

    • Use document operators like RAGSummarize, RAGSubQuestions, or RAGParse
    • Select the Lightning RAG collection from the dropdown
    • Configure your query and processing parameters
  3. Process results with other operators:

    • Combine document insights with other data sources
    • Create visualizations of key findings
    • Generate comprehensive reports and dashboards

Example mind flow:

// Query a Lightning RAG document collection
{
  "operator": "RAGSummarize",
  "input": {
    "prompt": "Extract key regulatory requirements from our compliance documents",
    "collection": "regulatory_documents"
  }
}

↓

// Enhance with structured data from SQL database
{
  "operator": "TextToSQL",
  "input": {
    "prompt": "Find all compliance incidents in the past year",
    "dataset": "compliance_database"
  }
}

↓

{
  "operator": "SQLExecution",
  "input": {
    "sql": "$TextToSQL_001.output.content",
    "dataset": "compliance_database"
  }
}

↓

// Combine insights from both sources
{
  "operator": "TableToTextSummary",
  "input": {
    "prompt": "Create a comprehensive compliance summary that combines regulatory requirements with actual incident data",
    "dataframe": {
      "requirements": "$RAGSummarize_001.output.content",
      "incidents": "$SQLExecution_001.output.content"
    }
  }
}

Dynamic Collection Mapping

One of the most powerful integration features is dynamic collection mapping, which allows your minds to adapt to different users and contexts:

  1. Variable Collection References:

    {
      "operator": "RAGSummarize",
      "input": {
        "prompt": "Summarize the latest quarterly report",
        "collection": "${session.department}_reports"
      }
    }
    
  2. Session Variables:

    • Set through the mind's settings
    • Passed during mind execution
    • Can be derived from user properties
  3. MINDSHARE_KEY Configuration:

    • Generate a MINDSHARE_KEY for the published mind
    • Configure which variables can be passed through the key
    • Set default values for missing variables

RBAC (Role-Based Access Control) Integration

Ensure proper security across both systems:

  1. User Role Synchronization:

    • Roles defined in your identity management system are recognized across both platforms
    • Permissions are enforced consistently
  2. Collection Access Control:

    • Control which users and roles can access specific collections
    • Restrict sensitive information appropriately
    • Apply governance policies uniformly
  3. Published Link Settings:

    • Configure access requirements for published mind links
    • Set expiration dates if needed
    • Require authentication for sensitive minds

Publishing and Embedding

App Publishing with Refresh

You can publish Quantum Minds as interactive apps with automatic refresh capabilities:

  1. Publishing Process:

    • Finalize and test your mind
    • Click "Publish" from the mind details
    • Configure refresh settings (minutes, hours, daily)
    • Set access permissions
    • Generate a MINDSHARE_KEY
  2. Refresh Options:

    • Manual: User initiates refresh
    • Periodic: Automatic refresh at specified intervals
    • Event-Driven: Refresh triggered by data updates
  3. Embedding Options:

    • Embed as an iframe in any web application
    • Integrate with dashboards and portals
    • Include in SharePoint or other document systems

Dashboard Integration

Create comprehensive dashboards combining Lightning RAG chat interfaces and Quantum Minds analytics:

  1. Combined Interface:

    • Lightning RAG for conversational interaction
    • Quantum Minds for structured analysis and visualization
    • Unified experience for end users
  2. Shared Context:

    • User context available to both systems
    • Consistent data access and security
    • Seamless transitions between interfaces
  3. Implementation Approaches:

    • Side-by-side embedding
    • Tabbed interface
    • Context-sensitive switching
    • Custom portal integration

Advanced Integration Scenarios

Multi-Step Workflows

Create sophisticated workflows that combine Lightning RAG's document understanding with Quantum Minds' processing capabilities:

  1. Document Processing Pipeline:

    • Upload documents to Lightning RAG
    • Process and index content
    • Query collections from Quantum Minds
    • Enhance with structured data
    • Generate comprehensive reports
  2. Enhanced Chat Experiences:

    • Use Lightning RAG for conversational interface
    • Trigger Quantum Minds workflows for complex requests
    • Return enhanced results to the chat interface
    • Maintain conversation context throughout
  3. Automated Insights:

    • Monitor document collections for new content
    • Trigger analysis workflows when new information arrives
    • Generate alerts for significant findings
    • Update dashboards and reports automatically

Integration with External Systems

Extend beyond ParamAI with connections to other systems:

  1. Data Source Integration:

    • Connect to external databases and data warehouses
    • Import data from SaaS applications
    • Process IoT data streams
    • Analyze web analytics
  2. Workflow System Integration:

    • Trigger minds from workflow systems
    • Return results to business process platforms
    • Integrate with approval flows
    • Connect to scheduling systems
  3. Communication System Integration:

    • Send results via email
    • Post to collaboration platforms
    • Generate notifications
    • Schedule and distribute reports

Implementation Best Practices

Architecture Considerations

  1. Performance Planning:

    • Consider data volumes and processing needs
    • Plan for peak usage periods
    • Monitor system resources
    • Implement caching where appropriate
  2. Security Implementation:

    • Apply consistent security policies
    • Implement least privilege access
    • Audit sensitive operations
    • Encrypt data in transit and at rest
  3. Scalability Design:

    • Design for growth in users and data
    • Consider distributed processing for large workloads
    • Implement efficient resource utilization
    • Plan capacity based on expected growth

Development and Deployment

  1. Environment Strategy:

    • Maintain separate development, testing, and production environments
    • Use consistent configuration across environments
    • Implement structured deployment processes
    • Test thoroughly before production deployment
  2. Version Control:

    • Manage mind schemas in version control
    • Document changes and updates
    • Implement rollback capabilities
    • Coordinate updates across systems
  3. Monitoring and Maintenance:

    • Implement comprehensive monitoring
    • Track performance metrics
    • Set up alerts for issues
    • Schedule regular maintenance and updates

Technical Reference

API Integration

Both Lightning RAG and Quantum Minds offer API endpoints for programmatic integration:

  1. Quantum Minds API Endpoints:

    • /api/minds: Manage minds (create, update, delete)
    • /api/minds/{id}/execute: Execute a mind with parameters
    • /api/minds/{id}/schedule: Manage mind schedules
    • /api/mindshare: Generate and manage MINDSHARE_KEYs
  2. Lightning RAG API Endpoints:

    • /api/collections: Manage document collections
    • /api/collections/{id}/query: Query a collection
    • /api/collections/{id}/documents: Manage documents
    • /api/datasets: Manage structured data sources
  3. Authentication:

    • Bearer token authentication
    • OAuth 2.0 integration
    • API key management
    • Rate limiting and usage tracking

Session Management

For maintaining context across systems:

  1. Session Creation:

    • Create unique sessions for each user or workflow
    • Store session parameters securely
    • Manage session lifecycle
  2. Context Preservation:

    • Pass context between systems using session variables
    • Maintain consistency across integration points
    • Ensure secure context transmission
  3. Variable Mapping:

    • Map variables between systems
    • Transform data formats as needed
    • Maintain type safety across boundaries

Case Studies

Enterprise Knowledge Management

Challenge: A large financial institution needed to extract insights from thousands of research reports while connecting those insights to market data.

Solution:

  1. Used Lightning RAG to index and process research documents
  2. Created Quantum Minds to:
    • Query document collections based on market events
    • Correlate insights with market data from SQL databases
    • Generate daily briefings with combined analysis
    • Distribute personalized reports to different departments

Results:

Manufacturing Quality Analysis

Challenge: A manufacturing company needed to analyze quality issues across production lines by connecting sensor data with maintenance records and quality documentation.

Solution:

  1. Used Lightning RAG to process maintenance manuals and quality procedures
  2. Created Quantum Minds to:
    • Analyze sensor data from SQL databases
    • Correlate anomalies with maintenance history
    • Reference relevant procedures from documentation
    • Generate proactive maintenance recommendations

Results:

Next Steps

To get started with integration:

  1. Ensure you have access to both Lightning RAG and Quantum Minds
  2. Create some basic collections in Lightning RAG
  3. Build a simple mind in Quantum Minds that references those collections
  4. Experiment with the integration capabilities
  5. Scale up to more complex scenarios as you gain experience

For more detailed guidance:


Overview | Building Minds | Operator Categories | Integration Guide