Edge Model Usability Verification Component User Guide

Edge Model Usability Verification Component User Guide

Overview

This component verifies that the edge model (Ollama/qwen2:7b) is capable of performing scheduling decisions and object generation tasks in the industrial intelligent agent platform.

Enabling

Set the following in the .env file:

```bash

EDGE_PROOF_ENABLED=true

EDGE_PROOF_OLLAMA_MODEL=qwen2:7b

EDGE_PROOF_TIMEOUT_MS=600000

EDGE_PROOF_LATENCY_THRESHOLD_MS=30000

EDGE_PROOF_THROUGHPUT_MIN=2

EDGE_PROOF_SUCCESS_RATE_MIN=0.6

EDGE_PROOF_CONSISTENCY_REPEAT=5

`

Takes effect after restarting the service. When EDGE_PROOF_ENABLED=false, it has zero impact on the existing system.

API Endpoints

1. Run Full Verification

`

POST /api/edge-proof/run

`

Body: { "instructions": [...], "tasks": [...], "rollbackOnComplete": true }

2. Query Verification Status

`

GET /api/edge-proof/status

`

3. Get Verification Report

`

GET /api/edge-proof/report/:verificationId

`

4. Manually Back Up Configuration

`

POST /api/edge-proof/config/backup

`

5. Manually Roll Back Configuration

`

POST /api/edge-proof/config/rollback/:snapshotId

`

6. Run Scheduling Decision Verification Independently

`

POST /api/edge-proof/verify/routing

`

7. Run Generation Task Verification Independently

`

POST /api/edge-proof/verify/generation

`

8. Run Capability Benchmark Verification Independently

`

POST /api/edge-proof/verify/benchmark

`

Three Major Verification Scenarios

EMV-001: Edge-Side Scheduling Decision Verification

Verify the correctness of MTClaw using Ollama for L1/L2/L3 routing decisions.

  • Built-in test instructions: Create Part object → L2, System health check → L1, Develop supply chain risk response strategy → L3

EMV-002: Edge-Side Generation Task Verification

Verify the capability of create-type tasks to first attempt generating JSON parameters via edge-side Ollama.

  • Built-in test tasks: Create Part, Create BOM, Create Vendor
  • Automatically fallback to cloud DeepSeek when edge-side fails.

EMV-003: Edge-Side Capability Benchmark Verification

Quantitatively evaluate the edge model's instruction understanding, latency, throughput, and overall success rate.

  • Latency threshold: 80% of samples under 30 seconds
  • Throughput threshold: ≥2 times/minute
  • Overall success rate threshold: ≥60%

Fallback chain

`

MTClaw (L1 keyword) → Ollama (L2 on-device inference) → DeepSeek (L3 cloud large model)

`

When EDGE_PROOF_ENABLED=true and intent='object_create':

`

Ollama (L2 on-device first) → DeepSeek (L3 cloud fallback)

`

Configuration rollback

At validation startup, configuration files (.function-router/config.json, .env, models.json) are automatically backed up and automatically rolled back after validation completes. Manual operations are also available:

`bash

Backup

curl -X POST http://localhost:3006/api/edge-proof/config/backup

Rollback

curl -X POST http://localhost:3006/api/edge-proof/config/rollback/

`

Validation report interpretation

The report contains the following fields:

  • overallConclusion: pass/fail/partial
  • scenarios: detailed conclusions of the three sub-scenarios
  • configSnapshot: configuration snapshot information and rollback status
  • markdown: human-readable Markdown report

Running tests

`bash

Unit tests

node server/core/edge-proof/__tests__/unit.test.js

End-to-end tests (requires Ollama and MTClaw running)

node server/core/edge-proof/__tests__/e2e.test.js

``

Configuration variable descriptions

VariableDefaultDescription
EDGE_PROOF_ENABLEDfalseEnables the validation component
EDGE_PROOF_OLLAMA_MODELqwen2:7bOn-device model name
EDGE_PROOF_TIMEOUT_MS600000Maximum total validation duration (10 minutes)
EDGE_PROOF_LATENCY_THRESHOLD_MS30000Latency threshold
EDGE_PROOF_THROUGHPUT_MIN2Minimum throughput (times/minute)
EDGE_PROOF_SUCCESS_RATE_MIN0.6Minimum overall success rate
EDGE_PROOF_CONSISTENCY_REPEAT5Number of consistency check repetitions
← 返回案例列表

Try 左帮右臂 Industrial Agent — your digital workforce

Available as a WeChat mini program, web app (ylxt.chat) and desktop client. Start from whichever fits your workflow.

🌐 Web App 💻 Desktop Download 📞 Call 189-8606-6876
WeChat mini program QR
Scan for the WeChat mini program
Share:
🤖 Try Now →
🤖
🎁