Home / Architecture / Tool 07 Demo / Algorithm Detail

Tool 07 · Algorithm Deep Dive

Fiori App Recommender

Collaborative Filtering + SAP Taxonomy

86.4%Top-1 Accuracy
96.1%Top-5 Accuracy
15,000+Fiori Apps
1,024Embedding Dims
Try Interactive Demo

🎯 Why This Algorithm

📋 Problem Statement

SAP ships 15,000+ Fiori apps with overlapping names and functionality. Rule-matching on app names is hopeless — "Post Journal Entry" and "Record GL Posting" describe the same app. Even experienced consultants can't memorize the catalog. Projects often build custom apps because nobody knows a standard Fiori app already exists.

✅ Solution

Two-stage retrieval + ranking over the full Fiori catalog. Bi-Encoder (bge-large) performs fast semantic search understanding synonyms and concepts. Cross-Encoder precisely re-ranks top candidates. Output includes fit score, coverage tag, and gap analysis — directly feeding RICEFW estimation.

🧩 What It Comprises

🔤 Bi-Encoder

bge-large-en-v1.5 — 1,024-dim sentence embeddings. Pre-encodes all 15,000+ Fiori app descriptions (title + business scenario + key fields).

🔍 Vector Index

FAISS Flat Index — Exact search (small enough to stay in memory). Cosine similarity over 1,024-dim vectors.

🎯 Cross-Encoder

bge-reranker-large — Re-ranks top-25 candidates to top-5. Takes both query and document as input for precise scoring.

📋 Rules Overlay

Module compatibility filter using Tool 03 output. Ensures recommended apps are compatible with assigned SAP modules.

📥 Inputs & 📤 Outputs

📥 Inputs

  • One requirement line (from Tool 02)
  • Assigned SAP module (from Tool 03)
  • Optional: business context

📤 Outputs

  • Top-5 Fiori apps with fit score (0-100%)
  • Coverage tag (full / partial / none)
  • Gap list if partial coverage
  • App ID, name, and business catalog

📱 Example Recommendation

Requirement: "Create purchase order with approval workflow" (Module: MM)

Manage Purchase Orders F0842A 94% Fit

Create, edit, and display purchase orders with flexible workflow integration.

Coverage: Full | Business Catalog: SAP_MM_BC_PO_MANAGE
My Inbox – Approve Purchase Orders F0862 87% Fit

Universal inbox for approving purchase orders and other workflow tasks.

Coverage: Partial (approval only) | Business Catalog: SAP_CROSS_BC_WORKFLOW
Mass Changes to Purchase Orders F2563 62% Fit

Mass maintenance of purchase order header and item data.

Coverage: Partial | Gap: No approval workflow integration

🔄 How It Runs — Step by Step

