> ## Documentation Index
> Fetch the complete documentation index at: https://docs.glood.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# How Glood.AI Works

> Understanding the AI-powered recommendation engine architecture and data flow

# How Glood.AI Works

Glood.AI is an advanced AI-powered recommendation engine that seamlessly integrates with your Shopify store to deliver personalized product recommendations. Our system combines real-time behavioral data with sophisticated machine learning models to maximize conversions and enhance the shopping experience.

## System Architecture Overview

```mermaid theme={null}
graph TB
    subgraph "Shopify Store"
        A[Customer Browses Store] --> B[Storefront Events]
        B --> C[Product Views]
        B --> D[Cart Actions]
        B --> E[Purchase Data]
    end
    
    subgraph "Data Collection Layer"
        C --> F[Web Pixel Tracking]
        D --> F
        E --> F
        F --> G[Event Stream]
    end
    
    subgraph "Glood.AI Platform"
        G --> H[Data Processing Engine]
        H --> I[User Profile Builder]
        H --> J[Product Intelligence]
        
        I --> K[AI Model Selection]
        J --> K
        
        K --> L[OpenAI GPT-4]
        K --> M[Google Gemini]
        K --> N[Glood Fine-tuned Models]
        
        L --> O[Recommendation Engine]
        M --> O
        N --> O
        
        O --> P[Personalized Recommendations]
    end
    
    subgraph "Delivery"
        P --> Q[Real-time Ranking]
        Q --> R[User Context]
        R --> T[Personalized Order]
        T --> U[API Response]
        U --> V[Section Templates]
        V --> S[Customer Sees Recommendations]
    end
    
    style A fill:#f9f,stroke:#333,stroke-width:2px
    style S fill:#9f9,stroke:#333,stroke-width:2px
    style O fill:#bbf,stroke:#333,stroke-width:4px
```

## Data Flow Process

### 1. **Data Collection from Shopify**

* **Storefront Interactions**: Every click, view, and action is tracked through our Web Pixel
* **Purchase History**: Complete order data including products, quantities, and customer segments
* **Product Catalog**: Real-time sync of your entire product database including variants, collections, and metadata
* **Customer Profiles**: Behavioral patterns, preferences, and purchase history

### 2. **Intelligent Processing**

* **Real-time Analysis**: Events are processed within milliseconds for immediate personalization
* **Pattern Recognition**: Identifying shopping behaviors, seasonal trends, and product affinities
* **Segmentation**: Automatic customer grouping based on behavior and preferences
* **Inventory Awareness**: Recommendations consider stock levels and availability

### 3. **AI Model Selection**

Our platform intelligently selects the best AI model for each recommendation type:

* **OpenAI GPT-4**: For complex natural language understanding and semantic product matching
* **Google Gemini**: For multi-modal analysis combining text and image data
* **Glood Fine-tuned Models**: Specialized models trained on e-commerce data for specific recommendation types

### 4. **Recommendation Generation**

* **Context-Aware**: Considers current page, time of day, device type, and session history
* **Multi-Algorithm Approach**: Combines collaborative filtering, content-based filtering, and deep learning
* **Business Rules**: Respects your merchandising rules, exclusions, and promotional priorities
* **Performance Optimization**: A/B testing and continuous learning improve recommendations over time

### 5. **Real-time Ranking & Delivery**

The final critical step happens in milliseconds before delivery:

* **User Context Integration**: Current session behavior, cart contents, and browsing patterns instantly affect ranking
* **Dynamic Re-ranking**: Products are re-ordered based on individual user preferences and likelihood to convert
* **Personalized Scoring**: Each product gets a unique relevance score for each user
* **Instant Adaptation**: Rankings update in real-time as users interact with your store

```mermaid theme={null}
graph LR
    A[Base Recommendations] --> B[User Profile]
    B --> C[Session Context]
    C --> D[Real-time Signals]
    D --> E[Re-ranking Engine]
    E --> F[Personalized Order]
    F --> G[Final Display]
    
    style E fill:#f9f,stroke:#333,stroke-width:2px
```

## Key Technologies

<CardGroup cols={2}>
  <Card title="Machine Learning Models" icon="brain">
    Advanced neural networks trained on billions of e-commerce transactions
  </Card>

  <Card title="Real-time Processing" icon="bolt">
    Sub-100ms response times for seamless user experience
  </Card>

  <Card title="Multi-Model AI" icon="layer-group">
    Leveraging OpenAI, Google Gemini, and proprietary models
  </Card>

  <Card title="Behavioral Analytics" icon="chart-line">
    Deep understanding of customer intent and preferences
  </Card>
</CardGroup>

## The AI Advantage

### Why Multiple AI Models?

Different recommendation scenarios benefit from different AI strengths:

1. **OpenAI GPT-4**
   * Understands complex product descriptions and relationships
   * Excels at semantic matching and context understanding
   * Powers natural language search and filtering

2. **Google Gemini**
   * Analyzes product images alongside text descriptions
   * Identifies visual similarities and style matching
   * Enhances fashion and design-focused recommendations

