document-rag-pipeline-build-knowledge-base
Sub-skill of document-rag-pipeline: Build Knowledge Base (+2).
Best use case
document-rag-pipeline-build-knowledge-base is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of document-rag-pipeline: Build Knowledge Base (+2).
Teams using document-rag-pipeline-build-knowledge-base should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/build-knowledge-base/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How document-rag-pipeline-build-knowledge-base Compares
| Feature / Agent | document-rag-pipeline-build-knowledge-base | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sub-skill of document-rag-pipeline: Build Knowledge Base (+2).
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Build Knowledge Base (+2)
## Build Knowledge Base
```bash
# Full pipeline with OCR and embeddings
python build_knowledge_base.py /path/to/documents --embed
# Skip OCR (faster, text PDFs only)
python build_knowledge_base.py /path/to/documents --no-ocr --embed
# Just build inventory (no extraction)
python build_knowledge_base.py /path/to/documents
```
## Search Documents
```bash
# Semantic search
python build_knowledge_base.py /path/to/documents --search "subsea wellhead design"
# More results
python build_knowledge_base.py /path/to/documents --search "fatigue analysis" --top-k 20
```
## Quick Search Script
```bash
#!/bin/bash
# search_docs.sh - Quick semantic search
DB_PATH="${1:-/path/to/_inventory.db}"
QUERY="$2"
CUDA_VISIBLE_DEVICES="" python3 -c "
import sqlite3, pickle, numpy as np
from sentence_transformers import SentenceTransformer
model = SentenceTransformer('all-MiniLM-L6-v2')
query_emb = model.encode('$QUERY', normalize_embeddings=True)
conn = sqlite3.connect('$DB_PATH')
cursor = conn.cursor()
cursor.execute('''
SELECT tc.chunk_text, tc.embedding, d.filename
FROM text_chunks tc
JOIN documents d ON tc.document_id = d.id
WHERE tc.embedding IS NOT NULL
ORDER BY RANDOM() LIMIT 50000
''')
results = []
for text, emb_blob, filename in cursor.fetchall():
emb = pickle.loads(emb_blob)
sim = float(np.dot(query_emb, emb))
results.append((sim, filename, text[:200]))
for score, fname, text in sorted(results, reverse=True)[:10]:
print(f'[{score:.3f}] {fname}')
print(f' {text}...\n')
"
```Related Skills
domain-knowledge-sweep
Systematic multi-source research of an engineering domain. Spawns parent issue → 6 research subissues (Standards, Academic, Industry, LinkedIn-marketing, Code-audit, Synthesis) → gap implementation subissues. Replaces LinkedIn-only extraction with defensible comprehensive sourcing.
public-knowledge-graph-governance
Maintain public-safe knowledge graph artifacts for llm-wiki and similar markdown knowledge bases. Use when changing graph generators, validators, schema docs, weekly freshness checks, or public/private source-scope boundaries.
teams-meeting-pipeline
Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.
solidworks-to-blender-pipeline
Use when converting SolidWorks .sldprt/.sldasm geometry to Blender for rendering, animation, or visualization, including questions about STEP export settings, FreeCAD as a bridge, or which mesh format (STL/OBJ/GLTF) to choose.
improve-codebase-architecture
Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable.
workspace-knowledge-doc-contracts
Class-level workspace knowledge, LLM-wiki, repo mission contracts, stale doc references, semantic taxonomy, and knowledge-source reconnaissance.
wave-based-parallel-plan-execution
Orchestrate phase execution by discovering dependencies, grouping into waves, spawning subagents, and collecting results with optional wave filtering
portable-config-baseline-pattern
Extract machine-agnostic settings into portable template files while keeping machine-specific hooks and plugins separate
portable-baseline-pattern-implementation
Implement portable configuration baselines by separating machine-agnostic settings from machine-specific hooks and plugins
portable-baseline-pattern-extraction
Extract and separate portable baseline config from machine-specific overrides in multi-environment projects
portable-baseline-configuration-pattern
Separate portable/universal config from machine-specific settings to enable safe template reuse across environments
portable-baseline-config-pattern
Separate machine-portable baseline config from environment-specific hooks and plugins