본문으로 건너뛰기
Skillpedia
에이전트48k · #3817

arrowspace

하는 일

ArrowSpace는 직접적인 유사성뿐 아니라 항목들이 서로 어떻게 연결되어 있는지도 고려해 대용량 데이터에서 정보를 찾는 데 도움을 줍니다. 그래프 기반 접근을 사용해 데이터 안에 숨은 구조를 이해합니다.

사용하는 경우

  • ✓일반 검색이 관련 있어 보이는 정보를 놓칠 때.
  • ✓가장 비슷한 항목뿐 아니라 데이터 전체 구조에서 중요한 항목을 찾고 싶을 때.
  • ✓정보의 내용뿐 아니라 ‘역할’을 이해해야 하는 검색 시스템을 만들 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/arrowspace/SKILL.md

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

사용 방법

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

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

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/arrowspace/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분.

작동 방식

항목을 노드로, 관계를 연결선으로 나타내는 네트워크(그래프)를 만듭니다. 그다음 이 네트워크의 속성을 분석해, 의미상 비슷한 항목뿐 아니라 구조적으로 중요한 항목도 찾습니다.

기술 내용 (원본 SKILL.md)

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

ArrowSpace

Spectral vector search that augments nearest-neighbour search with graph Laplacian features. Computes a Laplacian over the item graph and uses the Rayleigh quotient to produce a λτ (lambda-tau) score per item, enabling search that respects both semantic similarity and structural role.

When to Use This Skill

  • Cosine or L2 similarity misses latent structure in your embeddings
  • You want graph-based retrieval with spectral awareness
  • You need to characterise the spectral properties of an embedding space
  • You are building RAG pipelines where contextual role matters alongside semantic content

How It Works

Step 1: Install and import

python3 -m pip install "arrowspace==0.28.1" numpy  # review/pin remaining dependencies in an isolated environment
from arrowspace import ArrowSpaceBuilder
import numpy as np

Step 2: Prepare your data

Pass an (N, d) float64 NumPy array of embedding vectors:

rng = np.random.default_rng(7)
items = rng.normal(size=(32, 8)).astype(np.float64)
items /= np.linalg.norm(items, axis=1, keepdims=True)

Step 3: Configure graph parameters

graph_params = {"eps": 0.5, "k": 6, "topk": 3, "p": 2.0, "sigma": None}
aspace, graph = ArrowSpaceBuilder().build(graph_params, items)

Step 4: Query

lambdas = aspace.lambdas()           # array indexed by insertion order
sorted_res = aspace.lambdas_sorted()  # (score, index) pairs ascending

These are per-item spectral signatures, not graph eigenvalues or query-dependent relevance scores. Sorting them alone is not nearest-neighbor retrieval; do not infer closeness to a query or graph centrality from a large signature.

Examples

Example 1: Basic spectral retrieval

# Reuse the normalized corpus and graph above; verify degenerate scores first.
if np.any(np.abs(aspace.lambdas()) < 1e-12):
    raise ValueError("Tune graph parameters for this corpus before searching")
query = items[0].copy()
hits = aspace.search(query, graph, tau=0.7, k=5)
# hits contains query-dependent (item_index, score) pairs, not a lambda-only ranking.

Example 2: Compare spectral vs cosine ranking

from sklearn.metrics.pairwise import cosine_similarity
cos_sim = cosine_similarity(items)
cosine_order = np.argsort(cos_sim[0])[::-1][:5]
spectral_order = [index for index, score in aspace.search(items[0], graph, tau=0.7, k=5)]
# For retrieval evaluation, exclude self-matches and use held-out relevance labels.

Best Practices

  • ✅ Normalise embeddings to unit norm before passing to ArrowSpace
  • ✅ Treat graph parameters as corpus-dependent; inspect disconnected/degenerate scores and tune using an explicitly selected objective
  • ✅ Choose k relative to the actual corpus and library constraints; N/50 is not a universal quality guarantee
  • ✅ In the reviewed 0.28 API, sigma=None uses the eps-dependent default; it is not automatic distribution fitting
  • ✅ Small corpora can illustrate the API, but retrieval quality requires corpus-appropriate evaluation; ten items is not a mathematical validity threshold
  • ❌ Don't use for real-time streaming data (ArrowSpace is batch-oriented)

Limitations

  • API examples target the reviewed 0.28 interface; immutable upstream skill documents the builder, graph return value and query-aware search. These examples were checked against source documentation, not executed here.
  • Fit graph parameters and tau on held-out retrieval evidence; λτ signatures alone do not prove better recall or structural importance.
  • ArrowSpace is batch-oriented and not designed for real-time indexing of streaming data.

Common Pitfalls

  • Problem: eps is too small, producing a disconnected graph Solution: Inspect graph connectivity and degenerate scores, then tune eps against the actual data; no dimension-only formula is guaranteed

  • Problem: k is too large, producing a dense graph with washed-out spectral features Solution: Keep k ≤ 25 for most datasets

Related Skills

  • vector-database-engineer — General vector database expertise
  • embedding-strategies — Embedding model selection and chunking
  • similarity-search-patterns — Semantic search implementation patterns
  • hybrid-search-implementation — Combined semantic + keyword search
자주 묻는 질문

‘임베딩’이란 무엇인가요?

텍스트나 이미지 같은 정보를 컴퓨터가 이해할 수 있도록 숫자로 나타낸 것입니다. 숫자가 가까울수록 원래 정보가 더 비슷합니다.

왜 일반 유사도 검색(코사인 등)을 사용하지 않나요?

일반 검색은 더 미묘한 관계나 큰 데이터셋 안에서 항목이 가지는 구조적 중요성을 포착하지 못할 수 있습니다.

실시간 데이터에 사용할 수 있나요?

아니요, ArrowSpace는 일괄 처리를 위해 설계되었으며, 끊임없이 바뀌는 실시간 데이터에는 적합하지 않습니다.

상세 정보

작성자의 원본 설명

Spectral vector search using graph Laplacian eigenstructure. Use when cosine/L2 similarity misses latent structure in your embeddings.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#3817
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