Skip to main content

Overview

Custom Instructions allow you to provide context, terminology definitions, and business rules that help the Data Assistant understand your specific data model and give more accurate responses.

Why Use Custom Instructions?

Every organization has unique terminology, data structures, and business logic. Custom Instructions bridge the gap between your internal knowledge and Cobi’s understanding of your data.

Define Terminology

Map your business terms to database tables and columns

Explain Relationships

Clarify how tables connect and what joins are appropriate

Set Business Rules

Define how to calculate metrics like revenue, active users, or churn

Improve Accuracy

Help Cobi write correct queries on the first try

Adding Custom Instructions

1

Open Data Connectors

Navigate to Developer > Data Connectors in the sidebar.
2

Select Your Connection

Click on the data source you want to configure.
3

Go to Custom Instructions Tab

In the connection modal, click the Custom Instructions tab.
4

Add Your Context

Enter your instructions in plain text. Be specific and comprehensive.
5

Save Changes

Click Save Changes to apply your instructions.

What to Include

Business Context

Start with a high-level description of what your database contains:

Key Terminology

Define terms your team uses and map them to database concepts:

Revenue Sources

Explain where different metrics come from:

Query Guidance

Provide specific instructions for common questions:

Example: Complete Custom Instructions

Here’s a full example for a sports facility:

Best Practices

Be Specific

Instead of “customers are in the users table”, say “customers are stored in the users table, identified by the id column, with user_type = 'customer' to distinguish from staff accounts.”

Document Status Codes

Many databases use numeric codes for statuses. Always document what they mean:

Explain Calculations

If metrics require specific calculations, be explicit:

Note Table Relationships

Help Cobi understand how to join tables correctly:

Update Regularly

As your data model evolves, update your Custom Instructions to reflect new tables, columns, or business rules.

Learned Information

In addition to Custom Instructions (which you write), Cobi automatically builds Learned Information as you interact with the Data Assistant. This includes:
  • Table and column descriptions discovered through queries
  • Relationships between tables
  • Common query patterns
You can view and edit Learned Information in the Learned Information tab of your data connector settings.

Troubleshooting

Data Assistant Still Gets It Wrong

If Cobi isn’t interpreting your data correctly:
  1. Check your Custom Instructions for clarity
  2. Add more specific examples
  3. Correct any Learned Information that may be inaccurate
  4. Try rephrasing your question to include the terminology you defined

Instructions Not Taking Effect

After saving Custom Instructions:
  • Start a new conversation to ensure the context is loaded
  • Check that you’re using the correct data source in your query

Next Steps

  • Connect your database if you haven’t already
  • Start asking questions in the Data Assistant to see your instructions in action