Text

Structured extraction

Convert operational text into the fixed structured-summary schema supported by Perigee-1-text.

OrbitalsAI structured extraction currently uses the structured summarization style. It returns a fixed six-field object; arbitrary user-defined JSON schemas are not supported.

import os
import orbitalsai
 
client = orbitalsai.Client(api_key=os.environ["ORBITALSAI_API_KEY"])
 
result = client.summarize(
    text=(
        "Customer says a card payment was charged twice. "
        "The agent opened case TX-1842 and promised an update tomorrow."
    ),
    language="English",
    style="structured",
)
 
fields = result.structured
print(fields.customer_issue)
print(fields.resolution_status)
print(fields.next_action)

Output

{
  "summary": "The customer reported a duplicate card payment.",
  "customer_issue": "Duplicate card payment",
  "sentiment": null,
  "resolution_status": "pending",
  "next_action": "Provide an update tomorrow",
  "important_entities": ["TX-1842"]
}
FieldBehavior
summaryHigh-level English summary.
customer_issueMain issue, or null when it is not stated.
sentimentModel-produced sentiment value, or null.
resolution_statusResolution state inferred from the text, or null.
next_actionStated follow-up, or null.
important_entitiesModel-produced list; empty when none are found.

Validate the returned object before writing it to operational systems. Treat nullable fields as “not stated,” and verify model-produced entities when they drive an action.

Structured summaries are synchronous or asynchronous, but do not stream.

Next steps

On this page