# Cookbook

## Docs

- [Creating Demos with Spaces and Gradio](https://huggingface.co/learn/cookbook/enterprise_cookbook_gradio.md)
- [Open-Source AI Cookbook](https://huggingface.co/learn/cookbook/index.md)
- [Building A RAG System with Gemma, MongoDB and Open Source Models](https://huggingface.co/learn/cookbook/rag_with_hugging_face_gemma_mongodb.md)
- [Smol Multimodal RAG: Building with ColSmolVLM and SmolVLM on Colab's Free-Tier GPU](https://huggingface.co/learn/cookbook/multimodal_rag_using_document_retrieval_and_smol_vlm.md)
- [[Evaluating AI Search Engines with `judges` - the open-source library for LLM-as-a-judge evaluators ⚖️](#evaluating-ai-search-engines-with-judges---the-open-source-library-for-llm-as-a-judge-evaluators-)](https://huggingface.co/learn/cookbook/llm_judge_evaluating_ai_search_engines_with_judges_library.md)
- [Building RAG with Custom Unstructured Data](https://huggingface.co/learn/cookbook/rag_with_unstructured_data.md)
- [HuatuoGPT-o1 Medical RAG and Reasoning](https://huggingface.co/learn/cookbook/medical_rag_and_reasoning.md)
- [Suggestions for Data Annotation with SetFit in Zero-shot Text Classification](https://huggingface.co/learn/cookbook/labelling_feedback_setfit.md)
- [Clean an Existing Preference Dataset with LLMs as Judges](https://huggingface.co/learn/cookbook/clean_dataset_judges_distilabel.md)
- [Enterprise Hub Cookbook](https://huggingface.co/learn/cookbook/enterprise_cookbook_overview.md)
- [Advanced GRPO Fine-tuning for Mathematical Reasoning with Multi-Reward Training](https://huggingface.co/learn/cookbook/trl_grpo_reasoning_advanced_reward.md)
- [Build an agent with tool-calling superpowers 🦸 using smolagents](https://huggingface.co/learn/cookbook/agents.md)
- [Fine-Tuning a Vision Language Model with TRL using MPO](https://huggingface.co/learn/cookbook/fine_tuning_vlm_mpo.md)
- [Fine-tuning a Code LLM on Custom Code on a single GPU](https://huggingface.co/learn/cookbook/fine_tuning_code_llm_on_single_gpu.md)
- [Prompt Tuning With PEFT.](https://huggingface.co/learn/cookbook/prompt_tuning_peft.md)
- [🔖 GitHub Tag Generator with T5 + PEFT (LoRA)](https://huggingface.co/learn/cookbook/finetune_t5_for_search_tag_generation.md)
- [RAG Evaluation](https://huggingface.co/learn/cookbook/rag_evaluation.md)
- [Structured Generation from Images or Documents Using Vision Language Models](https://huggingface.co/learn/cookbook/structured_generation_vision_language_models.md)
- [Have several agents collaborate in a multi-agent hierarchy 🤖🤝🤖](https://huggingface.co/learn/cookbook/multiagent_web_assistant.md)
- [Information Extraction with Haystack and NuExtract](https://huggingface.co/learn/cookbook/information_extraction_haystack_nuextract.md)
- [Embedding multimodal data for similarity search using 🤗 transformers, 🤗 datasets and FAISS](https://huggingface.co/learn/cookbook/faiss_with_hf_datasets_and_clip.md)
- [Fine-tuning SmolVLM with TRL on a consumer GPU](https://huggingface.co/learn/cookbook/fine_tuning_smol_vlm_sft_trl.md)
- [Signature-Aware Model Serving from MLflow with Ray Serve](https://huggingface.co/learn/cookbook/mlflow_ray_serve.md)
- [Code Search with Vector Embeddings and Qdrant](https://huggingface.co/learn/cookbook/code_search.md)
- [Fine-tuning LLMs for Function Calling with xLAM Dataset](https://huggingface.co/learn/cookbook/function_calling_fine_tuning_llms_on_xlam.md)
- [Documentation Chatbot with Meta Synthetic Data Kit](https://huggingface.co/learn/cookbook/fine_tune_chatbot_docs_synthetic.md)
- [Generate a Preference Dataset with distilabel](https://huggingface.co/learn/cookbook/generate_preference_dataset_distilabel.md)
- [Advanced RAG on Hugging Face documentation using LangChain](https://huggingface.co/learn/cookbook/advanced_rag.md)
- [Fine-tuning SmolVLM using direct preference optimization (DPO) with TRL on a consumer GPU](https://huggingface.co/learn/cookbook/fine_tuning_vlm_dpo_smolvlm_instruct.md)
- [Fine-tuning LLM to Generate Persian Product Catalogs in JSON Format](https://huggingface.co/learn/cookbook/fine_tuning_llm_to_generate_persian_product_catalogs_in_json_format.md)
- [Vector Search on Hugging Face with the Hub as Backend](https://huggingface.co/learn/cookbook/vector_search_with_hub_as_backend.md)
- [Fine-Tuning a Semantic Segmentation Model on a Custom Dataset and Usage via the Inference API](https://huggingface.co/learn/cookbook/semantic_segmentation_fine_tuning_inference.md)
- [RAG backed by SQL and Jina Reranker v2](https://huggingface.co/learn/cookbook/rag_with_sql_reranker.md)
- [Building A RAG System with Gemma, Elasticsearch and Hugging Face Models](https://huggingface.co/learn/cookbook/rag_with_hugging_face_gemma_elasticsearch.md)
- [Prompt Optimization for Language Models with DSPy GEPA](https://huggingface.co/learn/cookbook/dspy_gepa.md)
- [Setup a Phoenix observability dashboard on Hugging Face Spaces for LLM application tracing](https://huggingface.co/learn/cookbook/phoenix_observability_on_hf_spaces.md)
- [Annotate text data using Active Learning with Cleanlab](https://huggingface.co/learn/cookbook/annotate_text_data_transformers_via_active_learning.md)
- [Agentic RAG: turbocharge your RAG with query reformulation and self-query! 🚀](https://huggingface.co/learn/cookbook/agent_rag.md)
- [How to use Inference Endpoints to Embed Documents](https://huggingface.co/learn/cookbook/automatic_embedding_tei_inference_endpoints.md)
- [Multi-Agent Order Management System with MongoDB](https://huggingface.co/learn/cookbook/mongodb_smolagents_multi_micro_agents.md)
- [Multimodal Retrieval-Augmented Generation (RAG) with Document Retrieval (ColPali) and Vision Language Models (VLMs)](https://huggingface.co/learn/cookbook/multimodal_rag_using_document_retrieval_and_vlms.md)
- [Fine-Tuning Object Detection Model on a Custom Dataset 🖼, Deployment in Spaces, and Gradio API Integration](https://huggingface.co/learn/cookbook/fine_tuning_detr_custom_dataset.md)
- [Migrating from OpenAI to Open LLMs Using TGI's Messages API](https://huggingface.co/learn/cookbook/tgi_messages_api_demo.md)
- [Fine tuning a VLM for Object Detection Grounding using TRL](https://huggingface.co/learn/cookbook/fine_tuning_vlm_object_detection_grounding.md)
- [Simple RAG for GitHub issues using Hugging Face Zephyr and LangChain](https://huggingface.co/learn/cookbook/rag_zephyr_langchain.md)
- [Fine-Tuning a Vision Language Model (Qwen2-VL-7B) with the Hugging Face Ecosystem (TRL)](https://huggingface.co/learn/cookbook/fine_tuning_vlm_trl.md)
- [Interactive Development In HF Spaces](https://huggingface.co/learn/cookbook/enterprise_cookbook_dev_spaces.md)
- [Semantic reranking with Elasticsearch and Hugging Face](https://huggingface.co/learn/cookbook/semantic_reranking_elasticsearch.md)
- [Data Annotation with Argilla Spaces](https://huggingface.co/learn/cookbook/enterprise_cookbook_argilla.md)
- [Inference Endpoints (dedicated)](https://huggingface.co/learn/cookbook/enterprise_dedicated_endpoints.md)
- [Introduction](https://huggingface.co/learn/cookbook/benchmarking_tgi.md)
- [Enhancing RAG Reasoning with Knowledge Graphs](https://huggingface.co/learn/cookbook/rag_with_knowledge_graphs_neo4j.md)
- [Fine-tuning Granite Vision 3.1 2B with TRL](https://huggingface.co/learn/cookbook/fine_tuning_granite_vision_sft_trl.md)
- [Implementing semantic cache to improve a RAG system with FAISS.](https://huggingface.co/learn/cookbook/semantic_cache_chroma_vector_database.md)
- [Scaling Test-Time Compute for Longer Thinking in LLMs](https://huggingface.co/learn/cookbook/search_and_learn.md)
- [Analyzing Artistic Styles with Multimodal Embeddings](https://huggingface.co/learn/cookbook/analyzing_art_with_hf_and_fiftyone.md)
- [Multimodal RAG with ColQwen2, Reranker, and Quantized VLMs on Consumer GPUs](https://huggingface.co/learn/cookbook/multimodal_rag_using_document_retrieval_and_reranker_and_vlms.md)
- [Building A RAG Ebook "Librarian" Using LlamaIndex](https://huggingface.co/learn/cookbook/rag_llamaindex_librarian.md)
- [Post training a VLM for reasoning with GRPO using TRL](https://huggingface.co/learn/cookbook/fine_tuning_vlm_grpo_trl.md)
- [Fine-tuning a Vision Transformer Model With a Custom Biomedical Dataset](https://huggingface.co/learn/cookbook/fine_tuning_vit_custom_dataset.md)
- [Post training an LLM for reasoning with GRPO in TRL](https://huggingface.co/learn/cookbook/fine_tuning_llm_grpo_trl.md)
- [Detecting Issues in a Text Dataset with Cleanlab](https://huggingface.co/learn/cookbook/issues_in_text_dataset.md)
- [Images Interpolation with Stable Diffusion](https://huggingface.co/learn/cookbook/stable_diffusion_interpolation.md)
- [Efficient Online Training with GRPO and vLLM in TRL](https://huggingface.co/learn/cookbook/grpo_vllm_online_training.md)
- [Data analyst agent: get your data's insights in the blink of an eye ✨](https://huggingface.co/learn/cookbook/agent_data_analyst.md)
- [Multi-agent RAG System 🤖🤝🤖](https://huggingface.co/learn/cookbook/multiagent_rag_system.md)
- [RAG with source highlighting using Structured generation](https://huggingface.co/learn/cookbook/structured_generation.md)
- [Agent for text-to-SQL with automatic error correction](https://huggingface.co/learn/cookbook/agent_text_to_sql.md)
- [Build RAG with Hugging Face and Milvus](https://huggingface.co/learn/cookbook/rag_with_hf_and_milvus.md)
- [LLM Gateway for PII Detection](https://huggingface.co/learn/cookbook/llm_gateway_pii_detection.md)
- [Hyperparameter Optimization with Optuna and Transformers](https://huggingface.co/learn/cookbook/optuna_hpo_with_transformers.md)
- [Serverless Inference API](https://huggingface.co/learn/cookbook/enterprise_hub_serverless_inference_api.md)
- [Using LLM-as-a-judge 🧑‍⚖️ for an automated and versatile evaluation](https://huggingface.co/learn/cookbook/llm_judge.md)
