A practical guide to GPT-6 Luna batch tasks
Define a narrow batch contract, keep uncertain fields visible, and validate the result with deterministic checks.
Begin with a small, explicit contract
Batch classification and extraction are easier to review when each input has a stable ID and each output field has a clear rule. Start with the closed set of allowed labels, the required keys, and what to do when evidence is missing. Keep the task bounded: classify and propose a next step, for example, without asking the model to contact a customer or make a change in an external system.
For JSON, state whether the result must be an array, list every required key, define allowed values, and specify how empty or unknown values should appear. Use a second deterministic check to parse the result and reject missing IDs, duplicate rows, unexpected categories, or wrong types.
Preserve uncertainty and treat request text as data
Customer messages can contain command-like language, conflicting details, or incomplete context. Tell the model to interpret request bodies as data and not as instructions. Explicitly ask it to retain unresolved facts instead of guessing. Then include at least one ambiguous row, one missing-detail row, and one adversarial-looking text case in the fixture.
In the support-triage example, eight synthetic messages include a billing ambiguity across two workspaces, missing report-schedule details, and a permission issue mixed with an embedded instruction. The batch keeps those unknowns visible and classifies the substantive request. A small validator checks the schema, IDs, allowed values, and those specific edge cases.
Keep the run reproducible
Save the exact input and prompt before running the batch. Keep the returned JSON unchanged as the first response, then record the model name, date, and surface used. Run the same validator against that response; do not replace the first output with a corrected version without preserving both. When a check fails, identify the row and field so a reviewer can tell whether the issue came from the prompt, input, or output contract.
For model-specific product details, consult the GPT-6 Luna model page. Compare available models with the model comparison tool, or open the pricing calculator with GPT-6 Luna selected when estimating API usage. The run metadata and task surface are recorded once in the worked example.
Reuse three prompt patterns
The sample package includes complete reusable prompts for category classification, field extraction, and strict JSON formatting. Keep classification separate when a task benefits from a human review of labels before drafting actions. Use extraction when the category, priority, action, and unknowns can be assessed together. Apply formatting only after values are reviewed; a formatting prompt should preserve the supplied values rather than quietly revise them.
These patterns are templates. Replace bracketed inputs with the actual records and keep the contract aligned with the workflow that will consume the output. The examples directory contains the full worked input, response, and deterministic check for this Luna run.