---
title: DataPrime query assistance
description: Describe what you're looking for in everyday language, and Olly converts your description into a structured DataPrime query.
url: https://coralogix.com/docs/user-guides/olly/dataprime-query-assistance/
product: cora
feature: DataPrime AI Assistant
feature_id: dataprime-ai-query-assistant
feature_identifier: cora/dataprime-ai-query-assistant
last_updated: '2026-11-12'
---

# DataPrime query assistance

Describe what you're looking for in everyday language, and Olly converts your description into a structured DataPrime query, saving you the trouble of writing complex queries manually.

DataPrime query assistance is one of the [Olly mini](https://coralogix.com/docs/user-guides/olly/olly-mini.md) features, focused, in-context AI actions embedded across Coralogix. Like other Olly mini features, generating queries consumes [AI Units](https://coralogix.com/docs/user-guides/account-management/payment-and-billing/ai-units-pricing.md) and is billed per token at the model's rate.

[![DataPrime query assistance](/docs/assets/images/dataprime-assistance-afa0d73ca652299fb999005b2814bb9c.webp)](https://coralogix.com/docs/assets/images/dataprime-assistance-afa0d73ca652299fb999005b2814bb9c.webp)

## How it works

DataPrime Query Assistance uses a large language model (LLM) to interpret natural language requests and generate precise DataPrime queries.

* **Natural language to structured queries**: Enter your request in plain English, and Olly generates a DataPrime query
* **Flexible query modification**: After the query is generated, review and adjust it in the DataPrime editor before running it
* **Smart input evaluation**: Olly detects and corrects spelling mistakes, prevents syntax errors, and validates that input is within DataPrime scope. Invalid input is automatically rejected.

Note

LLM-based systems are still evolving and can make mistakes. Validate any generated DataPrime query before running it.

## Limitations

* DataPrime query assistance is single-turn: each prompt generates one query, and the assistant doesn't carry earlier prompts forward. Put everything the query needs in one prompt.
* The assistant is available only when Olly is enabled for your team. Teams without Olly see no query assistant in the DataPrime editor.

## Query examples

Common queries with example prompts and generated DataPrime output:

Simple field-based filter

Prompt: Show me all logs with application name default

```
source logs

| filter $l.applicationname == 'default'
```

Multiple filters

Prompt: Show me all logs with severity error or higher where the subsystem name is archive

```
source logs

| filter $m.severity >= ERROR

| filter $l.subsystemname == 'archive'
```

Aggregation

Prompt: Count all errors by application name

```
source logs

| filter $m.severity == ERROR

| groupby $l.applicationname aggregate count() as error_count
```

Aggregation and filtering

Prompt: Show me all logs where the cloud provider is aws and group it by subsystem

```
source logs

| filter $d.resource.attributes['cloud.provider'] == 'aws'

| groupby $l.subsystemname
```

Advanced calculation

Prompt: Find the average grpc.timems where grpc code is not ok

```
source logs

| filter $d.grpc.code != 'ok'

| groupby true aggregate avg($d.grpc.timems) as average_grpc_times
```

Note

Due to DataPrime limitations, aggregate functions (`sum`, `avg`, `count`, etc.) require a computation anchor. The `groupby true aggregate` expression serves as a boolean anchor for the aggregate function.

## Prerequisites

Olly must be enabled for your team. See [Enable Olly](https://coralogix.com/docs/user-guides/olly/enable.md).

## Where query assistance appears

Query assistance belongs to the DataPrime editor, and Olly generates the query everywhere it appears:

* **Explore**, once you switch the query syntax to **DataPrime**. The prompt sits above the editor, and the steps below describe it.
* **Custom Dashboards**, in a widget's DataPrime query editor.
* **Visual Explorer**, once you set the data source to **DataPrime**.

On the last two, select **Query Assistant** in the editor header to open a prompt field. Describe the query you want, then select the send icon or press Enter. Olly writes the generated query into the editor, with your prompt above it, so you can adjust it before running the query.

## Enable DataPrime query assistance

1. Verify that you have permission to manage AI settings.
2. Go to **Settings**, then **Account Preferences**.
3. Under **AI-Powered Capabilities**, turn on **DataPrime query assistance**.

This switch records your team's consent to Coralogix AI capabilities. Whether query assistance appears follows from Olly being enabled for the team, so turning the switch off doesn't take it out of the DataPrime editor.

## Use DataPrime query assistance

1. In **Explore**, select the dataset you want to query, then switch the query syntax to **DataPrime**.
2. The AI query prompt appears above the DataPrime editor. If it's hidden, open the query bar's menu and select **Show Prompt AI**.
3. In the prompt box (**Ask Olly to write a query…**), describe what you're looking for, then select **Generate query** or press Enter. Olly generates a DataPrime query for the dataset you selected, logs, spans, or any other dataset you query in Explore.
4. Review the generated query and adjust it in the DataPrime editor if needed, then run the query. If your request implies a time range (for example, "errors in the last 3 hours") Olly sets the time picker to that window when you run the query.

To hide the prompt from the query bar, open the query bar's menu and select **Hide Prompt AI**. Select **Show Prompt AI** from the same menu to bring it back.

## Feedback

Rate Olly's responses with a thumbs up or thumbs down to help improve query generation quality.

* Select thumbs up if the generated query is accurate
* Select thumbs down and complete the feedback form to report issues or suggest improvements

## Next steps

Ask Olly about Coralogix platform features in context with [Knowledge assistance](https://coralogix.com/docs/user-guides/olly/knowledge-assistance.md).
