krag-ingestion-graph-construction
Skill4 starsChanged 5 months agoApache-2.0View on GitHub
Build KRAG ingestion and graph-construction pipelines from documents, records, metadata, ontologies, or enterprise systems. Use when implementing parsing, extraction, entity resolution, provenance, graph schema, constraints, and quality gates.
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-retrieval-answeringSkill
- krag-system-designSkill
- lakehouse-and-medallion-architectureSkill
- learning-and-adaptationSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Use when implementing or reviewing the ingestion, extraction, evidence anchoring, entity resolution, graph validation or graph-loading path …
- Distinctive: line 34
Anchor evidence: create stable anchors for spans, cells, pages, offsets, or record fields.
- Distinctive: line 42
Use distinct node types unless the project schema says otherwise:
- Very specific: line 54
Every extracted node/edge must have derived_from or equivalent evidence linkage.
- Very specific: line 55
Use domain verbs for relationships, not generic RELATED_TO, unless still a candidate.
- Very specific: line 56
Add confidence, extraction_method, extractor_version, validated_by, and valid_time where decisions depend on reliability or temporality.
- Distinctive: line 57
Keep source structure separate from semantic meaning.
≈ “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 Ingestion and Graph Construction
When to use
Use when implementing or reviewing the ingestion, extraction, evidence anchoring, entity resolution, graph validation or graph-loading path of a KRAG system.
Objective
Convert sources into a validated, evidence-backed graph that supports retrieval, reasoning, navigation, and auditability.
Procedure
- Register the source resource with stable identifiers and provenance metadata.
- Parse and preserve document structure down to evidence-bearing elements.
- Anchor evidence spans with locators, confidence, and parser provenance.
- Extract candidate entities, concepts, relationships, and claims.
- Normalise identifiers, resolve entities, and map concepts to governed vocabulary.
- Validate against schema, cardinality, and mandatory provenance rules.
- Promote accepted facts while retaining rejected candidates for audit.
Pipeline
- Register resource: assign stable
resource_id, source URI/path, owner, licence, classification, version, checksum, timestamps. - Parse structure: preserve document hierarchy: document, part, section, heading, paragraph, table, row, figure, footnote, appendix.
- Anchor evidence: create stable anchors for spans, cells, pages, offsets, or record fields. Store text, locator, confidence, parser, and source version.
- Extract candidates: entities, concepts, relationships, claims, obligations, controls, outcomes, systems, teams, metrics, events, dates.
- Normalise: canonical names, IDs, aliases, entity resolution, concept mapping, ontology/class assignment.
- Validate: schema constraints, allowed relationship types, cardinality, mandatory provenance, confidence thresholds, duplicate detection.
- Promote: mark accepted facts separately from candidate facts. Preserve rejected candidates for audit where useful.
Minimal graph pattern
Use distinct node types unless the project schema says otherwise:
Resource: whole source asset.StructuralElement: section, paragraph, table, row, figure, etc.EvidenceAnchor: source-grounded span, cell, page, record, or locator.Entity: real-world thing, organisation, system, person, team, product, regulation, control.Concept: taxonomy/ontology concept.Claim: asserted proposition that requires evidence.Relationship: domain edge represented as a typed graph relationship where possible; reify only when it needs evidence, time, confidence, or qualifiers.
Edge rules
- Every extracted node/edge must have
derived_fromor equivalent evidence linkage. - Use domain verbs for relationships, not generic
RELATED_TO, unless still a candidate. - Add
confidence,extraction_method,extractor_version,validated_by, andvalid_timewhere decisions depend on reliability or temporality. - Keep source structure separate from semantic meaning; connect them through evidence anchors.
Anti-patterns
- Chunk-only ingestion with no structural or semantic model.
- LLM extraction directly persisted as trusted graph facts.
- Overly broad ontologies before observing real query patterns.
- Duplicate entities caused by missing identifier strategy.
- Relationship labels that do not read as real-world predicates.
Output format
Return ingestion design, graph schema changes, validation rules, idempotency strategy, test cases, and failure handling.
Related skills
knowledge-graph-rag— graph-native KRAG implementation guidanceontology-and-knowledge-graph-modeling— semantic model and graph schema designdata-lineage-and-provenance— source-to-target provenance disciplinekrag-system-design— end-to-end KRAG system architecturekrag-evaluation-governance— ingestion and graph quality gates
References
Verification
- Source structure, evidence anchors and semantic entities remain distinct.
- Validation and provenance rules are explicit.
- Failure handling and idempotency approach 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.

