Skip to main content

Command Palette

Search for a command to run...

APEX 26.1 New Features: Describe Tables

Updated
3 min read
APEX 26.1 New Features: Describe Tables

Context is one of the most important things when working with AI. That's kind of the agent "memory" during the session. A key part of the context giving the agent instructions on what to use for specific tasks and the tools to accomplish those tasks.

When developing an application, datamodel information should be part of that context, specially when working with APEX where we can take advantage of the native way regions can be connected to data objects objects.

It's also useful when code objects (like procedures, functions, packages, etc.) are generated to be used from the application.

APEX 26.1 delivered a convenient way to provide such information in a format AI can read and it's easily editable, by generating a description of the structure of the objects that can be stored in a markdown of plain text file. Markdowns (.md) is actually the most used format to give instructions to AI.

This feature is included under SQL Workshop -> Utilities and it's quite easy to use.

In the screen you'll find options to pick the object type (tables, views or both), and also the option to include constraints, indexes and comments.

Comments could be useful for the model to understand the data model, specially when objects and columns names are not that meaningful. Even when we start working on better names we'll get into scenarios of working with existing objects that could be not that AI friendly, so a comments are a good way to keep taking advantage of those objects in this new way to work.

After clicking "Describe" the content is generated in the section below, and you can either download or copy it.

Resulting file looks like the one on the left. On the right, the readable preview presentation.

Even when having a good context is key to obtain the best results from agents generated code, we need to be aware of the limits on the model we use. Some of them Summarize the conversation after reaching the context limit to keep the session working, but information can be lost and the model can "forget" instructions previously received.

Because of that, managing what we load or not as context for a session becomes crucial. One way could be by creating several md files with groups of tables and instruct the agent in the AGENTS.md how to choose the files to be used.

We could also use the first lines of the md files to describe the content (metadata) and let the agent decide weather loading the rest of the file or not depending on the requirement.