Chuyển đến nội dung
Skillpedia
Kiểm thử14k · #11157

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.md

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/semantica-agi/semantica/blob/main/plugins/skills/validate/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

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

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự