Look up structured data with retrieval UDFs
Create lookup functions that query tables by key—for customer records, product catalogs, or financial data.
Convert a table with computed columns into a callable function for multi-agent workflows and pipeline composition.
Agents · Notebook · Updated
Colab runs it in your browser. If it calls a model provider, it asks for that provider's API key in a cell.
You wrap an entire table pipeline as a function. When you call this function from another table, it inserts a row into the agent table, runs all computed columns, and returns the specified output column.
pip install pixeltable openai
OPENAI_API_KEYopenai.chat_completions()pxt.create_table()pxt.udf()add_computed_column()insert()# Add the LLM call as a computed columnsummarizer.add_computed_column(response=chat_completions(messages=[{'role': 'user','content': 'Summarize this in one sentence:\n\n'+ summarizer.text,}],model='gpt-4o-mini',))
One cell of the notebook, copied as it is. Open it in Colab for the rest.
Create lookup functions that query tables by key—for customer records, product catalogs, or financial data.
Enable LLMs to call functions and tools, then execute the results automatically.
Build the six architectural patterns of agentic AI (prompt chaining, routing, parallelization, tool use, evaluator-optimizer, orchestrator-worker) and the ReAct and planning strategies as Pixeltable tables and computed columns.
Create a retrieval-augmented generation system that answers questions using your documents as context.