{
  "title": "Wikipedia + Huggingface",
  "video_id": "QuHmoZSJ1hQ",
  "published": "2024-02-26T13:13:43+0000",
  "complexity": "Complex",
  "old_url": "https://workflows-of-ai.com/workflow/wikipedia-huggingface",
  "description": "Use the AI Interpolator MediaWiki plugin to fetch Wikipedia text and a free Hugging Face model to answer questions from it in Drupal.",
  "subtitle": "Fetch a Wikipedia article as context and let a free Gemma model on Hugging Face answer a question from it.",
  "summary": "The MediaWiki plugin fills a field with the Wikipedia article for a title, so the AI has real context to answer from. The Hugging Face module connects Drupal to models on the Hugging Face Inference API, free serverless or paid dedicated endpoints. A Gemma 2B model then answers how many members Drupal has, using only the fetched article.",
  "categories": [
    "Drupal AI"
  ],
  "intro_html": "<p>In this video we will introduce the AI Interpolator MediaWiki and the Hugging Face module, and use them together with the AI Interpolator module.</p><p>The idea is to factually answer some question that we might have about any topic.</p><p>The MediaWiki plugin makes it possible to use a MediaWiki, like Wikipedia, as a context source to make sure that your AI does not hallucinate, or can answer questions based on context it's not trained on.</p><p>The Hugging Face plugin opens up a world of AI models for the AI Interpolator, by using the Inference API they have. This makes it possible to run fine-tuned, uncensored or private models within Drupal.</p>",
  "intro_added": false,
  "chapters": [
    "0:00 The MediaWiki plugin",
    "1:34 The Hugging Face module",
    "3:05 Free and paid inference endpoints",
    "5:54 Finding models on Hugging Face",
    "7:33 Installing the modules",
    "9:00 Adding the Hugging Face token",
    "9:45 Fetching the Wikipedia article",
    "11:08 Text generation with Gemma",
    "14:25 An answer from context",
    "15:28 What comes next"
  ],
  "corrections": [
    [
      "Media Wiki",
      "MediaWiki"
    ],
    [
      "media Wiki",
      "MediaWiki"
    ],
    [
      "Wiki quote",
      "Wikiquote"
    ],
    [
      "hugging face",
      "Hugging Face"
    ],
    [
      "hugging phase",
      "Hugging Face"
    ],
    [
      "hugging phas module",
      "Hugging Face module"
    ],
    [
      "hugging phas lets",
      "Hugging Face lets"
    ],
    [
      "huging phase",
      "Hugging Face"
    ],
    [
      "huging face",
      "Hugging Face"
    ],
    [
      "hugin phase",
      "Hugging Face"
    ],
    [
      "huggingface doco",
      "huggingface.co"
    ],
    [
      "Google schema",
      "Google Gemma"
    ],
    [
      "truple",
      "Drupal"
    ],
    [
      "druple",
      "Drupal"
    ],
    [
      "open a GPT",
      "OpenAI GPT"
    ],
    [
      "gp4",
      "GPT-4"
    ],
    [
      "a anator",
      "AI Interpolator"
    ],
    [
      "D dev",
      "DDEV"
    ]
  ],
  "ai_note": "The video and the introduction are Marcus's own, first published on workflows-of-ai.com. AI wrote the subtitle, the summary and the video chapters from the transcript, and corrected misheard names in YouTube's automatic captions."
}