Notebooks
A
Arize AI
Openai Agents Prompt Chaining

Openai Agents Prompt Chaining

agentsllmsLlamaIndexarize-phoenixopenaitutorialsevalsllmopsai-monitoringaiengineeringprompt-engineeringdatasetsllm-evalai-observabilityllm-evaluationsmolagentsanthropiclangchain

Open In Colab

OpenAI agent pattern: prompt chaining agent

A starter guide for building an agent which chains two prompts together to generate an output using the openai-agents library.

In the following example, we'll build a stock portfolio creation system using this pattern:

  1. Search Agent (Generation): Searches the web for information on particular stock tickers.
  2. Report Agent (Generation): Creates a portfolio of stocks and ETFs that supports the user's investment strategy.

Install Libraries

[ ]

Setup Keys

Add your OpenAI API key to the environment variable OPENAI_API_KEY.

Copy your Phoenix API_KEY from your settings page at app.phoenix.arize.com.

[ ]

Setup Tracing

[ ]

Creating the agent

[ ]