When you're hard-coding your 3rd scoring if-else, maybe it's time to ask: can I move the rules into YAML and let the business change config instead of code?
Every Agent developer faces the same dilemma โ every business scenario rewrites a similar pipeline:
The skeleton is identical. What changes is only the "content" at each step. Yet every team builds pipelines from scratch.
teleagent-skills offers an answer:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Upper Business Skill โ
โ (Scoring Engine / Evidence Chain / Data Aggregator / ...) โ
โโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโ
โ โ โ โ
โผ โผ โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Phase 1 โโ Phase 2 โโ Phase 3 โโ Phase 4 โ
โ Extract โโ Analyze โโ Generate โโ Archive โ
โ โโ โโ โโ โ
โInfo- โโData- โโReport- โโArchive- โ
โExtractor โโAnalyst โโGenerator โโManager โ
โโโโโโฌโโโโโโโโโโโโฌโโโโโโโโโโโโฌโโโโโโโโโโโโฌโโโโโโ
โ โ โ โ
โผ โผ โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ JSON Contract (Structured Data Contract) โ
โ phase1_output.json โ phase2_input.json โ ... โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Core idea: each Phase is an independent component, and Phases pass data only through JSON contracts.
{
"phase": "extract",
"skill": "scoring-engine",
"output": {
"entities": [
{
"name": "ๅฎขๆทA",
"type": "enterprise_customer",
"attributes": {
"annual_revenue": 50000000,
"employee_count": 320,
"industry": "ๅถ้ "
}
}
],
"metadata": {
"extraction_time": "2026-07-01T10:30:00Z",
"source": "CRM_API",
"confidence": 0.92
}
},
"next_phase": "analyze"
}
The traditional approach hard-codes scoring rules:
if customer.revenue > 10000000:
score += 30
elif customer.revenue > 5000000:
score += 20
teleagent-skills does it differently โ all rules are externalized to YAML:
scoring_engine:
name: "ๆฟไผๅฎขๆทๅๆบ่ฏๅ"
version: "2.1"
dimensions:
- id: revenue
name: "่ฅๆถ่งๆจก"
weight: 0.30
rules:
- condition: "attributes.annual_revenue >= 100000000"
score: 30
label: "่ถ
ๅคงๅ"
- condition: "attributes.annual_revenue >= 50000000"
score: 20
label: "ๅคงๅ"
- condition: "attributes.annual_revenue >= 10000000"
score: 10
label: "ไธญๅ"
- id: industry
name: "่กไธๅฑๆง"
weight: 0.25
rules:
- condition: "attributes.industry in ['้่','ๅป็']"
score: 25
label: "้ซไปทๅผ่กไธ"
- id: growth
name: "ๅข้ฟๆฝๅ"
weight: 0.20
- id: connectivity
name: "ๆฅๅ
ฅๆ็ๅบฆ"
weight: 0.15
- id: decision_chain
name: "ๅณ็ญ้พๆธ
ๆฐๅบฆ"
weight: 0.10
thresholds:
high: 70
medium: 40
low: 0
Business changed? Edit YAML. Need a new dimension? Add YAML. Zero code changes.
All 5 Skills share the same 4-Phase skeleton, but each Skill's Phase behavior differs:
| Skill | Phase 1 Extract | Phase 2 Analyze | Phase 3 Generate | Phase 4 Archive |
|---|---|---|---|---|
| Scoring Engine | ||||
| Extract scoring object attributes | Load YAML rules & match scores | Generate scoring report + recommendations | Archive scoring records | |
| Evidence Chain | ||||
| Extract evidence from multiple sources | Cross-validate + conflict detection | Generate evidence chain report | Archive validation records | |
| Data Aggregator | ||||
| Validate & clean raw data | Aggregation + YoY/MoM calculation | Output statistical report | Archive aggregated results | |
| Visualization Renderer | ||||
| Analyze data characteristics | Generate ECharts config | Render HTML/Dashboard | Cache chart assets | |
| NL2Query | ||||
| Extract query intent + entities | Build SQL + confidence assessment | Format query results | Record query logs |
The power of composability: upper-level Skills can chain lower-level Skills on demand. For example, the data query gateway pipeline:
NL2Query(Phase1-2) โ Data Aggregator(Phase1-2) โ Visualization Renderer(Phase1-3)
One natural language query automatically flows through "understand โ query โ aggregate โ visualize" end to end.
The 4-Phase architecture has built-in 3-tier degradation:
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Phase 1 โโโโโโถโ Phase 2 โโโโโโถโ Phase 3 โโโโโโถโ Phase 4 โ
โ Extract โ โ Analyze โ โ Generate โ โ Archive โ
โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ
โ โ โ โ
โผ โผ โผ โผ
โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ
โ Return โ โ Skip โ โ Simplify โ โ Local โ
โ raw โ โ analysis โ โ template โ โ cache + โ
โ input + โ โ mark low โ โ raw data โ โ deferred โ
โ conf=0 โ โ confidenceโ โ passthroughโ โ retry โ
โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ
The core principle of degradation: I'd rather give the user a low-confidence result than crash with an error.
What it is: A multi-dimensional weighted scoring component driven by YAML rule configs.
Typical scenarios: enterprise opportunity scoring, vendor evaluation, customer churn prediction, partner tiering.
Input โ Rule matching โ Scoring output flow:
{
"customer": "ๅฎขๆทA",
"total_score": 78,
"grade": "A็บง-้็น่ท่ฟ",
"dimension_breakdown": {
"revenue": { "score": 20, "max": 30, "label": "ๅคงๅ" },
"industry": { "score": 15, "max": 25, "label": "ไธญไปทๅผ่กไธ" },
"growth": { "score": 20, "max": 20 },
"connectivity": { "score": 15, "max": 15 },
"decision_chain": { "score": 8, "max": 10 }
},
"recommendation": "ๅปบ่ฎฎๅฎๆไธๅฑๅฎขๆท็ป็๏ผไผๅ
ๆจ่5Gไธ็ฝ+ไบ็ฝ่ๅๆนๆก"
}
What it is: A multi-source evidence cross-validation component that detects conflicts, evaluates confidence, and pinpoints root causes.
Data Source 1: Customer complaints โโโ
โ โโโโโโโโโโโโโโโโโโโโ
Data Source 2: System alert logs โโโผโโโโโถโ Evidence Chain โ
โ โ Phase2: Analyze โ
Data Source 3: SLA monitoring data โโโ โโโโโโโโโโฌโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Cross-validation: โ
โ โข Complaint: "2hr outage"
โ โข Alert: "optical attenuation"โ
โ โข SLA: "99.1% availability" โ
โ Conflict detected: โ
โ Complaint vs SLA surface contradictionโ
โ Root cause="optical attenuation": 0.87โ
โโโโโโโโโโโโโโโโโโโโโโโโโ
What it is: A raw data re-processing component supporting validation/cleaning, aggregation, YoY/MoM, and TOP rankings.
Raw query results Aggregator output
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 300 rows of โโโโโโโโโถ โ Monthly summary + YoY/MoM โ
โ detail data โ โ TOP10 ranking โ
โ (region x โ โ Anomaly flags (>2ฯ) โ
โ month) โ โ Trend direction โ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
What it is: An automated rendering component that turns structured data into ECharts charts and Dashboards.
Chart type selection is automatic: time-series โ line chart, categorical โ bar/pie, multi-dimensional โ radar.
What it is: A smart natural-language-to-structured-query conversion component.
User input: "ๅไธๅบไธๆ5Gไธ็ฝๆฐๅขๅฎขๆทๆฐ"
Phase1 Extract: intent="query", entities=[region="ๅไธ", time="ไธๆ", metric="5Gไธ็ฝ"]
Phase2 Analyze: Generate SQL + confidence 0.88
Phase3 Generate: Format results
Phase4 Archive: Record query log
Confidence scoring: When confidence drops below a threshold, the output gets a "low confidence" warning and shows the SQL for human review.
| Industry | Scoring Engine | Evidence Chain | Data Aggregator | Viz Renderer | NL2Query |
|---|---|---|---|---|---|
| Finance | |||||
| Customer credit rating | Anti-money-laundering multi-source verification | Transaction volume YoY/MoM | Risk control dashboard | "Check a customer's last 3 months of transactions" | |
| Manufacturing | |||||
| Supplier evaluation | QA vs. production line verification | Line OEE statistics | Capacity dashboard | "Check line A's yield this month" | |
| Retail | |||||
| Member value scoring | Data conflict detection | SKU sales aggregation | Sales heatmap | "Top sellers in East China" | |
| Healthcare | |||||
| Patient risk stratification | Diagnosis vs. lab verification | Department admission stats | Bed occupancy dashboard | "Available beds in cardiology" |
Key insight: All 5 Skills adapt to different industries purely through YAML rule configs. The scoring engine code logic is identical โ only the YAML files differ.
| Dimension | LangChain/LlamaIndex | AutoGen/CrewAI | teleagent-skills |
|---|---|---|---|
| Orchestration | Code-level Chain | Multi-Agent dialogue | 4-Phase declarative orchestration |
| Rule management | Hard-coded in code | Described in prompts | YAML parameterized config |
| Degradation strategy | try-catch | Retry dialogue | Declarative degradation config |
| Business adaptation | Change code | Change prompts | Change YAML |
git clone https://github.com/yuzhaopeng-up/teleagent-skills.git
cd teleagent-skills
cp skills/scoring-engine/config/scoring_rules.yaml my_rules.yaml
License: Apache 2.0
| Repo | What It Does | GitHub |
|---|---|---|
| financial-ai-skills | ||
| Financial AI skill library: 104 scenarios, pure Python | ||
Stop building pipelines from scratch. The 4-Phase skeleton is ready โ you just need to write YAML.
Star teleagent-skills and let's standardize Agent Skills together.