AVA

AVA

Enables SAP Value Advisors to instantly generate prioritized recommendations for client pain points by leveraging historical cases, Next-Gen Ariba features, and VLM KPIs, producing structured analysis cards with effort, timeline, and benefits.

Category
访问服务器

README

<p align="center"> <img src="data/images/ava.jpg" alt="AVA — Autonomous Value Advisory" width="800" /> </p>

Turn years of SAP Solution Value Advisory knowledge into instant, evidence-backed recommendations.

AVA (Autonomous Value Advisory) elevates value advisory inside Joule Work Desktop. It contextualizes client pain points using SVA’s historical library of real Ariba cases, enriches with Next‑Gen Ariba roadmap features and VLM KPIs, and returns prioritized recommendations with effort, timeline, and quantified benefits. AVA helps SVA reduce prep time, increase proposal quality, and anchor narratives in measurable outcomes. Multilingual and SAP‑native, it fits directly into your day-to-day advisory work.

Why now

  • Joule Work Desktop brings an always‑on conversational assistant to the desktop — no browser, instant context switching.
  • The difference-maker is context. AVA operationalizes SVA’s expert knowledge and fuses it with Product’s roadmap and VLM metrics to deliver recommendations that are specific and defensible.

The challenge for SVA

  • Great value narratives require speed, depth, and evidence. Generic AI misses context; scattered assets slow teams down; proposals often lack quantified outcomes.

What AVA is

  • An MCP server on SAP BTP Cloud Foundry connecting Joule Desktop to two SAP HANA Cloud vector indexes:
    • A historical pain point library of real SAP Ariba cases (by solution and functional area).
    • An internal knowledge base with 83 Next‑Gen Ariba features and 86 VLM KPIs across 5 solutions (Buying, Sourcing, Contracts, SLP, Supplier Risk).

How it works

  • Given a client pain point (chat query or Excel batch), AVA runs semantic similarity search (cosine similarity in HANA Vector Engine), enriches with roadmap features and VLM KPIs, synthesizes prioritized recommendations with category, effort, timeline, and benefits, and outputs a structured analysis card in chat or a ready‑to‑deliver Excel.

Why it matters

  • Faster prep, higher consistency, and metric‑anchored proposals that increase credibility and win rates.
  • Structured feedback loop from the field — which pains occur most, where roadmap features map to pains, and where gaps remain.

Status and roadmap

  • Live on Cloud Foundry — single-query mode via Joule Work Desktop.
  • Batch mode ready — Excel intake → enriched corporate-formatted output; waiting for JWD to support it.
  • Multilingual (English, Spanish, Portuguese, and any language Joule supports).
  • Limited pilot with selected employees; presented at SAP’s flagship event.
  • Next: expert‑in‑the‑loop learning and expansion to Fieldglass and additional solutions.

Native SAP stack

  • Gemini Embedding via SAP AI Core, HANA Cloud Vector Engine as the store, Joule Desktop as the reasoning layer, MCP streamable‑HTTP as the protocol.

Architecture

Joule Work Desktop
     │  MCP (streamable-HTTP)
     ▼
┌─────────────────────────────────────────────────────────┐
│  server/server.py       ← Local: batch + single query   │
│  server/server_cf.py    ← Cloud Foundry: single query   │
│         │                                               │
│         ├── server/recommend.py  ← Core retrieval logic │
│         │       ├── read_excel_painpoints()             │
│         │       ├── retrieve_similar_cases()            │
│         │       ├── retrieve_similar_cases_batch()      │
│         │       ├── retrieve_knowledge_context()        │
│         │       ├── search_documentation()             │
│         │       ├── write_excel_output()               │
│         │       └── rate_recommendation()              │
│         │                                               │
│         ├── shared/config.py     ← SDK, pool, taxonomy  │
│         │       ├── embed_text()                       │
│         │       ├── hana_connection()                  │
│         │       └── normalise_*()                      │
│         │                                               │
│         └── shared/instructions.py ← Single-query card  │
└─────────────────────────────────────────────────────────┘

Two server variants

Server Mode Tools Use case
server.py HTTP + stdio 7 (all) Local dev, batch Excel, Claude Desktop
server_cf.py HTTP only 5 (single-query subset) Cloud Foundry production (no local filesystem)