3. **Glood Fine-tuned Models**
   * Optimized specifically for e-commerce patterns
   * Trained on millions of successful purchase combinations
   * Provides the fastest inference for real-time recommendations

## Manual Recommendations & Merchandising Control

While Glood.AI's machine learning models provide powerful automated recommendations, we understand that merchants need control over their merchandising strategy. Our platform offers comprehensive manual configuration options that work seamlessly with AI recommendations.

### Dashboard Configuration

```mermaid theme={null}
graph LR
    A[Glood Dashboard] --> B[Manual Rules]
    B --> C[1:1 Product Mapping]
    B --> D[Bulk CSV Upload]
    B --> E[Attribute Priorities]
    
    C --> F[Rule Engine]
    D --> F
    E --> F
    
    F --> G[AI Recommendations]
    G --> H[Hybrid Ranking]
    
    I[User Context] --> H
    H --> J[Final Personalized Results]
    
    style A fill:#f9f,stroke:#333,stroke-width:2px
    style J fill:#9f9,stroke:#333,stroke-width:2px
```

### Manual Configuration Methods

#### 1. **1:1 Product Relationships**

* **Visual Dashboard Interface**: Drag-and-drop product associations
* **Specific Mappings**: Define exact products to recommend together
* **Override AI**: Force specific recommendations regardless of AI scoring
* **Test Mode**: Preview recommendations before going live

#### 2. **Bulk CSV Upload**

* **Large-Scale Configuration**: Upload thousands of product relationships at once
* **Template Support**: Pre-formatted CSV templates for easy setup
* **Validation**: Automatic error checking and product ID verification
* **Scheduled Updates**: Set up recurring imports for seasonal changes

#### 3. **Attribute Prioritization**

Configure which product attributes matter most for your recommendations:

* **Brand Weighting**: Prioritize same-brand or cross-brand recommendations
* **Price Range Control**: Keep recommendations within specific price bands
* **Category Rules**: Define cross-category recommendation strategies
* **Inventory Priority**: Boost products with high stock levels
* **Margin Optimization**: Favor higher-margin products

### Real-Time Personalization Layer

Manual configurations don't override personalization—they enhance it:

```python theme={null}
final_recommendation = (
    manual_weight * manual_rules +
    ai_weight * ai_predictions +
    personalization_weight * user_preferences
)
```

#### Dynamic Ranking Features

* **User Behavior Adaptation**: Manual rules adjust based on individual user patterns
* **Session Context**: Real-time ranking considers current browsing session
* **A/B Testing**: Test manual vs AI recommendations performance
* **Fallback Strategies**: Automatic fallback to AI when manual rules don't apply

### Common Use Cases

#### Inventory Management

* Push overstocked items through manual boosting
* Hide out-of-stock products from recommendations
* Promote end-of-season clearance items

#### Brand Partnerships

* Feature partner brands in specific recommendation slots
* Create co-marketing recommendation campaigns
* Implement exclusive brand showcases

#### New Product Launches

* Manually insert new products into recommendation streams
* Override lack of historical data for new items
* Create launch-specific recommendation strategies

#### Seasonal Campaigns

* Configure holiday-specific product bundles
* Adjust recommendations for seasonal events
* Schedule automatic rule changes for campaigns

### Integration with AI

Manual rules seamlessly integrate with AI recommendations:

1. **AI Baseline**: Machine learning provides the foundation
2. **Manual Override**: Specific rules take precedence when defined
3. **Hybrid Scoring**: Combine manual and AI signals for optimal results
4. **Performance Tracking**: Monitor manual vs AI recommendation performance

## Data Privacy & Security

* **GDPR & CCPA Compliant**: Full compliance with data protection regulations
* **Encrypted Data Transfer**: All data transmitted using industry-standard encryption
* **Shopify Standards**: Follows all Shopify partner requirements and best practices

## Performance Metrics

Our AI-powered system delivers measurable results:

* **40% Average AOV Increase**: Through intelligent upselling and cross-selling
* **25% Higher Conversion Rates**: By showing the right products at the right time
* **60% Click-through Rate**: On personalized recommendation sections
* **\< 100ms Response Time**: For instant recommendation loading

## Integration Points

Glood.AI integrates at multiple touchpoints in your store:

1. **Theme Integration**: Native Liquid templates for seamless design matching
2. **Checkout Extensions**: Upsell opportunities at critical conversion points
3. **API Access**: Headless commerce and custom implementations
4. **Admin Dashboard**: Real-time analytics and configuration

## Next Steps

<CardGroup cols={2}>
  <Card title="Recommendation Types" icon="grid" href="/how-it-works/recommendations/introduction">
    Learn how each recommendation type works
  </Card>

  <Card title="Quick Start Guide" icon="rocket" href="/guides/quick-start/create-first-personalized-recommendations-section">
    Set up your first AI recommendation
  </Card>
</CardGroup>

Explore the sidebar to dive deeper into specific recommendation algorithms and implementation details.
