feat: smart master selection + expanded keywords (6→24 per master)

- /compare-masters now uses keyword matching from meta.json search_scope.keywords
- 3-tier selection: user-specified → keyword matching → topic fallback
- Expanded each master's keywords to 15-25 core concepts (avg 24)
- Document --masters manual override in README

Selection improvements verified:
- '遍行因' → xuanzang (5 matches)
- '明心见性' → huineng (3 matches)
- '空性/中观' → kumarajiva + huineng
- '念佛' → yinguang + ouyi + xuyun
This commit is contained in:
xianren
2026-04-05 09:07:24 +08:00
parent 02df9344b5
commit 6446903daf
10 changed files with 212 additions and 25 deletions
+18
View File
@@ -64,6 +64,24 @@ cd Buddha-skill && pip install -r requirements.txt
/xuyun — 虚云老和尚(禅宗·五宗兼嗣)
```
### 多法师对比
同一问题由 2-3 位法师并列回答,展现宗派视角差异:
```
# 自动选择相关法师
/compare-masters 什么是空性
# 手动指定法师(推荐,结果更精准)
/compare-masters 什么是遍行因 --masters xuanzang,zhiyi,ouyi
# 自然语言触发
请慧能和印光对比回答"如何看待念佛"
比较禅宗和净土宗对修行的看法
```
**选择逻辑**:系统先尝试从用户提问中提取关键词,与每位法师的核心概念匹配;若无强匹配,则按主题映射兜底(念佛/禅修/唯识中观/判教等)。**如果自动选的法师不符合预期,直接用 `--masters` 手动指定**。
### 自定义生成
```