Felipe Saint-Jean
· LLMs

OpenAI Structured Output and Function Calling

A portfolio management agent built on structured outputs and function calls.

OpenAI Structured Output and Function Calling

In this article we will see how to use to powerful features of OpenAIs API, Structured Output and Function Calling to create a portfolio management team.

If ChatGPT is a brain, Function Calling gives the brain hands to do things. And Structured Output allows your POC (Plain Old Code) to interact with ChatGTP in a with agreed upon data structures.

Let’s jump right in into an example of a team of Agents making investment decisions.

Let’s define our All Star Portfolio Management Team.

  1. Analyst Bob : This guy will read reports, news and trending stocks to come up with investment ideas.
  2. Researcher Stuart will look at each idea by Bob and go deep in the numbers. Distinguish the good investments from noise.
  3. Decider Kevin will look into each researched idea and decide yes, we will invest into this idea, or no hard pass. He does this by observing the portfolio as a whole and see what fits into the overall investment strategy.
  4. Trader Dave will take the list of investment and will place orders. He will decide entry levels, stop-loss and exit levels.

We can build each of this guys into AI Agent. Each agent with his set of tools (for…

This post is for Medium members. Continue on Medium

Originally published on Medium

Contact

Tell me what you're building.