validate
Skill này làm gì
Skill kiểm tra chất lượng của pipeline, dữ liệu đã trích xuất, cấu trúc đồ thị và ontology trong Semantica. Skill dành cho người muốn tìm vấn đề trước khi chúng ảnh hưởng đến kết quả.
Khi nào nên dùng
- ✓Khi bạn muốn kiểm tra cấu hình pipeline dữ liệu trước khi chạy.
- ✓Khi bạn muốn xác nhận các thực thể và quan hệ đã trích xuất có chất lượng tốt.
- ✓Khi bạn cần danh sách kiểm tra các lỗi và cảnh báo cho một đồ thị hoặc ontology.
Liên kết skill
https://github.com/semantica-agi/semantica/blob/main/plugins/skills/validate/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể kiểm tra cấu hình pipeline dữ liệu của tôi xem có lỗi không, và cho tôi biết bước nào thiếu phụ thuộc không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent chạy bộ kiểm tra phù hợp với mục tiêu bạn chọn, như pipeline, một bước đơn lẻ, đồ thị hoặc ontology. Nó trả về danh sách kiểm tra các lỗi và cảnh báo, cùng các phụ thuộc còn thiếu giữa các bước.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
/semantica:validate
Validate pipeline and graph quality. Usage: /semantica:validate <target> [options]
$ARGUMENTS = target type + optional config or path.
pipeline [--config '<json>']
Validate a full pipeline builder configuration.
from semantica.pipeline.pipeline_builder import PipelineBuilder
from semantica.pipeline.pipeline_validator import PipelineValidator
builder = PipelineBuilder()
if config_json:
import json
builder.build_pipeline(json.loads(config_json))
# PipelineBuilder has its own quick validate
quick = builder.validate_pipeline() # returns Dict
# PipelineValidator gives full ValidationResult(valid, errors, warnings)
# Does NOT raise — always returns a result object
validator = PipelineValidator()
result = validator.validate(builder)
# Also check inter-step dependencies
deps = validator.check_dependencies(builder)
Output:
Pipeline Validation: VALID ✓ | INVALID ✗
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Steps: N registered
Valid: M steps
Errors (K):
✗ [step_name] <error message>
Warnings (J):
⚠ [step_name] <warning message>
Dependencies:
✓ All dependencies resolved
✗ Step "<name>" depends on missing step "<dep>"
Result: <valid> — K errors, J warnings
step <step_name> [--type <type>] [--constraints '<json>']
Validate a single pipeline step.
from semantica.pipeline.pipeline_builder import PipelineBuilder
from semantica.pipeline.pipeline_validator import PipelineValidator
import json
builder = PipelineBuilder()
step = builder.get_step(step_name)
validator = PipelineValidator()
result = validator.validate_step(
step=step,
**json.loads(constraints_json) if constraints_json else {},
)
Output: same checklist format but scoped to a single step.
dependencies
Check all inter-step dependency resolution for the active pipeline.
from semantica.pipeline.pipeline_builder import PipelineBuilder
from semantica.pipeline.pipeline_validator import PipelineValidator
builder = PipelineBuilder()
validator = PipelineValidator()
deps = validator.check_dependencies(builder)
Output:
Dependency Graph:
| Step | Depends On | Status |
| step_A | — | ✓ |
| step_B | step_A | ✓ |
| step_C | step_X | ✗ MISSING |
Cycles detected: YES / NO
Missing steps: [list]
extraction <file_path>
Validate extraction quality for a file — entity confidence, relation density, coverage.
from semantica.semantic_extract.extraction_validator import ExtractionValidator
from semantica.semantic_extract import (
NamedEntityRecognizer,
RelationExtractor,
)
from semantica.semantic_extract.cache import extraction_cache
extraction_cache.clear() # prevent cross-invocation cache pollution
text = open(file_path).read()
ner = NamedEntityRecognizer()
rel = RelationExtractor()
entities = ner.extract(text)
relations = rel.extract(text)
validator = ExtractionValidator()
issues = validator.validate(entities, relations)
Output:
Extraction Validation: <file_path>
Entities: N extracted
Relations: M extracted
Avg confidence: 0.83
Errors (K):
✗ <issue>
Warnings (J):
⚠ <warning>
Quality score: X/100
graph
Check schema conformance, referential integrity, and structural health.
from semantica.kg.graph_validator import GraphValidator
from semantica.context import ContextGraph
graph = ContextGraph()
validator = GraphValidator(graph)
result = validator.validate()
Output:
Graph Validation:
Nodes: N | Edges: M
Node types: K valid, J unknown
Referential integrity:
✗ Dangling edge: <source> → <missing target>
Schema conformance:
✗ Node "<id>" missing required property "<prop>"
Result: N errors, M warnings
ontology
Validate ontology consistency and evaluate competency questions.
from semantica.ontology import OntologyValidator
validator = OntologyValidator()
result = validator.validate()
cq_results = validator.evaluate_competency_questions()
Output:
Ontology Validation:
Classes: N
Properties: M
Consistent: YES ✓ | NO ✗
Competency questions:
✓ "Can we find all instances of X?" — answered
✗ "Is Y a subclass of Z?" — failed: <reason>
Result: N consistency errors, M CQ failures
performance
Validate pipeline performance characteristics — bottlenecks, parallelism, and resource use.
from semantica.pipeline.pipeline_builder import Pipeli
Câu hỏi thường gặp
Kiểm tra có dừng việc chạy không?
Không. Các bộ kiểm tra trả về kết quả liệt kê vấn đề thay vì dừng việc chạy.
Có thể kiểm tra những gì?
Pipeline, từng bước đơn lẻ, các phụ thuộc, chất lượng trích xuất, đồ thị, ontology và hiệu năng.
Có tóm tắt kết quả không?
Có. Mỗi kiểm tra kết thúc bằng kết quả hợp lệ hoặc không hợp lệ cùng số lượng lỗi và cảnh báo.
Chi tiết
Mô tả gốc của tác giả
Validate Semantica pipelines, extraction quality, graph schemas, and ontology consistency. Returns structured error/warning checklists. Uses PipelineValidator, PipelineBuilder.validate_pipeline(), GraphValidator, and OntologyValidator. Sub-commands: pipeline, step, dependencies, extraction, graph, ontology, performance.
repo: semantica-agi/semantica
Độ phổ biến
- Sao GitHub
- 14k
- Vị trí xếp hạng
- #11157
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
semantica
14kCung cấp cho agent của bạn một bộ công cụ đầy đủ cho đồ thị tri thức, gồm trích xuất, suy luận, nguồn gốc, ontology, chính sách và xuất dữ liệu.
causal
14kGiúp agent của bạn truy vết các liên kết nhân quả trong đồ thị tri thức, gồm chuỗi nguyên nhân, kịch bản nếu-thì và điểm ảnh hưởng.
change
14kCho agent của bạn thấy một đồ thị tri thức trông như thế nào vào một ngày trước đó, và điều gì đã thay đổi giữa hai ngày hoặc hai phiên bản ontology.
decision
14kGiúp agent của bạn ghi lại, tìm kiếm, giải thích và rà soát các quyết định trong đồ thị tri thức, từ ghi chú đầu tiên đến kết quả của nó.
Skill tương tự
test-driven-development
311kDạy agent của bạn viết kiểm thử thất bại trước, xem nó thất bại, rồi viết đoạn mã ngắn nhất để vượt qua trước khi làm bất kỳ tính năng hay bản sửa nào.
verification-before-completion
311kDạy agent của bạn chạy kiểm tra thực tế và đọc kết quả đầu ra trước khi khẳng định một việc, bản sửa hoặc bản build đã hoàn thành hay vượt qua.
migrate-to-shoehorn
310kThay các ép kiểu rủi ro trong tệp kiểm thử bằng thư viện shoehorn, để các bài kiểm thử dùng dữ liệu một phần vẫn qua được kiểm tra kiểu.