SkillsApr 8, 2026·1 min read

Together AI Embeddings & Reranking Skill for Agents

Skill that teaches Claude Code Together AI's embeddings and reranking API. Covers dense vector generation, semantic search, RAG pipelines, and result reranking patterns.

PR
Prompt Lab · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

npx skills add togethercomputer/skills

What is This Skill?

This skill teaches AI coding agents how to use Together AI's embeddings and reranking APIs. It covers dense vector generation for semantic search, RAG pipeline construction, and result reranking for improved relevance.

Answer-Ready: Together AI Embeddings Skill for coding agents. Covers dense embeddings, semantic search, RAG pipelines, and reranking. Correct model IDs and SDK patterns. Part of official 12-skill collection.

Best for: Developers building RAG or semantic search with Together AI. Works with: Claude Code, Cursor, Codex CLI.

What the Agent Learns

Generate Embeddings

from together import Together

client = Together()
response = client.embeddings.create(
    model="togethercomputer/m2-bert-80M-8k-retrieval",
    input=["What is machine learning?", "How does AI work?"],
)
vectors = [e.embedding for e in response.data]

Semantic Search Pattern

# 1. Embed documents
doc_embeddings = embed(documents)
# 2. Embed query
query_embedding = embed([query])
# 3. Cosine similarity search
# 4. Return top-k results

Reranking

response = client.rerank.create(
    model="Salesforce/Llama-Rank-V1",
    query="What is deep learning?",
    documents=["Deep learning is...", "Machine learning uses...", "AI refers to..."],
    top_n=3,
)
for result in response.results:
    print(f"Score: {result.relevance_score}")

FAQ

Q: What embedding models are available? A: Multiple models including M2-BERT, BGE, and others. Choose based on dimension needs and performance.

🙏

Source & Thanks

Part of togethercomputer/skills — MIT licensed.

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets