temporal
Skill này làm gì
Skill chạy các câu hỏi theo thời gian trên đồ thị tri thức Semantica, như điều gì đúng vào một ngày cho trước. Skill dành cho người cần kết quả giới hạn trong một thời điểm.
Khi nào nên dùng
- ✓Khi bạn chỉ muốn kết quả cho các mục đang hiệu lực vào một ngày cụ thể.
- ✓Khi bạn muốn xem toàn bộ đồ thị như nó đã có vào một thời điểm trước đó.
- ✓Khi bạn muốn biết tiền lệ hoặc nguyên nhân nào đã áp dụng vào một thời điểm trong quá khứ.
Liên kết skill
https://github.com/semantica-agi/semantica/blob/main/plugins/skills/temporal/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
“Đồ thị đã cho thấy gì về các phê duyệt nhà cung cấp của chúng tôi tính đến ngày 15 tháng 3, và những mục nào chưa tồn tại lúc đó?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent đọc các cụm từ thời gian như tháng trước hoặc Q3 2024, chuyển chúng thành ngày chuẩn, rồi viết lại câu hỏi với giới hạn thời gian đó. Nó trả về kết quả đã xếp hạng, đánh dấu ngày hiệu lực và việc mục có tồn tại vào thời điểm đích hay không.
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:temporal
Temporal graph operations. Usage: /semantica:temporal <sub-command> [args]
$ARGUMENTS = sub-command + query/node + date expression.
query "<question>" [at|before|after <date>]
Temporally-scoped natural-language graph query.
from semantica.kg.temporal_query_rewriter import TemporalQueryRewriter
from semantica.kg.temporal_normalizer import TemporalNormalizer
normalizer = TemporalNormalizer()
# Normalize natural date expressions: "last month", "Q3 2024", "2025-01-15"
date = normalizer.normalize(date_expr)
rewriter = TemporalQueryRewriter()
# Rewrite query with temporal constraint
rewritten = rewriter.rewrite(
query=question,
temporal_constraint={"op": direction, "value": date}, # op: "at"|"before"|"after"
)
Then run the rewritten query through AgentContext.retrieve() or ContextGraph.query().
Return ranked results with Valid From, Valid Until, Active At <date> columns. Mark nodes that were not yet created at the target time as [not yet created].
snapshot <date>
Reconstruct the full graph state as it existed at a specific point in time.
from semantica.context import ContextGraph
graph = ContextGraph(advanced_analytics=True)
# state_at returns a dict snapshot of the graph at that timestamp
snapshot = graph.state_at(timestamp=date) # ISO string or datetime
Output:
Graph snapshot at <date>:
Nodes: N (M added since prev snapshot, K removed)
Edges: P
Density: 0.21
Communities: Q
Active decision categories at <date>:
| Category | Count | Avg Confidence |
Top 10 nodes (by degree at <date>):
| Node | Type | Degree |
[Compact Mermaid graph TD — top-10 most connected nodes at that time]
timeline <node_id>
Show attribute and relationship changes for a node across its full history.
from semantica.context import ContextGraph
graph = ContextGraph()
# Use state_at() at multiple time points to reconstruct history
# Check add_node timestamps and edge addition times from graph data
node_data = graph.find_node(node_id)
Output as Markdown timeline:
Timeline for "<node_id>" (<type>):
<timestamp> CREATED
Properties: {confidence: 0.71, category: "loan_approval"}
Source: extraction/pipeline
<timestamp> UPDATED
confidence: 0.71 → 0.91 [source: review]
<timestamp> RELATIONSHIP ADDED
"<node_id>" →[CAUSED]→ "Decision_B"
<timestamp> RELATIONSHIP REMOVED
"<node_id>" →[PRECEDED_BY]→ "Decision_X" (superseded)
Total lifespan: <duration>
Current state: <active|superseded>
causal-at <decision_id> <date> [--direction upstream|downstream]
Trace a causal chain as it existed at a specific point in time.
from semantica.context.causal_analyzer import CausalChainAnalyzer
from semantica.context import AgentContext
ctx = AgentContext(decision_tracking=True)
analyzer = CausalChainAnalyzer(graph_store=ctx.graph_store)
historical_chain = analyzer.trace_at_time(
event_id=decision_id,
at_time=date, # ISO string or datetime
direction=direction or "upstream",
max_depth=10,
)
Output:
Historical causal chain for <decision_id> at <date>:
Direction: upstream (what caused it?)
[Mermaid graph TD showing chain as it existed at <date>]
Decisions present then but not now: [list]
Decisions added since then: [list]
precedents-at "<scenario>" <date> [--category <cat>]
Find precedent decisions that existed as of a specific date — useful for auditing what context was available when a decision was made.
from semantica.context import AgentContext
ctx = AgentContext(decision_tracking=True, advanced_analytics=True)
# find_precedents supports as_of parameter for temporal precedent search
precedents = ctx.find_precedents(
scenario=scenario,
category=category or None,
limit=10,
use_hybrid_search=True,
include_context=True,
include_superseded=False,
as_of=date, # Only return precedents that existed at this date
)
Return: | Rank | Decision ID | Scenario | Outcome | Confidence | Set Date | Valid Until |
Note decisions that were superseded before or after the target date.
Câu hỏi thường gặp
Nó có hiểu các cụm từ như tháng trước không?
Có. Nó chuyển các biểu thức ngày thường dùng thành một ngày chuẩn.
Các mục chưa tồn tại được hiển thị thế nào?
Chúng được đánh dấu là chưa được tạo.
Nó có tái dựng đồ thị vào một ngày quá khứ không?
Có. Nó có thể tái dựng toàn bộ trạng thái đồ thị như đã có vào một ngày được chọn.
Chi tiết
Mô tả gốc của tác giả
Temporal graph operations on Semantica — scoped queries at a point in time, graph snapshots, node change timelines, temporal causal analysis, and graph state reconstruction. Uses AgentContext.find_precedents(as_of=), ContextGraph.state_at(), CausalChainAnalyzer.trace_at_time(), and TemporalQueryRewriter. Sub-commands: query, snapshot, timeline, causal-at, precedents-at.
repo: semantica-agi/semantica
Độ phổ biến
- Sao GitHub
- 14k
- Vị trí xếp hạng
- #11156
- 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ự
gitcrawl
394kCho phép agent của bạn tìm trong kho lưu trữ issue và pull request GitHub, gom các mục trùng lặp và kiểm tra trạng thái hiện tại trên GitHub.
slacrawl
394kCho phép agent của bạn tìm và đếm tin nhắn trong kho lưu trữ Slack cục bộ, kiểm tra kho đó mới đến mức nào và làm mới khi cần.
goplaces
394kGiúp agent của bạn tìm địa điểm, lấy chi tiết và đánh giá, và xác định tên địa điểm bằng Google Places, với đầu ra JSON cho script.