Skip to content

Latest commit

 

History

History
170 lines (131 loc) · 16.8 KB

File metadata and controls

170 lines (131 loc) · 16.8 KB
title Examples Guide
description Comprehensive examples showcasing Ax framework capabilities

Ax Examples Guide

This page lists every runnable example in src/examples/, grouped by theme and linked to GitHub for easy browsing.

Getting Started

  • chat.ts - Basic chat example with function calling and conversation flow.
  • extract.ts - Extract structured fields from free-form text.
  • extract-test.ts - Small extraction test case with typed outputs.
  • summarize.ts - Summarize a list of updates into multiple output formats.
  • simple-classify.ts - Lightweight text classification with labeled classes.
  • marketing.ts - Generate marketing-style copy from prompts.
  • embed.ts - Create embeddings and inspect the returned vectors.
  • prime.ts - Simple reasoning task around prime number generation.
  • fibonacci.ts - Use an AI call plus runtime execution to compute Fibonacci numbers.

Signatures, Structured Output, and Examples

Functions and Tool Calling

Streaming, Assertions, and Control Flow

Agents and Agent Patterns

RLM and Runtime-State Examples

Flow Orchestration

Optimization, Training, and Evaluation

RAG, Retrieval, and Memory

  • vectordb.ts - Insert text into an in-memory vector DB and query it.
  • rag-docs.ts - Build a simple document ingestion and retrieval pipeline.
  • advanced-rag.ts - Extend RAG with custom retrieval behavior.

Multi-Modal, Audio, and Vision

Provider-Specific Examples

Anthropic

Gemini and Vertex

OpenAI

Other Providers

MCP Integrations

Routing, Balancing, and Service Selection

Observability and Debugging

Browser, Local Runtime, and Deployment