cohere-core-workflow-a

Featured

Build a complete RAG pipeline with Cohere Chat, Embed, and Rerank. Use when implementing retrieval-augmented generation, building grounded Q&A systems, or combining search with LLM generation. Trigger with phrases like "cohere RAG", "cohere retrieval", "cohere grounded generation", "cohere search and answer".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Cohere RAG Pipeline (Core Workflow A) ## Overview End-to-end Retrieval-Augmented Generation using Cohere's three core endpoints: Embed (vectorize), Rerank (sort by relevance), Chat (generate grounded answer with citations). ## Prerequisites - Completed `cohere-install-auth` setup - `cohere-ai` package installed - Understanding of vector similarity search ## Instructions ### Step 1: Embed Your Documents ```typescript import { CohereClientV2 } from 'cohere-ai'; const cohere = new CohereClientV2(); // Your knowledge base const documents = [ { id: 'doc1', text: 'Cohere Command A has 256K context and supports tool use.' }, { id: 'doc2', text: 'Embed v4 generates 1024-dim vectors with 128K token context.' }, { id: 'doc3', text: 'Rerank v3.5 scores relevance from 0 to 1 across 100+ languages.' }, { id: 'doc4', text: 'The Chat API v2 requires model as a mandatory parameter.' }, { id: 'doc5', text: 'Cohere supports structured JSON output via response_format.' }, ]; // Embed documents for storage const docEmbeddings = await cohere.embed({ model: 'embed-v4.0', texts: documents.map(d => d.text), inputType: 'search_document', embeddingTypes: ['float'], }); // Store vectors alongside document text in your vector DB const vectors = docEmbeddings.embeddings.float; console.log(`Embedded ${vectors.length} docs, ${vectors[0].length} dimensions each`); ``` ### Step 2: Search — Embed the Query ```typescript async function searchDocuments(query: string, topK = 10) { ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category