krag-system-design
Skill4 starsChanged 5 months agoApache-2.0View on GitHub
Design compact, production-sensible Knowledge Graph-Augmented Retrieval systems. Use when defining KRAG or GraphRAG architecture, graph role, retrieval strategy, provenance model, backlog, or technical design tasks.
In this repository114 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- accessibility-wcagSkill
- agentic-ux-patternsSkill
- ai-model-governanceSkill
- api-design-and-lifecycleSkill
- apply-laws-of-aiSkill
- bdd-practiceSkill
- browser-testing-with-devtoolsSkill
- business-capability-modelingSkill
- business-information-concept-modelingSkill
- capability-maturity-assessmentSkill
- cdc-and-source-to-stream-ingestionSkill
- ci-cd-and-automationSkill
- cloud-platform-architectureSkill
- code-review-and-qualitySkill
- cognitive-bias-reviewSkill
- conceptual-data-modelingSkill
- context-engineeringSkill
- data-contract-designSkill
- data-governance-and-qualitySkill
- data-integration-and-interoperabilitySkill
- data-lifecycle-and-retention-managementSkill
- data-lineage-and-provenanceSkill
- data-product-dashboard-designSkill
- data-product-designSkill
- data-security-and-privacy-architectureSkill
- ddd-practiceSkill
- deprecation-and-migrationSkill
- design-system-practiceSkill
- documentation-and-adrsSkill
- dora-four-keysSkill
- dry-principleSkill
- eip-integration-validationSkill
- evaluation-and-monitoringSkill
- event-driven-architectureSkill
- event-governance-and-lineageSkill
- event-modelingSkill
- event-streaming-platform-designSkill
- exception-handling-and-recoverySkill
- finops-practiceSkill
- frontend-state-and-interaction-designSkill
- git-workflow-and-versioningSkill
- goal-setting-and-monitoringSkill
- guardrails-safety-patternsSkill
- human-in-the-loopSkill
- idea-refinementSkill
- incident-response-and-postmortemsSkill
- incremental-implementationSkill
- infrastructure-as-codeSkill
- integration-message-constructionSkill
- inter-agent-communication-a2aSkill
- kiss-principleSkill
- knowledge-graph-ragSkill
- knowledge-retrieval-ragSkill
- krag-evaluation-governanceSkill
- krag-ingestion-graph-constructionSkill
- krag-retrieval-answeringSkill
- lakehouse-and-medallion-architectureSkill
- learning-and-adaptationSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 9 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Use when designing the end-to-end architecture, graph role, provenance model, retrieval role or implementation slices for a KRAG or …
- Distinctive: line 36
Evidence model: every answerable claim must trace to source spans, tables, records, or authoritative systems.
- Distinctive: line 40
Use this minimal component model unless the repository already has one:
- Distinctive: line 48
Evaluator: test retrieval, grounding, graph quality, answer quality, latency, cost, safety, and drift.
- Distinctive: line 52
Do not create triples without source evidence.
- Distinctive: line 53
Do not store only chunks when document structure, claims, tables, sections, or entities are needed.
- Distinctive: line 54
Do not let LLM-generated graph writes bypass schema validation.
- Distinctive: line 55
Do not conflate ontology classes, instance entities, concepts, claims, and evidence spans.
- Distinctive: line 56
Do not answer from graph neighbourhood alone.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
KRAG System Design
When to use
Use when designing the end-to-end architecture, graph role, provenance model, retrieval role or implementation slices for a KRAG or GraphRAG system.
Objective
Design a Knowledge Graph-Augmented Retrieval system where the graph materially improves retrieval, reasoning, provenance, navigation, governance, or explainability.
Procedure
- Classify the primary question class and intended graph role.
- Choose storage, reasoning, and evidence models explicitly.
- Outline the reference architecture from ingestion through evaluation.
- State non-negotiable invariants for evidence, schema, and writes.
- Define retrieval strategy, ranking signals, and abstention rules.
- Produce architecture summary, schema outline, evaluation gates, and thin-slice backlog.
Core decisions
Make these explicit before designing:
- Question class: lookup, semantic search, relationship traversal, impact analysis, regulatory traceability, root-cause analysis, summarisation, or cross-document reasoning.
- Graph role: resource catalogue, semantic index, evidence graph, domain graph, control graph, lineage graph, or operational twin.
- Storage pattern: property graph, RDF/OWL, hybrid, graph-native vector index, or external vector store.
- Reasoning level: deterministic traversal/rules, LLM-assisted inference, probabilistic ranking, or external ontology reasoning.
- Evidence model: every answerable claim must trace to source spans, tables, records, or authoritative systems.
Reference architecture
Use this minimal component model unless the repository already has one:
- Ingestion: parse source, preserve structure, create evidence anchors, extract candidate entities/relations/claims.
- Normalisation: canonicalise identifiers, deduplicate entities, map to ontology/schema, score confidence.
- Graph store: persist resources, evidence, entities, concepts, relationships, provenance, versions, and constraints.
- Retrieval planner: classify question, select graph/vector/keyword/hybrid strategy, generate safe graph queries.
- Ranker: combine semantic similarity, graph proximity, source authority, recency, and confidence.
- Answerer: synthesise grounded response with citations, uncertainty, and abstention when support is weak.
- Evaluator: test retrieval, grounding, graph quality, answer quality, latency, cost, safety, and drift.
Non-negotiable invariants
- Do not create triples without source evidence.
- Do not store only chunks when document structure, claims, tables, sections, or entities are needed.
- Do not let LLM-generated graph writes bypass schema validation.
- Do not conflate ontology classes, instance entities, concepts, claims, and evidence spans.
- Do not answer from graph neighbourhood alone; require supporting evidence or explicit rule-derived facts.
Output format
Return:
- Architecture summary.
- Graph schema outline.
- Retrieval strategy.
- Evaluation gates.
- Key trade-offs and risks.
- Implementation backlog in thin vertical slices.
Related skills
knowledge-graph-rag— Neo4j-native KG-backed retrieval implementation guidanceontology-and-knowledge-graph-modeling— ontology and semantic graph designkrag-ingestion-graph-construction— ingestion and evidence graph constructionkrag-retrieval-answering— retrieval planning, ranking and answer synthesiskrag-evaluation-governance— KRAG-specific evaluation and governance
References
Verification
- Architecture, graph role and retrieval strategy are explicit.
- Evidence and provenance invariants are stated.
- Evaluation gates and implementation slices are defined.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

