File Context

File Context lets you provide specific files to DinoAI, helping it understand your code patterns, naming conventions, and existing structure.

Example Use Cases

  • Add a sources.yml file to help DinoAI understand your source definitions

  • Add an existing model to show DinoAI your preferred SQL style

  • Add multiple related models when building a complex join

  • Add schema.yml files to show DinoAI your documentation patterns

DinoAI offers three ways to add file context:

1. Active Files

Use case: Focus on all files currently open in your editor tabs

How to use:

  1. Have multiple files open in editor tabs

  2. Click the DinoAI icon (🪄)

  3. Click the "@" symbol and "Add Active Files to context"

  4. Add your prompt

2. Open Files

Use case: Focus exclusively on the single file currently selected in your editor

How to use:

  1. Have a file open and selected in your editor

  2. Click the DinoAI icon (🪄)

  3. Click the "@" symbol and "Add Open File to context"

  4. Add your prompt

3. File Selection

Use case: Focus on specific file(s) not currently open in editor

How to use:

  1. Click the DinoAI icon (🪄)

  2. Click the "@" symbol and "Files"

  3. Search and/or select the file(s) to add as context

  4. Add your prompt

File Context in Action

Here's how File Context improves DinoAI's results:

Without Context

Prompt: "Create a staging model for the orders table"

Result: Generic model that may not match your naming or style conventions

With File Context

Prompt: "Create a staging model for the orders table"

+ File Context: an existing staging model

Result: Model that follows your existing patterns for naming, style, and structure

Best Practices

  1. Provide example files that demonstrate the patterns you want DinoAI to follow

  2. Add relevant context only - too many files can dilute the focus

  3. Include both SQL and YAML files for comprehensive context

  4. Start with high-quality examples - DinoAI will follow the patterns it sees

Last updated

Was this helpful?