Optimize context

Configure sources so LLMs can more easily glean context.

Velvet's editor uses AI to introspect on the underlying data model, write SQL, and return live data results. To improve accuracy, try naming tables accurately and grouping data sources by category.

Database example:

Imagine you're setting up a large production database that serves a variety of use cases in your system. The LLM will attempt to pull context from table names. To improve accuracy, follow the below optimizations:

  1. Append the table name with the database type, like postgres-identities
  2. Name the table with clear nomenclature, like mongodb-paywall-attempts
  3. Include organizational context in the name, like mysql-caretaker-users

These best practices with database setup will help the editor understand your data model and return more accurate results.

Webhook example:

Imagine you're setting up a large third-party data source that covers a variety of use cases in your system. The LLM will attempt to pull context from the way your sources are named. To improve accuracy, follow the below optimizations:

  1. Group events into categories, like chatwoot-conversations, chatwoot-messages, and chatwoot-contacts. Create one Velvet source per high-level category.
  2. Append the table name with the database type, like stripe-card-attempts
  3. Name the table with clear nomenclature, like webflow-user-signups
  4. Include organizational context in the name, like calendly-active-user-event

These best practices with event-based sources will help the editor understand your data model and return more accurate results.