mistral-core-workflow-b

Featured

Execute Mistral AI embeddings, function calling, and RAG pipelines. Use when implementing semantic search, RAG applications, tool-augmented LLM interactions, or code embeddings. Trigger with phrases like "mistral embeddings", "mistral function calling", "mistral tools", "mistral RAG", "mistral semantic search".

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

# Mistral AI Core Workflow B: Embeddings & Function Calling ## Overview Secondary workflows for Mistral AI: text/code embeddings with `mistral-embed` (1024 dimensions), function calling (tool use) with any chat model, and RAG pipeline combining both. Mistral supports `auto`, `any`, and `none` tool choice modes. ## Prerequisites - Completed `mistral-install-auth` setup - `MISTRAL_API_KEY` environment variable set - Familiarity with `mistral-core-workflow-a` ## Instructions ### Step 1: Generate Text Embeddings ```typescript import { Mistral } from '@mistralai/mistralai'; const client = new Mistral({ apiKey: process.env.MISTRAL_API_KEY }); // Single text embedding const response = await client.embeddings.create({ model: 'mistral-embed', inputs: ['Machine learning is fascinating.'], }); const vector = response.data[0].embedding; console.log(`Dimensions: ${vector.length}`); // 1024 console.log(`Tokens used: ${response.usage.totalTokens}`); ``` ### Step 2: Batch Embeddings with Rate Awareness ```typescript async function batchEmbed( texts: string[], batchSize = 64, ): Promise<number[][]> { const allEmbeddings: number[][] = []; for (let i = 0; i < texts.length; i += batchSize) { const batch = texts.slice(i, i + batchSize); const response = await client.embeddings.create({ model: 'mistral-embed', inputs: batch, }); allEmbeddings.push(...response.data.map(d => d.embedding)); } return allEmbeddings; } // Embed 1000 documents in b...

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