# Inline File Context

Inline File Context lets you provide specific code selections to DinoAI, helping it understand your code patterns, naming conventions, and focus on exactly the sections you want to discuss or modify.

{% hint style="info" %}
**Example Use Cases**

* Ask questions about specific functions or code blocks
* Request changes to particular lines of code
* Debug targeted portions of your files
  {% endhint %}

### How to Use Inline File Context

**Step-by-Step Instructions:**

1. **Highlight the code** you want to add as context in your editor
2. **Click "Add to Chat"** to send the selected code to DinoAI
3. **Add your prompt** describing what you want DinoAI to do with the selected code

{% @arcade/embed url="<https://app.arcade.software/share/mOYeQWME9oCe7RYEJ2ZJ>" flowId="mOYeQWME9oCe7RYEJ2ZJ" %}

***

### Inline File Context Example

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

**Without Inline Context**

{% code overflow="wrap" %}

```
Prompt: "This CTE is running slowly, can you help optimize it?"

Result: DinoAI asks which CTE you're referring to since your model file contains 8 different CTEs, or provides generic optimization advice that may not apply to your specific performance issue
```

{% endcode %}

**With Inline Context**

{% code overflow="wrap" %}

```
Prompt: "This CTE is running slowly, can you help optimize it?"

+ Inline Context: highlighted CTE with multiple LEFT JOINs and aggregations

Result: DinoAI identifies that the slow performance and optimizes CTE accordingly
```

{% endcode %}

***

{% hint style="info" %}

#### Best Practices

1. **Select relevant code blocks** that include enough context for DinoAI to understand the purpose
2. **Be specific in your prompts** about what you want DinoAI to do with the highlighted code
3. **Include related functions** when selecting code if they're necessary for understanding
4. **Use for targeted questions** rather than broad file-level discussions {% endhint %}
   {% 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/inline-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.
