Skip to content

Overview

PXL (Probably Expression Language) is a focused language with six core functions for data analysis: filter, extract, classify, score, ntile, and word_count.

Intelligent Expression Language

PXL combines the precision of code with the simplicity of natural language. Write expressions that feel natural while leveraging the full power of AI-assisted data analysis.

PXL provides six essential functions for data analysis:

  • filter: Apply conditional filters to data
  • extract: Use AI to extract themes and concepts from text
  • classify: Categorize text into defined groups
  • score: Rate text along semantic scales
  • ntile: Create statistical buckets from numeric data
  • word_count: Count words in text fields

PXL is designed to be:

  • Simple: Six functions cover most data analysis needs
  • Readable: Functions use natural language descriptions
  • AI-Powered: Text functions leverage machine learning
  • Focused: Built specifically for analytical workflows
filter(revenue > 1000 and status = "active")
classify(customer_feedback into ("positive", "negative", "neutral"))
filter(amount > 500)
extract("sentiment" from review_text)
score(review_text from "negative" to "positive")

Text Analysis Functions

  • extract: Uses AI clustering to identify themes in text
  • classify: AI-powered categorization into defined groups
  • score: Semantic rating along specified scales
  • Natural language descriptions in function parameters

Available Functions

// Filter data based on conditions
filter(column_name > value and other_column = "text")
// Extract information using AI
extract("what to extract" from text_column)
// Classify data into categories
classify(text_column into ("category1", "category2", "category3"))
// Score text between two concepts
score(text_column from "negative" to "positive")
// Statistical bucketing
ntile(numeric_column, 4)
// Count words in text
word_count(text_column)

Individual Functions Each PXL function operates on data independently:

filter(status = "active")
classify(feedback into ("positive", "negative"))
score(feedback from "bad" to "good")

Semantic Operations

  • Extract: Pull specific information from text using AI
  • Classify: Categorize text into predefined groups
  • Score: Rate text on semantic scales
  • Filter: Apply AI-powered filtering criteria

Example

extract("customer sentiment" from review_text) ->
classify(review_text into ("complaint", "praise", "question")) ->
score(review_text from "negative" to "positive")

Statistical Bucketing

ntile(revenue, 5) // Split into 5 revenue tiers
word_count(description) // Count words in text

Filtering Examples

filter(amount > 1000 and status = "active")
filter(category in ("A", "B", "C"))
filter(date after "2023-01-01")

DuckDB Integration

  • Functions execute using DuckDB’s query engine
  • Columnar processing for analytical workloads
  • Automatic parallelization for larger datasets
  • Memory-efficient processing
  • Text functions use clustering to reduce API calls
  • Caching of similar text analysis results
  • Efficient batching for large text datasets

Expression Bar

  • Type PXL expressions in the formula bar
  • Apply functions to create new columns
  • View function results in spreadsheet
  • Error messages for invalid syntax

Question-Based Analysis

  • Ask questions that use PXL functions behind the scenes
  • Agent automatically applies appropriate functions
  • Text analysis through natural language queries
  • Filter and analyze data through conversation
  1. Identify Analysis Need: Determine what function to use
  2. Write Expression: Use appropriate PXL function
  3. Apply to Data: Execute function on dataset
  4. Review Results: Check output and refine if needed

Function Usage

// Use descriptive text in AI functions
extract("customer sentiment" from review_text)
classify(feedback into ("complaint", "praise", "question"))
score(review_text from "very negative" to "very positive")
// Filter data efficiently
filter(status = "active" and amount > 1000)

Effective Analysis

  • Use specific descriptions in text functions
  • Filter data to focus analysis
  • Check results and refine function parameters
  • Combine different function types as needed

Syntax & Structure

Learn the fundamental syntax, operators, and language constructs.

Built-in Functions

Explore the comprehensive library of built-in functions and operations.

Advanced Techniques

Master advanced patterns, optimization, and complex analysis workflows.