Home

Awesome

Mistral Cookbook

The Mistral Cookbook features examples contributed by Mistralers and our community, as well as our partners. If you have cool examples showcasing Mistral models, feel free to share them by submitting a PR to this repo.

Submission Guidelines:

Disclaimer: Examples contributed by the community and partners do not represent Mistral's views and opinions.

Content Guidelines:

Main Notebooks

NotebookCategoryDescription
quickstart.ipynbchat, embeddingsBasic quickstart with chat and embeddings with Mistral AI API
prompting_capabilities.ipynbpromptingWrite prompts for classification, summarization, personalization, and evaluation
basic_RAG.ipynbRAGRAG from scratch with Mistral AI API
embeddings.ipynbembeddingsUse Mistral embeddings API for classification and clustering
function_calling.ipynbfunction callingUse Mistral API for function calling
evaluation.ipynbevaluationEvaluate models with Mistral API
mistral_finetune_api.ipynbfine-tuningFinetune a model with Mistral fine-tuning API
mistral-search-engine.ipynbRAG, function callingSearch engine built with Mistral API, function calling and RAG
prefix_use_cases.ipynbprefix, promptingCool examples with Mistral's prefix feature
synthetic_data_gen_and_finetune.ipynbdata generation, fine-tuningSimple data generation and fine-tuning guide
data_generation_refining_news.ipynbdata generationSimple data generation to refine news articles
image_description_extraction_pixtral.ipynbimage processing, promptingExtract structured image descriptions using Mistral's Pixtral model and JSON response formatting
multimodality meets function calling.ipynbimage processing, function callingExtract table from image using Mistral's Pixtral model and use for function calling

Third Party Tools

ToolsCategoryParty
adaptive_rag_mistral.ipynbRAGLangchain
Adaptive_RAG.ipynbRAGLLamaIndex
Agents_Tools.ipynbagentLLamaIndex
arize_phoenix_tracing.ipynbtracing dataArize Phoenix
arize_phoenix_evaluate_rag.ipynbevaluationArize Phoenix
azure_ai_search_rag.ipynbRAG, embeddingsAzure
CAMEL Graph RAG with Mistral Modelsmulti-agent, tool, data genCAMEL-AI.org
CAMEL Role-Playing Scrapermulti-agent, tool, data genCAMEL-AI.org
Chainlit - Mistral reasoning.ipynbUI chat, tool callingChainlit
corrective_rag_mistral.ipynbRAGLangchain
distilabel_synthetic_dpo_dataset.ipynbsynthetic dataArgilla
E2B Code Interpreter SDK with Codestraltool, agentE2B
function_calling_local.ipynbtool callOllama
Gradio Integration - Chat with PDFUI chat, demo, RAGGradio
haystack_chat_with_docs.ipynbRAG, embeddingsHaystack
Indexify Integration - PDF Entity Extractionentity extraction, PDFIndexify
Indexify Integration - PDF Summarizationsummarization, PDFIndexify
langgraph_code_assistant_mistral.ipynbcodeLangchain
langgraph_crag_mistral.ipynbRAGLangchain
llamaindex_agentic_rag.ipynbRAG, agentLLamaIndex
llamaindex_mistralai_finetuning.ipynbfine-tuningLLamaIndex
llamaindex_mistral_multi_modal.ipynbMultiModalLLM-PixtralLLamaIndex
Microsoft Autogen - Function calling a pgsql db Tool call, agent, RAGMs Autogen
Mesop Integration - Chat with PDFUI chat, demo, RAGMesop
neon_text_to_sql.ipynbcodeNeon
ollama_mistral_llamaindex.ipynbRAGLLamaIndex
Ollama Meetup DemodemoOllama
Open-source LLM engineeringLLM ObservabilityLangfuse
Panel Integration - Chat with PDFUI chat, demo, RAGPanel
phospho integrationEvaluation, Analyticsphospho
pinecone_rag.ipynbRAGPinecone
RAG.ipynbRAGLLamaIndex
RouterQueryEngine.ipynbagentLLamaIndex
self_rag_mistral.ipynbRAGLangchain
Streamlit Integration - Chat with PDFUI chat, demo, RAGStreamlit
SubQuestionQueryEngine.ipynbagentLLamaIndex
LLM Judge: Detecting hallucinations in language modelsfine-tuning, evaluationWeights & Biases
x mistral: CLI & TUI APP Module in X-CMDCLI, TUI APP, Chatx-cmd
Incremental Prompt Engineering and Model ComparisonPrompt Engineering, EvaluationPixeltable