# Cookbook

## Docs

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