Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Extract Summary Sentences

text.extract_summary_sentences

ProductionEngine wrapper (Class A)Deterministicstrictmoderatev1.0.0
No network

Overview

You send prose up to two mebibytes and we return a subset of its own sentences, never invented wording. ICU sentence and word boundaries score each sentence by in-document term frequency after stopword removal. maxSentences defaults to 5 and tops out at 50. Optional maxCharacters refuses to add a sentence that would overflow the budget rather than truncating it. Spans are original character offsets so slicing the source reconstructs each selected sentence. This does not paraphrase, translate, or parse HTML. A successful call costs 2 execution credits.

Agents need a published extractive subset of existing sentences, not a paraphraser.

Reliability

Sentence and word boundaries follow the pinned ICU 76.1 locale data. TEXT_SUMMARY_LIMIT_EXCEEDED — trigger: text longer than 2097152 characters, more than 50 maxSentences, or more than 2000 stopwords; retryable: no; next: split the source or lower the cap. TEXT_SUMMARY_INVALID — trigger: a blank locale or a stopword outside 1-64 characters; retryable: no; next: send a BCP-47 tag and bounded stopwords.

Context footprint

Returned sentences are original substrings. A successful call costs 2 execution credits.

When to use it

When a caller already holds prose and needs a bounded extractive highlight with original spans.

When the task is abstractive rewriting, HTML parsing, or factuality checking.

Powered by ICU4J 76.1 sentence and word BreakIterator. No language model is involved.

Scope

Note
Selects existing sentences as an extractive summary using ICU boundaries and in-document term frequency.

Non-goals

  • Does not paraphrase or invent wording
  • Does not parse HTML or documents
  • Does not assess factuality

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

analysistext-processing

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call2 credits

File handling

Accepts file_refProduces file_refMax input2 MB

How we handle your data

Sensitive output possible
What this means

This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response may contain submitted or transformed content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
textstringYesSource prose, 0 through 2097153 characters; runtime accepts at most 2097152.
localestringNoBCP-47 tag selecting ICU sentence and word rules; omit it for en.
maxSentencesintegerNoHow many sentences to keep, 1 through 51; omit it for 5. Runtime accepts at most 50.
maxCharactersintegerNoConcatenated-summary character budget, 1 through 2097153. Omit it for no extra cap.
preserveOrderbooleanNoTrue emits selected sentences in document order; omit it for true.
stopwordsarrayNoCaller stopwords, 0 through 2001 strings of 1 through 64 characters that replace the built-in English list. Omit it to use the built-in list.

Output schema

FieldTypeRequiredDescription
sentencesarrayYesSelected sentences in the applied order, 0 through 50 closed {text, start, end, score, index} objects.
summarystringYesSelected sentence texts joined with a single space, 0 through 2097152 characters.
localestringYesBCP-47 locale tag that was actually applied to segmentation and scoring.
maxSentencesintegerYesSentence cap that was actually applied to this call.
preserveOrderbooleanYesWhether selected sentences were emitted in document order.
candidateCountintegerYesHow many non-blank sentences ICU found in the source.
selectedCountintegerYesHow many sentences were kept after ranking and optional character budget.
enginestringYesPinned ICU engine coordinate used for this answer.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"text.extract_summary_sentences","input":{"text":"Cats chase mice. Dogs chase cats. Mice hide from cats."}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("text.extract_summary_sentences", {"text":"Cats chase mice. Dogs chase cats. Mice hide from cats."});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
TEXT_SUMMARY_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.
TEXT_SUMMARY_INVALID400NoThe request payload failed this skill's input validation.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not paraphrase or invent wording
  • Does not parse HTML or documents
  • Does not assess factuality
  • Abstractive summarization
  • HTML or PDF extraction

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "text.extract_summary_sentences",
  "input": {
    "text": "Cats chase mice. Dogs chase cats. Mice hide from cats."
  }
}

Examples

Three short sentences keep the two that mention cats most

Inputjson
{
  "text": "Cats chase mice. Dogs chase cats. Mice hide from cats."
}
Expected outputjson
{
  "locale": "en",
  "maxSentences": 5,
  "candidateCount": 3,
  "sentences": [
    {
      "text": "Cats chase mice. ",
      "start": 0,
      "end": 17,
      "score": 2.333333,
      "index": 0
    },
    {
      "text": "Dogs chase cats. ",
      "start": 17,
      "end": 34,
      "score": 2,
      "index": 1
    },
    {
      "text": "Mice hide from cats.",
      "start": 34,
      "end": 54,
      "score": 2,
      "index": 2
    }
  ],
  "preserveOrder": true,
  "engine": "com.ibm.icu:icu4j",
  "selectedCount": 3,
  "summary": "Cats chase mice.  Dogs chase cats.  Mice hide from cats."
}
Tip
Frequency scoring prefers sentences that repeat content words already in the document.

Whitespace-only prose yields no candidate sentences

Inputjson
{
  "text": "   "
}
Expected outputjson
{
  "locale": "en",
  "maxSentences": 5,
  "candidateCount": 0,
  "sentences": [],
  "preserveOrder": true,
  "engine": "com.ibm.icu:icu4j",
  "selectedCount": 0,
  "summary": ""
}
Tip
Blank input is a successful empty summary, not a validation error.
  • Keep the most frequent-term sentences of a short article
  • Produce span-aligned extractive highlights

Avoid for

  • Abstractive summarization
  • HTML or PDF extraction

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

analysistext