Pipeline — Single query (live on CF)

1. Consultant describes a pain point in Joule chat

2. query_single_pain_point(pain_point, solution)
        └─ embed → cosine search on SVA2.PAIN_POINTS
        └─ filtered by SOLUTION, threshold ≥ 0.55
        └─ quality-weighted scoring

3. retrieve_knowledge_context(pain_point, solution, ["next_gen", "vlm_kpis"])
        └─ parallel cosine search on SVA2.KNOWLEDGE_BASE
        └─ next_gen: solution-filtered, fallback to global
        └─ vlm_kpis: always solution-filtered
        └─ includes server-side documentation search (SAP Help Portal)

4. Joule synthesizes structured card:
        🔍 Pain Point → 💡 Recommendation → 🎯 Benefits
        📊 SVA Analysis → 📚 Documentation → 🚀 Next-Gen → 📋 KPIs

Pipeline — Excel batch (ready, pending JWD support)

1. read_excel_painpoints(input_path, offset, limit=10)
        └─ detect sheet, normalise columns, detect language per row

2. retrieve_similar_cases_batch(items)
        └─ ThreadPoolExecutor — parallel HANA vector search
        └─ circuit breaker: aborts if >50% tasks fail

3. retrieve_knowledge_context(pain_point, solution, sources, hint)
        └─ called per row with Joule's drafted hint

4. Joule synthesizes per row:
        Recommendations · Category · Effort · Timeline · Benefits
        Documentation · Ariba Next-Gen · Value KPIs

5. write_excel_output(input_path, rows)
        └─ expands short labels, strips blocked URLs
        └─ SAP corporate format (Quick Reference Card spec)
        └─ saves to ~/Downloads/<stem>_RECOMMENDED.xlsx

HANA Tables

SVA2.PAIN_POINTS

Historical pain point library — indexed from legacy client Excel trackers.

Column Type Description
ID VARCHAR(36) UUID primary key
SOLUTION NVARCHAR(100) Canonical SAP Ariba solution
SOLUTION_AREA NVARCHAR(200) Functional area within the solution
PAIN_POINT NVARCHAR(4000) Pain point text
RECOMMENDATION NVARCHAR(4000) Consultant recommendation
CATEGORY NVARCHAR(100) Feature Adoption / Innovation / Q&A / Process Change / Training / Roadmap Discussion
EFFORT NVARCHAR(50) Low / Medium / High / Complex / N/A
BENEFITS NVARCHAR(2000) Expected business outcome
TIMELINE NVARCHAR(100) Quick Win / Short Term / Mid Term / Long Term
IMPACT NVARCHAR(20) Low / Medium / High
USE_COUNT INTEGER Times retrieved — auto-incremented
EMBEDDING REAL_VECTOR(3072) Gemini embedding of pain_point text

SVA2.KNOWLEDGE_BASE

Internal knowledge — two source types currently ingested.

Column Type Description
ID VARCHAR(36) UUID primary key
SOURCE_TYPE NVARCHAR(50) next_gen | vlm_kpis | ai_scenarios | premium_services
SOLUTION NVARCHAR(100) Canonical solution name
TITLE NVARCHAR(500) Feature name (next_gen) or KPI name (vlm_kpis)
CONTENT NVARCHAR(4000) Description (next_gen) or KPI definition (vlm_kpis)
RELEASE NVARCHAR(100) next_gen: release label (2602, H1 2026, Roadmap…)
AGENT_BASED NVARCHAR(3) next_gen: Yes | No
JOULE_BASED NVARCHAR(3) next_gen: Yes | No
VALUE_DRIVER NVARCHAR(200) vlm_kpis: e.g. Cost Reduction, Process Efficiency
VALUE_LEVER NVARCHAR(500) vlm_kpis: specific lever activated
KPI_ID NVARCHAR(50) vlm_kpis: SAP APM KPI Catalog ID
KPI_CATEGORY NVARCHAR(100) vlm_kpis: Throughput | Backlog | Process Progress | Changes | Master Data
KPI_TARGET NVARCHAR(1000) vlm_kpis: KPI Catalog link
CAPABILITY NVARCHAR(2000) vlm_kpis: Ariba capability enabling this KPI
KPI_FORMULA NVARCHAR(2000) vlm_kpis: calculation formula
KPI_MEAS_FREQ NVARCHAR(100) vlm_kpis: Daily | Weekly | Monthly
SOURCE_FILE NVARCHAR(200) Source filename
EMBEDDING REAL_VECTOR(3072) Gemini embedding

