northseadl/norix-skills / llm-agent-dev
llm-agent-dev
UnverifiedLLM Agent engineering: pattern selection (12-mode matrix), data simulation, convergence iteration. Covers intent routing, function calling, ReAct, MCP, prompt chaining, guardrails, evaluation.
references/scenarios/knowledge-qa.md
View on GitHub# 场景蓝图: 知识问答 Agent
> 基于企业知识库的智能问答与信息检索 Agent
> 参考: Perplexity, Glean, Notion AI Q&A
## 用户旅程
```
提问 → 理解意图 → 检索知识 → 推理综合 → 回答 + 引用来源
```
## 架构
```
用户输入
│
▼
[意图分类 LLM]
│
├─ 精确查询 ──→ ① CREX → FAQ 缓存/数据库直查
├─ 模糊搜索 ──→ ③ FC + RAG → 检索 → 排序 → 生成答案
├─ 多知识源 ──→ ⑩ Parallel → 并行检索多个知识库 → 合并
├─ 深度研究 ──→ ⑤ ReAct → 多步检索 → 交叉验证 → 综合
├─ 对比分析 ──→ ⑪ Orchestrator → 收集资料 → 多维对比 → 摘要
└─ 文档生成 ──→ ⑨ Chain → 收集 → 大纲 → 草稿 → 润色
```
## 模式选型
| 场景 | 模式 | 延迟 | 说明 |
|------|------|------|------|
| FAQ | ① CREX | < 500ms | 精确匹配高频问题 |
| 单知识源问答 | ③ FC + RAG | 1-3s | 检索 + 生成 |
| 多源问答 | ⑩ Parallel | 2-5s | 并行检索合并 |
| 深度研究 | ⑤ ReAct | 5-20s | 多步推理 |
| 文档生成 | ⑨ Chain | 10-30s | 链式流水线 |
## RAG 集成关键
```
┌──────────────────────────────────────────────┐
│ RAG Pipeline │
│ │
│ Query → [Query Rewriting] → 优化检索查询 │
│ │ │
│ ▼ │
│ [Hybrid Search] → 向量检索 + 关键词检索 │
│ │ │
│ ▼ │
│ [Re-ranking] → 按相关性重排序 │
│ │ │
│ ▼ │
│ [Context Assembly] → 组装上下文 │
│ │ │
│ ▼ │
│ [LLM Generation] → 基于上下文生成答案 + 引用 │
└──────────────────────────────────────────────┘
```
## 关键设计要点
1. **答案必须有引用**: 每个断言标注来源文档
2. **"我不知道" 能力**: 知识库中无相关信息时明确告知
3. **时效性标注**: 标注知识的更新时间,过期知识需标记
4. **多轮追问**: 支持基于上一个答案的深入追问
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |