Data Access

The Data Access feature in Profound AI allows you to provide your AI Agent controlled read-only access to a subset of your system’s Database Tables and Views. The agent will determine on its own how and when to access the data in the tables based on the context of the user’s question. For instance, if you allow access to the Invoice Header and Invoice Detail tables, users can then inquire about account receivables, collected revenue, specific customer invoices, and more. To use Data Access, the large language model you choose must have been trained or fine-tuned for function calling and also be able to generate SQL statements.

Adding Tables

To enable this feature, switch to the Data Access tab and click the plus icon to add a new table. You will be able to search for a table by typing its name or selecting one from the schema tree. If your desired schema or library doesn’t appear in the list, make sure to add it to the pathlist setting in your configuration file, restart the server, and then try the operation again.

Selecting Columns

After a table is added to the list, it does not yet become accessible to the AI Agent. The next step is to select the columns you would like to grant access to. In the DB Columns tab, select the columns you want to allow the AI Agent to access.

Beware, selecting more columns than necessary adds to the LLM token usage and decreases the efficiency of the model.

Providing Natural Language Descriptions

As tables and columns are added, the text provided by the database, when available, is retrieved and assigned as the default natural language description. The model uses these descriptions to understand your data. It is important to review and adjust the descriptions as necessary to provide the language model a clear understanding of the structure of your data. To edit a description, simply double-click on it – this works for both table and column descriptions.

Joining Tables

The agent will attempt to autonomously decide when joining multiple tables is necessary based on the table/column names and descriptions. For instance, if an Invoice Header and an Invoice Detail table both have an InvoiceId column, the agent will most likely join the tables by that column. The functionality can be tested in the Agent Preview section of the IDE. If the results are not satisfactory, the descriptions can be further refined to specify foreign key relationships. If the results are still not satisfactory, the Agent Instructions text can be updated to describe the database relationships in greater detail using natural language.

Data Access Limit Configuration

The Data Access feature is limited in how many records it will request at one time. The default limit is 50 records. You can override that limit by setting the dataAccessLimit property in the config.js file. For example:

dataAccessLimit: 100