┌─────────────────────────────────────────────────────────────────────────────────────────┐
│                        FIORI APP RECOMMENDER PIPELINE                                      │
├─────────────────────────────────────────────────────────────────────────────────────────┤
│                                                                                           │
│   ┌──────────────┐                                                                        │
│   │   INPUT:     │  "Create purchase order with approval workflow"                         │
│   │ Requirement  │  Module: MM (from Tool 03)                                             │
│   └──────┬───────┘                                                                        │
│          │                                                                                 │
│          ▼                                                                                 │
│   ┌──────────────────────────────────────────────────────────────────┐                    │
│   │                    STEP 1: BI-ENCODER RETRIEVAL (Top-25)           │                    │
│   │                                                                     │                    │
│   │   ┌─────────────────────────────────────────────────────────────┐ │                    │
│   │   │  bge-large-en-v1.5 Bi-Encoder                                │ │                    │
│   │   │                                                              │ │                    │
│   │   │  Requirement → Embedding (1,024-dim)                          │ │                    │
│   │   │                                                              │ │                    │
│   │   │  FAISS Flat Index over 15,000+ Fiori apps:                   │ │                    │
│   │   │  • App ID                                                      │ │                    │
│   │   │  • Title                                                       │ │                    │
│   │   │  • Description                                                 │ │                    │
│   │   │  • Business Scenario                                           │ │                    │
│   │   │  • Key Fields                                                  │ │                    │
│   │   │                                                              │ │                    │
│   │   │  Cosine Similarity: sim(q, app) = (q·app)/(‖q‖·‖app‖)        │ │                    │
│   │   │                                                              │ │                    │
│   │   │  Returns: Top-25 candidates (~5ms)                            │ │                    │
│   │   └─────────────────────────────────────────────────────────────┘ │                    │
│   └──────────────────────────────────────────────────────────────────┘                    │
│          │                                                                                 │
│          ▼                                                                                 │
│   ┌──────────────────────────────────────────────────────────────────┐                    │
│   │                    STEP 2: CROSS-ENCODER RE-RANKING (Top-5)        │                    │
│   │                                                                     │                    │
│   │   ┌─────────────────────────────────────────────────────────────┐ │                    │
│   │   │  bge-reranker-large Cross-Encoder                            │ │                    │
│   │   │                                                              │ │                    │
│   │   │  For each of 25 candidates:                                  │ │                    │
│   │   │  Input = [CLS] Requirement [SEP] App_Description [SEP]       │ │                    │
│   │   │  Output = Relevance Score (0-1)                              │ │                    │
│   │   │                                                              │ │                    │
│   │   │  Why two stages?                                             │ │                    │
│   │   │  • Cross-Encoder too slow for 15,000 apps (~30s)             │ │                    │
│   │   │  • Bi-Encoder fast but less accurate                         │ │                    │
│   │   │  • Combined = Speed (5ms) + Accuracy (re-ranked)             │ │                    │
│   │   └─────────────────────────────────────────────────────────────┘ │                    │
│   └──────────────────────────────────────────────────────────────────┘                    │
│          │                                                                                 │
│          ▼                                                                                 │
│   ┌──────────────────────────────────────────────────────────────────┐                    │
│   │                    STEP 3: MODULE COMPATIBILITY FILTER             │                    │
│   │                                                                     │                    │
│   │   Filter by assigned module (MM from Tool 03):                      │                    │
│   │   • App must be compatible with MM module                           │                    │
│   │   • Business Catalog must include MM scope                          │                    │
│   │   • Cross-module apps kept if relevant                              │                    │
│   │                                                                     │                    │
│   │   If top app filtered out, promote next compatible app              │                    │
│   └──────────────────────────────────────────────────────────────────┘                    │
│          │                                                                                 │
│          ▼                                                                                 │
│   ┌──────────────────────────────────────────────────────────────────┐                    │
│   │                    STEP 4: COVERAGE ANALYSIS & OUTPUT              │                    │
│   │                                                                     │                    │
│   │   Compare requirement text to app capabilities:                     │                    │
│   │   • Full coverage: All requirement aspects covered                  │                    │
│   │   • Partial coverage: Some aspects missing → List gaps              │                    │
│   │   • No coverage: No matching app → Suggest custom development       │                    │
│   │                                                                     │                    │
│   │   Output: Top-5 apps with fit scores, coverage tags, gap lists      │                    │
│   └──────────────────────────────────────────────────────────────────┘                    │
│          │                                                                                 │
│          ▼                                                                                 │
│   ┌──────────────────────────────────────────────────────────────────┐                    │
│   │   OUTPUT JSON:                                                    │                    │
│   │   {                                                               │                    │
│   │     "requirement": "Create purchase order with approval workflow", │                    │
│   │     "module": "MM",                                               │                    │
│   │     "recommendations": [                                          │                    │
│   │       {"app_id": "F0842A", "name": "Manage Purchase Orders",      │                    │
│   │        "fit": 0.94, "coverage": "full"},                          │                    │
│   │       {"app_id": "F0862", "name": "My Inbox - Approve POs",       │                    │
│   │        "fit": 0.87, "coverage": "partial",                        │                    │
│   │        "gaps": ["No PO creation capability"]}                      │                    │
│   │     ]                                                             │                    │
│   │   }                                                               │                    │
│   └──────────────────────────────────────────────────────────────────┘                    │
│                                                                                           │
└─────────────────────────────────────────────────────────────────────────────────────────┘
                    

🏗️ Architecture & Integration

Where Fiori Recommender Sits in A²AI

🏷️ TOOL 02
Requirements
🧭 TOOL 03
Module Router
📱 TOOL 07
Fiori App Recommender
Bi-Encoder + Cross-Encoder
TOOL 08
RICEFW Classifier
TOOL 04
Cost Forecaster
Gap Analysis
Custom Dev Scope

Tool 07 reduces custom development by identifying standard Fiori apps that meet requirements.

📐 Mathematical Explanation

Bi-Encoder Cosine Similarity:

sim(q, a) = (E_q · E_a) / (‖E_q‖ · ‖E_a‖)

Where E_q, E_a are 1,024-dim embeddings from bge-large-en-v1.5.

Cross-Encoder Relevance Score:

score(q, a) = σ( W · BERT([CLS] q [SEP] a [SEP]) + b )

Where BERT is the bge-reranker-large model, σ is sigmoid activation.

Contrastive Learning Loss (Bi-Encoder Training):

L = -log( exp(sim(q, a⁺)/τ) / Σ exp(sim(q, a_i)/τ) )

Where a⁺ is the correct Fiori app, τ is temperature (0.05).

Fit Score Normalization:

fit_score = (raw_score - min_score) / (max_score - min_score) × 100

📊 Measured Performance

MetricValueBenchmark
Top-1 Accuracy86.4%1,000 requirement-app pairs
Top-3 Accuracy94.2%Same test set
Top-5 Accuracy96.1%Same test set
Mean Reciprocal Rank (MRR)0.91Industry standard
Retrieval Latency5msBi-Encoder only
Re-ranking Latency45msCross-Encoder (25 candidates)

📚 Training & Calibration Set

  • Corpus: SAP Fiori App Library — 15,000+ apps (official catalog)
  • Re-ranker Fine-tuning: 3,000 requirement-app pairs annotated by senior functional consultants
  • Embedding Model: bge-large-en-v1.5 (pre-trained, not fine-tuned on SAP data)
  • Validation: 1,000 held-out pairs across all major SAP modules
  • Catalog Update: Weekly sync with SAP Fiori Apps Library API

🎬 End-to-End Example

Scenario: Avoiding Unnecessary Custom Development

  1. Requirement: "Mass maintenance of purchase info records with price updates"
  2. Bi-Encoder: Finds F2714 "Mass Maintenance of Purchase Info Records" (rank 1)
  3. Cross-Encoder: Confirms high relevance (0.94 fit score)
  4. Coverage Analysis: Full coverage — all requirement aspects met
  5. Output: Recommends F2714 with Full coverage tag

Result: 6 months of custom development avoided. Estimated savings: $180,000.