Embedding strategy per source type:

  • next_gen: "{title} — {content}"
  • vlm_kpis: "{pain_point} | {value_lever} | {kpi_name} | {capability}"

Current knowledge base contents:

source_type File Rows
next_gen SAP_Ariba_NextGen_Features.xlsx 83
vlm_kpis SAP_Ariba_VLM_Index_Complete.xlsx 86 (Buying 29, Sourcing 24, Contracts 17, SLP 16)

MCP Tools

Tool Server Description
query_single_pain_point both Single pain point query — retrieves similar cases
retrieve_knowledge_context both Parallel knowledge base search per source_type + documentation
list_ingested_solutions both Show row counts per solution in PAIN_POINTS
rate_recommendation both Quality feedback loop — updates QUALITY_SCORE
read_excel_painpoints local only Parse input Excel — auto-detects sheet, header row, language
retrieve_similar_cases_batch local only Parallel HANA vector search for all rows (circuit breaker)
write_excel_output local only Generate output xlsx with corporate format

Output Excel Format (Quick Reference Card spec)

Element Spec
Header fill #00144A
Header font Arial Bold 11pt White, centered, height 30px
Even rows #D1EFFF fill, Arial 10pt #444444
Odd rows #FFFFFF fill, Arial 10pt #444444
Outer border #002A86 medium
Inner border #EAECEE thin
Alignment top-left, wrap text

Output columns: Pain Point · Solution · [Solution Area] · Recommendations · Category · Effort · Timeline · Benefits · Documentation · Impact · Ariba Next-Gen · Value KPIs

Solution Area column is injected only when at least one input row contains it.


Ingestion

Pain points

python ingestion/ingest.py data/legacy/<file>.xlsx

Input Excel must have columns: Observation / Pain Point, Solution, optionally Solution Area, Category, Effort, Benefits, Timeline, Impact.

Knowledge base

# Next-gen roadmap features
python ingestion/ingest_knowledge.py data/legacy/SAP_Ariba_NextGen_Features.xlsx --source-type next_gen

# VLM KPI index
python ingestion/ingest_knowledge.py data/legacy/SAP_Ariba_VLM_Index_Complete.xlsx --source-type vlm_kpis

Supported --source-type values: next_gen, vlm_kpis, ai_scenarios, premium_services

To re-ingest VLM after a new file arrives:

DELETE FROM SVA2.KNOWLEDGE_BASE WHERE SOURCE_TYPE = 'vlm_kpis';

Then run the ingestion command above.


Key Design Decisions

Decision Rationale
Similarity threshold 0.55 Filters noise; only meaningful matches reach Joule
Quality weighting Exponential moving average (decay=0.8) from consultant feedback
Circuit breaker (batch) Aborts remaining if >50% tasks fail — prevents cascading timeouts
Solution-filtered retrieval next_gen: tries filtered first, fallback global; vlm_kpis: always filtered
Server-side documentation search SAP Help Portal API; replaces unreliable LLM web search
Blocked URL domains learning.sap.com, support.ariba.com — known to return invalid links
Language enforcement All output in same language as the pain point (langdetect with deterministic seed)
No Impact classification Always "To be assessed" — consultant-only field

Project Structure

SVA2.0/
├── server/
│   ├── server.py           ← FastMCP server (local: batch + single query)
│   ├── server_cf.py        ← FastMCP server (CF: single query only)
│   └── recommend.py        ← HANA retrieval, batch search, Excel reader/writer
├── shared/
│   ├── config.py           ← AI Core SDK init, HANA pool, taxonomy, embed_text()
│   └── instructions.py     ← Unified single-query mode instructions
├── ingestion/
│   ├── ingest.py           ← Ingest pain points into SVA2.PAIN_POINTS
│   ├── ingest_knowledge.py ← Ingest knowledge files into SVA2.KNOWLEDGE_BASE
│   └── ingest_qa_pdf.py    ← Extract Q&A pairs from PDF → KNOWLEDGE_BASE
├── schema/
│   ├── hana_schema.sql     ← SVA2.PAIN_POINTS DDL
│   └── knowledge_base.sql  ← SVA2.KNOWLEDGE_BASE DDL
├── tests/
│   ├── test_circuit_breaker.py  ← Circuit breaker resilience tests
│   └── test_output_format.py    ← Excel output formatting validation
├── tools/
│   └── telemetry.py        ← Log parser for similarity score analysis
├── data/
│   └── legacy/             ← Source Excel/PDF files for ingestion
├── manifest.yml            ← Cloud Foundry deployment config
├── requirements.txt
└── .env                    ← Credentials (not committed)

