embedding-analysis
Compute and analyze embeddings for dataset quality, distribution comparison, semantic deduplication, diversity measurement, and similarity-based filtering.
Skill by mkurman
Chalk Labs
Need help deploying embedding-analysis?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/mkurman-embedding-analysis
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data, ml, research
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Nov 1, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/embedding-analysis
What's inside
- Skill name
embedding-analysis- Description
- Compute and analyze embeddings for dataset quality, distribution comparison, semantic deduplication, diversity measurement, and similarity-based filtering. Covers sentence-transformers, embedding space diagnostics, and 2025-2026 literature techniques (NeMo Curator semantic dedup, embedding similarity metrics for data selection, DataRater-style quality scoring).
- License
- MIT
- Instructions
- 271 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Embedding Analysis for Dataset Curation
## Overview
Embeddings turn unstructured text/images into a vector space where quality, diversity, and redundancy become measurable. This skill covers embedding-based dataset curation using sentence-transformers, distribution comparison metrics, semantic deduplication, and quality scoring techniques from the 2025-2026 literature.
## When to Use
Use this skill when:
- Detecting near-duplicate or semantically redundant examples.
- Comparing embedding distributions across dataset splits (train vs. val vs. test).
- Measuring dataset diversity or coverage in embedding space.
- Filtering examples based on embedding distance to a "gold" reference set.
- Applying NeMo Curator-style semantic dedup at scale.
- Computing DataRater-style quality signals from embedding neighborhoods.
Do not use for:
- Raw text deduplication (exact match) — use simple hashing.
- Model training — use `transformers` or `trl` skills.
- Vector database persistence — use `chromadb`, `milvus`, or `qdrant` skills.
## Installation
```bash
uv pip install sentence-transformers umap-learn scikit-learn numpy
```
## Core Workflow
### 1. Generate Embeddings
```python
from sentence_transformers import SentenceTransformer
import numpy as np
# Choose model based on domain
model = SentenceTransformer("all-MiniLM-L6-v2") # fast, general
# model = SentenceTransformer("all-mpnet-base-v2") # higher quality
# model = SentenceTransformer("BAAI/bge-large-en-v1.5") # retrieval-optimized
# model = SentenceTransformer("intfloat/multilingual-e5-large") # multilingual
# Batched encoding (memory-efficient)
embeddings = model.encode(
texts,
batch_size=64,
show_progress_bar=True,
normalize_embeddings=True, # cosine similarity via dot product
convert_to_numpy=True,
)
```
### 2. Semantic Deduplication
Semantic dedup removes examples that are meaning-equivalent but not text-identical. From NeMo Curator (NVIDIA, 2024-2025) and academic literature.
#### Clustering-Based Approach (NeMo Curator SemDedup)
```python
from sklearn.cluster import MiniBatchKMeans
from sklearn.metrics.pairwise import cosine_similarity
def semantic_dedup(embeddings, threshold=0.95, n_clusters=100):
"""
Cluster embeddings, then remove near-duplicates within each cluster.
threshold: cosine similarity above which two examples are duplicates.
Returns: boolean mask (True = keep, False = duplicate).
"""
n = len(embeddings)
keep = np.ones(n, dtype=bool)
# Coarse clustering for efficiency (O(n * k) instead of O(n^2))
k = min(n_clusters, n // 10)
clusters = MiniBatchKMeans(n_clusters=k, random_state=42, batch_size=1024).fit_predict(embeddings)
for c in range(k):
idx = np.where(clusters == c)[0]
if len(idx) < 2:
continue
sim = cosine_similarity(embeddings[idx])
# Mark duplicates (lower-index kept, higher-index removed)
for i in range(len(idx)):
if not keep[idx[i]]:
continue
dupes = np.where(sim[i, i+1:] > threshold)[0]
for d in dupes:
keep[idx[i + 1 + d]] = False
return keep
```
#### Connected Components Approach (LSHBloom, 2025)
```python
# For internet-scale dedup (>100M examples):
# Use LSH for approximate nearest neighbor + union-find
from sklearn.neighbors import NearestNeighbors
def lsh_semantic_dedup(embeddings, threshold=0.90, n_neighbors=10):
"""Finds clusters of semantically similar examples via NN graph."""
nn = NearestNeighbors(n_neighbors=n_neighbors, metric="cosine", n_jobs=-1)
nn.fit(embeddings)
distances, indices = nn.kneighbors(embeddings)
# Union-find to merge connected components
parent = np.arange(len(embeddings))
def find(x):
while parent[x] != x:
parent[x] = parent[parent[x]]
x = parent[x]
return x
def union(a, b):
parent[find(a)] = find(b)
for i in range(len(embeddings)):
for j, d in zip(indices[i], distances[i]):
if i != j and (1 - d) > threshold: # cosine dist → similarity
union(i, j)
# Keep one per componentFrom mkurman/zorai, MIT.
More from mkurman/zorai
- 0.798score
best-practices
web-quality-skills
Apply modern web development best practices for security, compatibility, and code quality.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
video-analyzer
mkurman
Use this skill when analyzing existing video files using FFmpeg and AI vision, extracting frames for design system generation, detecting scene boundaries…
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
internal-docs
mkurman
Use this skill when writing, reviewing, or improving internal engineering documents - RFCs, design docs, post-mortems, runbooks, and knowledge base articles.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
proposal-writing
mkurman
Use this skill when writing proposals, responding to RFPs, drafting SOWs, or developing pricing strategies.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
budgeting-planning
mkurman
Use this skill when building budgets, conducting variance analysis, implementing rolling forecasts, or allocating costs.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
create-workflow
mkurman
Conversational guide for creating valid YAML workflow definitions.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
product-strategy
mkurman
Use this skill when defining product vision, building roadmaps, prioritizing features, or choosing frameworks like RICE, ICE, or MoSCoW.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
brand-strategy
mkurman
Use this skill when defining brand positioning, voice and tone guidelines, brand architecture, or storytelling frameworks.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
social-media-strategy
mkurman
Use this skill when planning social media strategy, creating platform-specific content, scheduling posts, or analyzing engagement metrics.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
compensation-strategy
mkurman
Use this skill when benchmarking compensation, designing equity plans, building leveling frameworks, or structuring total rewards.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
account-management
mkurman
Use this skill when managing key accounts, planning expansions, running QBRs, or mapping stakeholders.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
video-audio-design
mkurman
Use this skill when adding audio to programmatic videos - generating narration with ElevenLabs TTS, sourcing royalty-free background music, creating SFX with…
SkillAFreshness: A★ 325Claude Code +9
Signals
- Stars
- 325
- Forks
- 24
- Open issues
- 0
- Last commit (this folder)
- May 12, 2026 (5 months ago)
- Last release
- Oct 23, 2026 (13 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/mkurman/zorai
- Website
- zorai.app/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from mkurman
- 0.597score
compensation-strategy
mkurman
Use this skill when benchmarking compensation, designing equity plans, building leveling frameworks, or structuring total rewards.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
account-management
mkurman
Use this skill when managing key accounts, planning expansions, running QBRs, or mapping stakeholders.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
brand-strategy
mkurman
Use this skill when defining brand positioning, voice and tone guidelines, brand architecture, or storytelling frameworks.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
budgeting-planning
mkurman
Use this skill when building budgets, conducting variance analysis, implementing rolling forecasts, or allocating costs.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
create-workflow
mkurman
Conversational guide for creating valid YAML workflow definitions.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
internal-docs
mkurman
Use this skill when writing, reviewing, or improving internal engineering documents - RFCs, design docs, post-mortems, runbooks, and knowledge base articles.
SkillAFreshness: A★ 325Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get embedding-analysis running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
embedding-analysis skill. Agent Mart. https://agentmart.dev/skills/mkurman-embedding-analysis (last updated 2026-10-24)