# 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. ## Install Save the content below to `.claude/skills/` or append to your `CLAUDE.md`: ## Quick Use ```bash 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 ```python 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 ```python # 1. Embed documents doc_embeddings = embed(documents) # 2. Embed query query_embedding = embed([query]) # 3. Cosine similarity search # 4. Return top-k results ``` ### Reranking ```python 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](https://github.com/togethercomputer/skills) — MIT licensed. ## 快速使用 ```bash npx skills add togethercomputer/skills ``` ## 什么是这个 Skill? 教 AI Agent 使用 Together AI 的嵌入和重排序 API,构建语义搜索和 RAG 管线。 **一句话总结**:Together AI 嵌入 Skill,向量生成 + 语义搜索 + RAG + 重排序,官方出品。 ## 来源与致谢 > [togethercomputer/skills](https://github.com/togethercomputer/skills) — MIT --- Source: https://tokrepo.com/en/workflows/da3bf81c-8928-41ba-b5c4-457355af582d Author: Prompt Lab