Setup

1. Install dependencies

pip install -r requirements.txt

2. Configure credentials

Create .env with:

# SAP AI Core (consumed by gen-ai-hub-sdk automatically)
AICORE_AUTH_URL=https://<subaccount>.authentication.<region>.hana.ondemand.com/oauth/token
AICORE_CLIENT_ID=...
AICORE_CLIENT_SECRET=...
AICORE_BASE_URL=https://api.ai.<region>.ml.hana.ondemand.com
AICORE_RESOURCE_GROUP=default

# Gemini Embedding deployment (from AI Launchpad → ML Operations → Deployments)
EMBEDDING_DEPLOYMENT_ID=...
EMBEDDING_MODEL_NAME=gemini-embedding

# SAP HANA Cloud
HANA_HOST=<uuid>.hana.<region>.hanacloud.ondemand.com
HANA_PORT=443
HANA_USER=DBADMIN
HANA_PASSWORD=...
HANA_SCHEMA=SVA2

3. Create HANA schema

Run in HANA Cloud SQL console — in order:

CREATE SCHEMA SVA2;

Then execute schema/hana_schema.sql and schema/knowledge_base.sql.

4. Ingest data

python ingestion/ingest.py data/legacy/<pain_points_file>.xlsx
python ingestion/ingest_knowledge.py data/legacy/SAP_Ariba_NextGen_Features.xlsx --source-type next_gen
python ingestion/ingest_knowledge.py data/legacy/SAP_Ariba_VLM_Index_Complete.xlsx --source-type vlm_kpis

5. Run MCP server locally

# HTTP mode — for Joule Desktop (streamable-HTTP, port 8000 by default)
python server/server.py --http

# Custom port
python server/server.py --http --port 9000

# stdio mode — for Claude Desktop
python server/server.py

The HTTP server binds to 127.0.0.1:8000 and exposes the MCP endpoint at:

http://127.0.0.1:8000/mcp

Logs are written to both stderr and mcp_server.log in the project root.

6. Deploy to Cloud Foundry

cf push

Production endpoint (single-query mode only):

https://<your-app>.cfapps.<region>.hana.ondemand.com/mcp

7. Connect Joule Desktop

Add the MCP server in Joule Desktop settings pointing to:

  • Local: http://127.0.0.1:8000/mcp
  • CF: https://<your-app>.cfapps.<region>.hana.ondemand.com/mcp

Testing

# Run all tests
python -m pytest tests/ -v

# Individual suites
python -m pytest tests/test_circuit_breaker.py -v   # Circuit breaker resilience
python -m pytest tests/test_output_format.py -v     # Excel output formatting

Telemetry

Parse mcp_server.log for similarity scores, batch metrics, and circuit breaker events:

python tools/telemetry.py                  # Default log file
python tools/telemetry.py --json           # JSON output
python tools/telemetry.py path/to/log.log  # Custom path

BTP Services Required

Service Plan Purpose
SAP AI Core standard Gemini Embedding deployment
SAP HANA Cloud hana Vector store (PAIN_POINTS + KNOWLEDGE_BASE)
SAP HANA Cloud tools HANA Cloud Central UI + SQL console
Joule Work Desktop LLM reasoning + user-facing chat interface

Cloud Foundry Deployment

# manifest.yml
applications:
  - name: ava
    command: python server/server_cf.py --http --port $PORT
    buildpacks: [python_buildpack]
    memory: 512M
    disk_quota: 1G
    instances: 1
    routes:
      - route: <your-app>.cfapps.<region>.hana.ondemand.com

Secrets are set via cf set-env ava <KEY> <VALUE> (never committed).

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选