blog hero

Feb 27, 2025 4 MIN

How function-calling and context-aware AI shapes OpenBB

Building on OpenBB's presentation at the Anote AI Day Summit, this post explores how intelligent function calling serves as the cornerstone of our AI-native workspace for data analytics.

I recently had the opportunity to present our OpenBB Copilot and how most of what it does is function calling, in the Anote AI Day Summit (It is All Function Calling - Anote AI Day Summit 2025).

This blog post is a similar presentation in text-written format.

Our vision for the OpenBB Workspace

At the core of our product is the OpenBB workspace, a fully customizable dashboard where users can control their data visualization and analysis. The middle section shows a dashboard that you can fully customize with widgets containing relevant data widgets. We've designed it with a practical sidebar for managing dashboards, folder organization, sharing capabilities, templates, and data connections.

But what I'm going to talk about is our agentic sidebar on the right. This is effectively your AI agent that works as an analyst with access to all the data inside the product. And this is where our implementation of function calling becomes crucial.

Context is key

We've developed three ways to provide context to our Copilot:

1. Explicit context: We've added a simple button on the top right of widgets that allows users to directly add them to the Copilot's context. You can also simply drop files into the Copilot window.

  1. Dashboard context: In this case, the Copilot can access all data present on the current dashboard and will then inform the user which widgets were used.
  1. Global context: Through a feature flag, users can also enable searching across all widgets within the workspace.

What's important is how we've prioritized these: explicit context takes precedence, followed by dashboard context, and then global context.

It's similar to an analyst's process—you begin by examining the document in front of you, then assess the items on your desk, and finally consider your wider resources, such as Google Drive or Slack.

The power of widget metadata

One of our key innovations is our metadata system.

Each widget in our product has what we call "widget metadata" composed of five components:

  • Title
  • Category
  • Subcategory
  • Description
  • Data source

We convert this metadata into embeddings and compare it against user prompts to determine which functions the Copilot should access. This allows us to scale effectively while maintaining accuracy, especially since there can be literally thousands of data widgets. Due to the metadata, widgets are only invoked when a user triggers a relevant prompt.

Function Calling in practice

Let me share some real examples of how this works.

Basic function calls

When analyzing unstructured data like market reports, our Copilot can extract specific information without parameter changes:

Copilot understands from widget metadata that the user requires information from it and queries it:

In turn that data is utilized to answer the prompt:

Parameter-modified calls

We can handle cases where users want to switch contexts.

For instance, even if you're looking at Apple news, you can ask about Palantir, and our system will automatically adjust the parameters:

Copilot understands from widget metadata that the user requires information from it and queries it:

But, not as is. It requires updating input parameters accordingly (symbol and dates):

In turn, that data is utilized to answer the prompt:

Finally, the utilized widget (with updated parameters) can be added to the dashboard seamlessly.

Complex analysis

For more sophisticated tasks like analyzing futures contracts for arbitrage opportunities, our Copilot can make multiple function calls, process the data, and create visualizations.

Copilot understands from widget metadata that the user requires information from it, with updated parameters, and queries it.

In turn, that data is utilized to answer the prompt...

and creating a chart like the user asked:

Finally, the resulting artifact (in this case, a chart) can be added to the dashboard:

Verification and output

We're particularly proud of our verification system for the Copilot. It allows users to:

  • See the step-by-step reasoning
  • Access data sources through citations
  • Add source widgets to their dashboard
  • Get highlights of specific data references

The output can be added directly to the dashboard as new widgets, creating a seamless workflow from query to visualization to presentation.

Looking forward

We've built something that I believe truly changes how people can interact with financial data, and we're just getting started. The combination of intelligent function calling, context awareness, and user-friendly interface is making sophisticated financial analysis more accessible than ever before.

You can get started for free at pro.openbb.co.

Explore the
Terminal Pro


We use cookies

This website uses cookies to meausure and improve your user experience.