# File Context

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

{% hint style="info" %}
**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
  {% endhint %}

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 (🪄) on the right panel of the Code IDE
3. Click the "@" symbol and "Add Active Files to context"
4. Add your prompt

<div align="center"><figure><img src="/files/80HlqpinmCPOXIDNNHJt" alt=""><figcaption></figcaption></figure></div>

### 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

<figure><img src="/files/tnWv7zLRXsdphWN1Mcfj" alt=""><figcaption></figcaption></figure>

### 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

<figure><img src="/files/KMvJloGV6FefGr4cAsKT" alt=""><figcaption></figcaption></figure>

### 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
```

***

{% hint style="info" %}

#### 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
   {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.paradime.io/app-help/documentation/dino-ai/context/file-context.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
