본문으로 건너뛰기
cccskills
무료GitHub에 공개

arrowspace

Build vector search that considers both semantic similarity and patterns in how items connect. Use graph features to explore structure in embeddings, numerical representations of content, and compare retrieval results with conventional similarity search.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

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

설치 방법 보기

이럴 때 유용합니다

  • Investigate structure missed by cosine similarity
  • Include contextual roles in RAG retrieval
  • Compare graph-based and cosine search results
  • Inspect graph connectivity and tune search parameters

포함된 파일(1)

  • SKILL.md4.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Assess a new or existing AI project by examining its code, goals, and constraints. Recommend skills confirmed to exist in the available registry, then outline tasks and implementation phases with dependencies, completion criteria, and checks.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Planning the first steps of a new AI project
  • Assessing technical issues in an existing project
  • Selecting relevant skills from an available registry
sickn33/agentic-awesome-skills4.8만2026년 10월 19일 업데이트

007

무료

Review code and infrastructure for security risks, map potential threats, and plan stronger defenses. The skill covers OWASP checks, attack and defense exercises, and incident response, with validation required for each environment.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Reviewing code and infrastructure security
  • Mapping threats with STRIDE or PASTA
  • Planning stronger security settings
sickn33/agentic-awesome-skills4.8만2026년 10월 19일 업데이트

Turn a repeatable task into an Andru.ia skill with clear inputs, outputs, examples, and limits. Draft SKILL.md, check the folder structure and required validations, and prepare a pull request describing the changes for review.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Creating a skill for a repeatable task
  • Improving an existing skill’s examples and limits
  • Validating skill files and preparing a pull request
sickn33/agentic-awesome-skills4.8만2026년 10월 19일 업데이트

Prepare an industry briefing once a project's sector is defined. It covers sector context, potentially applicable regulations, familiar interface patterns, technology choices, and risks, while separating verified evidence from hypotheses and questions requiring further review.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Researching industry requirements before product design
  • Checking regulations for a project's jurisdiction
  • Choosing interface patterns familiar to target users
sickn33/agentic-awesome-skills4.8만2026년 10월 19일 업데이트

Create presentation drafts from text, outlines, or documents through the 2slides API. Match a reference image's style, choose themes, add AI voice narration, and export slide images or audio for review and use.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Create a presentation from text or an outline
  • Summarize a document into slides
  • Match slide styling to a reference image
sickn33/agentic-awesome-skills4.8만2026년 10월 19일 업데이트

Plan a 360-degree or peer feedback process and create empty response templates from confirmed requirements. Produces consistent CSV, SQL, JSON Schema, or Notion property mappings while keeping visibility choices and scoring configuration separate.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Plan an anonymous peer feedback process
  • Create a CSV template for feedback responses
  • Align feedback fields across SQL and JSON Schema
sickn33/agentic-awesome-skills4.8만2026년 10월 19일 업데이트

sickn33의 스킬 모두 보기

이 스킬의 문제 신고