Examples¶
Each example solves one real problem from start to finish, with the real replies of real models. They assume you have read Get started.
- Types in, types out: extraction with FunctAI: Types in, types out: lists, dicts, enums, literals, dataclasses, pydantic models.
- Comments are prompts: Comments are prompts: on parameters, the return line, class fields and outputs.
- A terminal assistant: tools and memory: A terminal assistant: a shell tool with an allow-list, and memory.
- A research agent: tools that read the web, and a fact checker: An agent that reads the web, a fact checker, and the same agent on a local model.
- Building a knowledge graph, one chunk at a time: A knowledge graph built chunk by chunk with pydantic models, then queried.
- Programs of several AI functions: a multi-hop fact checker: A multi-hop fact checker as one @module: evaluated, optimized, run on a table.
- Optimizing a prompt: English to Québécois French: English to Québécois French: an AI judge as the metric, InstructionSearch, before and after.
- Tracking and observability: what was sent, what it cost, how it went: Observability: phistory, token usage, logged evaluation runs, the reply cache.