본문으로 건너뛰기
Skillpedia
데이터베이스14k · #11154

query

하는 일

이 스킬은 메모리에 있거나 외부 RDF 또는 그래프 데이터베이스에 있는 Semantica 지식 그래프를 검색합니다. 그래프에서 특정 사실과 연결을 찾으려는 사람을 위한 스킬입니다.

사용하는 경우

  • ✓지식 그래프에서 여러 키워드를 검색하고 싶을 때.
  • ✓그래프가 RDF 트리플 저장소에 있고 SPARQL 쿼리가 필요할 때.
  • ✓그래프가 레이블 속성 그래프 데이터베이스에 있고 Cypher 쿼리가 필요할 때.

스킬 링크

https://github.com/semantica-agi/semantica/blob/main/plugins/skills/query/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/semantica-agi/semantica/blob/main/plugins/skills/query/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“내 지식 그래프에서 공급업체 선정과 관련된 모든 것을 검색해 줄 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 그래프를 불러와 항목 전체에서 검색을 실행하거나, 지정한 데이터베이스에 SPARQL 또는 Cypher 쿼리를 보냅니다. 일치하는 결과를 돌려줍니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

/semantica:query

Query the graph. Usage: /semantica:query <task> [args]

Which API you want depends on where the graph lives.


search "<keywords>" — the in-memory ContextGraph

This is the one that works with no external server.

import os
from semantica.context import ContextGraph

graph = ContextGraph()
graph.load_from_file(os.path.expanduser("~/.semantica/kg.json"))   # load_from_file does not expand ~

results = graph.query("vendor selection", skip=0, limit=20)

Related lookups on the same object:

graph.find_nodes(...)          graph.find_node(...)
graph.find_related_nodes(...)  graph.get_neighbors(node_id)
graph.find_similar_nodes(...)  graph.get_nodes_by_label(label)

Decision-specific queries belong to /semantica:decision.


sparql "<query>" — RDF triple stores

from semantica.triplet_store import TripletStore

store = TripletStore(backend="oxigraph")       # embedded; needs semantica[tripletstore-oxigraph]
# or backend="blazegraph" | "jena" | "rdf4j" with endpoint="http://..."
result = store.execute_query(sparql)

For query planning, optimisation, and caching over a backend:

from semantica.triplet_store import QueryEngine, OxigraphStore

# QueryEngine needs an object exposing execute_sparql() — the raw backend,
# not the TripletStore wrapper above (which only exposes execute_query()).
backend = OxigraphStore()

qe = QueryEngine()
plan   = qe.plan_query(sparql)
tuned  = qe.optimize_query(sparql)
result = qe.execute_query(sparql, store_backend=backend)
stats  = qe.get_query_statistics()

Blazegraph / Jena / RDF4J need no extra — semantica.triplet_store speaks SPARQL over HTTP using the core requests dependency.


cypher "<query>" — labeled property graphs

from semantica.graph_store import Neo4jStore    # needs semantica[graph-neo4j]

store = Neo4jStore(uri=..., user=..., password=...)
result = store.execute_query(query, parameters={...})

Also available: FalkorDBStore, ApacheAgeStore, AmazonNeptuneStore, and GraphManager / GraphStore for backend-agnostic access.

Not installed in this environment — add the backend extra first, e.g. pip install "semantica[graph-neo4j]".

자주 묻는 질문

키워드 검색에도 데이터베이스 서버가 필요한가요?

아니요. 키워드 검색은 파일에서 메모리로 불러온 그래프에서 작동합니다.

SPARQL이란 무엇인가요?

RDF 트리플로 저장된 연결 데이터 그래프에 쓰는 질의 언어입니다.

어떤 데이터베이스가 언급되나요?

스킬은 내장형 Oxigraph 저장소와, Blazegraph, Jena, RDF4J 같은 다른 RDF 저장소를 언급합니다.

상세 정보

작성자의 원본 설명

Query Semantica knowledge graphs — in-memory ContextGraph search, SPARQL over RDF triple stores, and Cypher over LPG backends.

repo: semantica-agi/semantica

인기도

GitHub 스타
14k
순위
#11154
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