Skip to main content
This cookbook demonstrates how to use Model Inference to automatically generate descriptions for datasets based on their metadata and sample data. This is useful for documenting datasets, improving discoverability, and maintaining data catalogs.

What this recipe accomplishes

  • Fetch dataset metadata and column information
  • Analyze sample data to understand content patterns
  • Generate a comprehensive, human-readable description
  • Update the dataset with the generated description

Prerequisites

  • SDK installed and configured (see Authentication)
  • A dataset that needs a description
  • A data plane ID where inference will run

Complete example

How it works

  1. Fetch metadata: The script retrieves the dataset’s schema and existing metadata
  2. Get sample data: A sample of records helps the model understand actual data patterns
  3. Build context: Schema information and sample data are formatted into a comprehensive prompt
  4. Generate description: Model Inference analyzes the data and generates structured documentation
  5. Update dataset: The generated description can be applied back to the dataset

Variations

Batch processing multiple datasets

Description quality scoring

Running Inference

Inference fundamentals

Managing Datasets

Dataset operations

Structured Output

Define response schemas

Model Inference Overview

How inference works