arrowspace
Skill này làm gì
ArrowSpace giúp tìm thông tin trong các tập dữ liệu lớn bằng cách xét không chỉ mức độ giống nhau trực tiếp, mà còn cách các mục được kết nối với nhau. Nó dùng cách tiếp cận dựa trên đồ thị để hiểu cấu trúc ẩn trong dữ liệu của bạn.
Khi nào nên dùng
- ✓Khi tìm kiếm thông thường bỏ sót thông tin có vẻ liên quan.
- ✓Khi bạn muốn tìm các mục quan trọng trong cấu trúc tổng thể của dữ liệu, chứ không chỉ những mục giống nhất.
- ✓Khi bạn xây dựng hệ thống tìm kiếm cần hiểu “vai trò” của một thông tin, chứ không chỉ nội dung của nó.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/arrowspace/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
“Tìm các tài liệu quan trọng để hiểu bối cảnh chung về trí tuệ nhân tạo, không chỉ những tài liệu bàn trực tiếp về chủ đề này.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Nó tạo ra một mạng lưới (đồ thị), trong đó mỗi mục là một nút và các kết nối thể hiện quan hệ giữa chúng. Sau đó, nó phân tích thuộc tính của mạng lưới này để tìm các mục có vai trò quan trọng về cấu trúc, bên cạnh việc có ý nghĩa tương tự.
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.
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 expertiseembedding-strategies— Embedding model selection and chunkingsimilarity-search-patterns— Semantic search implementation patternshybrid-search-implementation— Combined semantic + keyword search
Câu hỏi thường gặp
“Embeddings” là gì?
Đó là các biểu diễn bằng số của thông tin (như văn bản hoặc hình ảnh) mà máy tính có thể hiểu. Các số càng gần nhau thì thông tin gốc càng giống nhau.
Vì sao không chỉ dùng tìm kiếm tương đồng thông thường (như cosine)?
Tìm kiếm thông thường có thể không nắm bắt được các mối quan hệ tinh tế hơn hoặc vai trò cấu trúc của một mục trong tập dữ liệu lớn.
Tôi có dùng được cho dữ liệu thời gian thực không?
Không, ArrowSpace được thiết kế để xử lý theo lô và không phù hợp với dữ liệu thay đổi liên tục theo thời gian thực.
Chi tiết
Mô tả gốc của tác giả
Spectral vector search using graph Laplacian eigenstructure. Use when cosine/L2 similarity misses latent structure in your embeddings.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #3817
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.