arrowspace
From sickn33
Spectral vector search using graph Laplacian eigenstructure. Use when cosine/L2 similarity misses latent structure in your embeddings.
Facts
- Repository
- sickn33/agentic-awesome-skills
- Status
- Actively maintained
- Last commit
Source preview
The instructions Claude Code reads when this skill runs.
# 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
```bash
pip install arrowspace
```
```python
from arrowspace import ArrowSpaceBuilder
import numpy as np
```
### Step 2: Prepare your data
Pass an (N, d) float64 NumPy array of embedding vectors:
```python
items = np.array([[0.1, 0.2, 0.3],
[0.0, 0.5, 0.1],
[0.9, 0.1, 0.0]], dtype=np.float64)
```
### Step 3: Configure graph parameters
```python
graph_params = {"eps": 0.2, "k": 6, "topk": 3, "p": 2.0, "sigma": 1.0}
builder = ArrowSpaceBuilder(items, graph_params=graph_params)
aspace = builder.build()
```
### Step 4: Query
```python
lambdas = aspace.lambdas() # array indexed by insertion order
sorted_res = aspace.lambdas_sorted() # (score, index) pairs ascending
```
HighView full source on GitHub →Other skills
django-tdd
★ 229,918Django testing strategies with pytest-django, TDD methodology, factory_boy, mocking, coverage, and testing Django REST Framework APIs.
affaan-mupdated 15d agoMITclickhouse-io
★ 229,918ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.
affaan-mupdated 15d agoMITlaravel-patterns
★ 229,918Patrones de arquitectura Laravel, routing/controladores, Eloquent ORM, capas de servicio, colas, eventos, caché y API resources para aplicaciones en producción.
affaan-mupdated 15d agoMITverification-loop
★ 229,918Sistema de verificación completo para sesiones de Claude Code.
affaan-mupdated 15d agoMITstrategic-compact
★ 229,918Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
affaan-mupdated 15d agoMITfrontend-patterns
★ 229,918Patrones de desarrollo frontend para React, Next.js, gestión de estado, optimización de rendimiento y buenas prácticas de UI.
affaan-mupdated 15d agoMIT