# File generation & analysis

Code Interpreter helps you turn questions and data into **computed answers** and **downloadable files -** right inside nexos.ai Chat.&#x20;

It can run Python code to analyze data, spot issues, and produce outputs you can use immediately.

***

### Capabilities

* **Analyze data** (especially spreadsheets and CSV-style data)
* **Create charts** to visualize results
* **Generate files** such as cleaned CSVs and reports, and attach them in the conversation

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

***

### Common use cases

* Clean and transform a CSV, then export a new version.
* Create a quick analysis and summary you can share.
* Debug data issues by finding errors and anomalies.

***

### Where it works

You can use Code Interpreter in:

* **Chat**
* **Projects** (great when your files live in a Project)&#x20;
* **Agents** (great for repeatable workflows with saved instructions)&#x20;

***

### How to use it

{% stepper %}
{% step %}

#### Start a new chat&#x20;

You can do that in Chat, Projects, or Agents.
{% endstep %}

{% step %}

#### Provide your data

* Add files to use them as source material in chats
* Or describe what you want to generate (for example: “Create a cleaned CSV and a chart”)
  {% endstep %}

{% step %}

#### Ask for the outcome

Examples:

* “Clean this dataset and export a new CSV.”
* “Summarize trends and generate a simple report.”
* “Create a chart of revenue by month.”

Your results will appear in Chat, and generated files will be attached when available.
{% endstep %}
{% endstepper %}

***

### Tips for best results

* Specify desired output: **CSV, chart, or other specific document format**.
* Name the columns or metrics you care about (e.g., “group by month,” “remove duplicates”).
* If you’re working on a Project, keep related files together so the analysis stays consistent.


---

# 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.nexos.ai/workspace/chat/file-generation-and-analysis.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.
