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.
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
Provide specific instructions for common questions:
Copy
When asked about "revenue", sum the `total` field from bookings and instructor_bookings.When asked about "members", count users with active package_user_mappings.Payment status 1 = paid, 0 = unpaid.Booking status 1 = confirmed, 0 = pending, 2 = cancelled.
This is a sports facility management database for a Padel/Tennis club.Key terminology:- "Members" = users with active package subscriptions- "Courts" = playing facilities (can have sub-courts)- "Bookings" = court reservations- "Lessons" = private coaching sessions (instructor_bookings table)- "Programs" = group classes, camps, clinicsRevenue comes from:1. Court bookings (bookings table)2. Private lessons (instructor_bookings table)3. Program enrollments (program_enrollments table)4. Membership fees (via Stripe subscriptions)When asked about "revenue", sum the `total` field from bookings and instructor_bookings.When asked about "members", count users with active package_user_mappings.Payment status 1 = paid, 0 = unpaid.Booking status 1 = confirmed, 0 = pending, 2 = cancelled.
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.”
If metrics require specific calculations, be explicit:
Copy
"Active users" = users who have logged in within the last 30 days (check `last_login` column)."Monthly revenue" = SUM(amount) from transactions WHERE status = 'completed' AND refunded = false.
Help Cobi understand how to join tables correctly:
Copy
To get customer orders: JOIN customers ON orders.customer_id = customers.idTo get order items: JOIN order_items ON order_items.order_id = orders.idProducts are linked via order_items.product_id = products.id
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.