Great Work Labs
Models / Search and retrieval

Pluck

Keyphrase extraction
pluck-1

The phrases a text is about, ready for tags and SEO.

Price$0.03 per 1,000 texts
Speed (our servers)679 to 806 ms
LanguagesBest in English; works in most European languages
InputText, batches up to 16
Built onintfloat/multilingual-e5-small (MIT)

Pluck pulls out the words and short phrases that best describe a text, picked so they don't repeat each other. Use them as tags, search keywords, or labels for a cluster.

diversity trades relevance for variety: 0 gives the closest phrases even if they overlap, 1 spreads them across the text.

Use it

curl https://labs.greatwork.company/v1/run \
  -H "Authorization: Bearer $GWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "pluck-1",
  "input": "Our insulated stainless steel water bottle keeps drinks cold for 24 hours and hot for 12. The leak-proof lid fits in a cup holder, and the powder coat won'\''t sweat or slip. Dishwasher safe, BPA free, available in 12 colors."
}'

Set GWL_API_KEY to a key from your dashboard. The bare name pluck works too and follows new versions.

Options

input: A string or array of up to 16 (up to 8,000 characters each).

NameTypeDefaultWhat it does
top_kinteger8How many phrases to return.
diversitynumber0.30 for the most relevant phrases, 1 for the most varied.

Output

FieldTypeMeaning
keyphrasesobject[]text and score (relevance to the whole text), in pick order.

Every response wraps this in {"id", "model", "output", "usage": {"units", "unit", "cost_usd"}, "latency_ms"}. Send an array as input and output is an array in the same order.

Examples

Product page

{
  "model": "pluck-1",
  "input": "Our insulated stainless steel water bottle keeps drinks cold for 24 hours and hot for 12. The leak-proof lid fits in a cup holder, and the powder coat won't sweat or slip. Dishwasher safe, BPA free, available in 12 colors."
}
{
  "keyphrases": [
    {
      "text": "keeps drinks cold",
      "score": 0.8442
    },
    {
      "text": "steel water bottle",
      "score": 0.8263
    },
    {
      "text": "leak-proof lid fits",
      "score": 0.818
    },
    {
      "text": "stainless",
      "score": 0.8091
    },
    {
      "text": "water bottle keeps",
      "score": 0.8237
    },
    {
      "text": "insulated",
      "score": 0.8116
    },
    {
      "text": "bottle keeps drinks",
      "score": 0.8345
    },
    {
      "text": "BPA free",
      "score": 0.8028
    }
  ]
}

Captured on our production servers: 806 ms, 1 text, $0.00003.

Article

{
  "model": "pluck-1",
  "input": "Solar panel prices fell another 15% this year as new factories in Southeast Asia came online, while battery storage costs dropped even faster. Utilities say the combination is making evening peak demand easier to cover without gas plants.",
  "top_k": 5
}
{
  "keyphrases": [
    {
      "text": "Solar panel prices",
      "score": 0.8539
    },
    {
      "text": "battery storage",
      "score": 0.8184
    },
    {
      "text": "Utilities",
      "score": 0.8165
    },
    {
      "text": "storage costs dropped",
      "score": 0.8075
    },
    {
      "text": "prices",
      "score": 0.8185
    }
  ]
}

Captured on our production servers: 679 ms, 1 text, $0.00003.

Good for

  • Auto-tag blog posts and docs
  • Suggest SEO keywords for a page
  • Label clusters of feedback
  • Build a tag cloud for a knowledge base

Limits and caveats

  • Phrases come from the text itself: it won't invent a category name that isn't written there (use Sort or Topic for that).

Pricing

$0.03 per 1,000 texts. One unit per started 2,000 characters. Failed calls aren't charged, and a call never costs more than its estimate (POST /v1/estimate tells you before you run it).

Built on

intfloat/multilingual-e5-small (with our phrase selection), 118M parameters. License: MIT. We run it on our servers.