# Knowledge Base

> Knowledge Base

- Skill: `incidentfox/knowledge-base-2` (Agent Skill)
- Install (CLI): `npx skillmds@latest add incidentfox/knowledge-base-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/incidentfox/knowledge-base-2/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: incidentfox (https://skillmd.com/u/incidentfox)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/incidentfox/knowledge-base-2

---

# Knowledge Base

Query, search, teach, and manage the team's self-learning knowledge base.

## Available scripts

### Querying
- `python scripts/query_knowledge.py "your question"` — RAG retrieval with ranked results, confidence scores, and temporal metadata
- `python scripts/search_knowledge.py "topic" --limit 10` — Semantic search over all knowledge nodes

### Teaching
- `python scripts/teach_knowledge.py "new knowledge statement"` — Teach the agent new information
- `python scripts/ingest_url.py "https://docs.example.com"` — Ingest a web page or document URL

### Status
- `python scripts/knowledge_stats.py` — Check knowledge base size, health, and last update time
- `python scripts/weekly_report.py` — Generate weekly learning report with activity stats

## When to use

- **ALWAYS query the knowledge base first** before answering team-specific questions
- Use `query_knowledge.py` for questions — it returns ranked results with confidence and dates
- Use `search_knowledge.py` for broad exploration of what the agent knows
- Use `teach_knowledge.py` when you discover new information in the conversation
- Use `ingest_url.py` when a user shares a link they want the bot to learn from

## Important behaviors

- If query returns results with dates, include temporal context in your answer ("As of [date]...")
- If results are older than 30 days for fast-moving topics, flag: "Note: this may be outdated"
- If you find conflicting results, flag the contradiction explicitly
- If confidence is low (<30%), say you're not sure and suggest asking a teammate
- After answering, if the user provides new information, teach it using teach_knowledge.py

