Skip to main content

Prompt Structure

Prompts in Machina Sports use this YAML format:
The schema section defines the expected structure of the AI’s response, ensuring consistent and properly formatted outputs.
Quick Action: Create your first prompt in Developer Studio → Prompts → New Prompt and use the schema validator to test output format.

Real-World Examples

Chat Completions Prompt

Use this example for chat completions:

Team Summary Prompt

Generate NBA team summaries with this example:
Tip: Create a library of reusable schema components to maintain consistency across prompts and speed up development.

Using Prompts in Workflows

Add prompts to workflows as tasks to generate content or process data:
Quick Action: Test your prompt in isolation using the “Test” button before integrating it into a workflow.

Schema Components

Basic Types

  • string: Text values
  • integer: Whole numbers
  • number: Decimal numbers
  • boolean: True/false values
  • array: Lists of items
  • object: Nested structures with properties

Constraints

  • required: List of required properties
  • minItems/maxItems: Limits on array length
  • minimum/maximum: Limits on numeric values
  • pattern: Regex pattern for string validation

Common Prompt Patterns

Structured Content Generation

Define schemas for generating articles, summaries, or reports with consistent sections.

Conversational Responses

Create prompts for natural dialogue with users, including follow-up questions.

Data Analysis

Design prompts that analyze sports data and extract insights or predictions.

Multi-format Outputs

Generate content that includes different components like titles, body text, and metadata.
Tip: Start with simple prompts and gradually add complexity as you validate outputs. This approach helps maintain quality as you scale.

Best Practices

  • Use descriptive schema property names and descriptions
  • Include examples in descriptions to guide the AI
  • Define clear constraints to ensure consistent outputs
  • Test prompts with various inputs to ensure robust responses
  • Use appropriate models for different prompt complexity levels

Next Steps