---
title: "How we leveraged distilabel to create an Argilla 2.0 Chatbot"
description: "A domain-specific documentation chatbot for Argilla 2.0 is built by chunking the project's markdown docs into ~256-token pieces and using distilabel with Llama-3-70B-Instruct to generate synthetic query triplets (anchor, positive, hard negative)."
url: "https://swe.quest/articles/how-we-leveraged-distilabel-to-create-an-argilla-2-0-chatbot-9ee15d1d6b37ab7a"
canonical: "https://huggingface.co/blog/argilla-chatbot"
source: "Hugging Face"
published: "2024-07-16"
difficulty: "medium"
kind: "How-to"
reading_minutes: 33
tags: ["rag","model-training","python","vector-search","llms"]
---

# How we leveraged distilabel to create an Argilla 2.0 Chatbot

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2024-07-16, 33 min read, How-to. Original: [https://huggingface.co/blog/argilla-chatbot](https://huggingface.co/blog/argilla-chatbot)

## Summary

A domain-specific documentation chatbot for Argilla 2.0 is built by chunking the project's markdown docs into ~256-token pieces and using distilabel with Llama-3-70B-Instruct to generate synthetic query triplets (anchor, positive, hard negative). A custom MultipleQueries task triples the positives to augment the 251-chunk dataset. The triplets fine-tune a Sentence Transformers embedding model, which populates a vector database of doc chunks stored on the Hugging Face Hub. The result is a Gradio app deployed to Hugging Face Spaces that logs conversations to Argilla for ongoing evaluation.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [RAG & retrieval](https://swe.quest/tags/rag.md) (AI & ML)
- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Python](https://swe.quest/tags/python.md) (Languages)
- [Vector search](https://swe.quest/tags/vector-search.md) (Data & databases)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)

## Prerequisites

- RAG basics ([easy posts on RAG & retrieval](https://swe.quest/tags/rag.md?difficulty=easy))
- Python ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))
- embedding models
- LLM prompting ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))

## Keywords

distilabel, Argilla, Sentence Transformers, Llama 3, Hugging Face Spaces, Gradio

## Related posts

- [Building Data-Aware AI Applications with Heroku AI and LlamaIndex](https://swe.quest/articles/building-data-aware-ai-applications-with-heroku-ai-and-llamaindex-8f85403b0aabecc2.md): Heroku Engineering · 2025-08-19 · Medium · 4 min read · RAG & retrieval, Vector search, PostgreSQL, Python, LLMs
  A RAG stack on Heroku pairs LlamaIndex for ingestion, indexing and retrieval with Heroku Managed Inference (Claude 4 Sonnet via an OpenAI-compatible API), Cohere Embed Multilingual for embeddings, and Heroku Postgres with pgvector as the vector store.
- [Hugging Face x LangChain : A new partner package](https://swe.quest/articles/hugging-face-x-langchain-a-new-partner-package-4a05b92542fbd2d8.md): Hugging Face · 2024-05-14 · Medium · 4 min read · LLMs, Python, Inference & serving, RAG & retrieval
  langchain-huggingface is a new Python partner package jointly maintained by Hugging Face and LangChain, replacing community-written integrations that had drifted out of date.
- [Build a Domain-Specific Embedding Model in Under a Day](https://swe.quest/articles/build-a-domain-specific-embedding-model-in-under-a-day-f4f33fdd5dd688e6.md): Hugging Face · 2026-03-20 · Medium · 13 min read · RAG & retrieval, Model training, Search, Inference & serving
  A single-GPU pipeline fine-tunes Llama-Nemotron-Embed-1B-v2 for a specific domain in under a day without manual labels.
- [Investing in Performance: Fine-tune small models with LLM insights - a CFM case study](https://swe.quest/articles/investing-in-performance-fine-tune-small-models-with-llm-insights-a-cfm-case-116aeecc59f2bbd4.md): Hugging Face · 2024-12-03 · Medium · 23 min read · Model training, LLMs, Inference & serving, Cost optimization, Python
  Capital Fund Management built a financial named-entity recognition pipeline that extracts company names from Benzinga news headlines in the FNSPID dataset.
- [Mistral 7B and BAAI on Workers AI vs. OpenAI Models for RAG](https://swe.quest/articles/mistral-7b-and-baai-on-workers-ai-vs-openai-models-for-rag-30d70a2c28e85606.md): Neon · 2023-12-11 · Medium · 7 min read · RAG & retrieval, LLMs, Evaluation, Inference & serving
  Swapping gpt-3.5-turbo for mistral-7b-instruct-v0.1 and text-embedding-ada-002 for BAAI's bge-base-en-v1.5 (both on Cloudflare Workers AI) in Neon's docs chatbot shows embeddings are close to interchangeable but text generation is not.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
