On this page
askObi command
Ask the workspace's AI model about these results. Returns one row per finding. Prebuilt prompts: insights (anything I need to know), anomalies, security; or write your own in quotes.
Sends the results of the query in front of it to your workspace's AI model with a prompt, and returns what the model found: one row per finding, with its severity, a short title, the detail and the evidence it rests on.
Use a prebuilt prompt or write your own. Saved queries and alert rules can use it too: an alert rule ending in | askObi counts the findings, so a rule with a condition of more than 0 fires whenever the model reports something.
Syntax
| askObi [insights | anomalies | security | "<your own prompt>"] [rows=<N>] [severity=<level>]Square brackets mark an optional part, and angle brackets a value you supply.
Arguments
| Argument | Required | Description |
|---|---|---|
insights | Optional | The default. Anything in the results you need to know about: errors, changes, outliers and risks. |
anomalies | Optional | Spikes, drops, unusual values and patterns that break from the rest of the results. |
security | Optional | Signs of attack or misuse, such as repeated failed logins, privilege changes, scanning or injection attempts. |
"<your own prompt>" | Optional | Your own question or instruction, in quotes. Up to 2000 characters. Also written prompt="...". |
rows=<N> | Optional | The most result rows sent to the model, from 1 to 1000. Defaults to 200. Long values are shortened, and fewer rows are sent when they would not fit the model's limit. |
severity=<level> | Optional | Keep only findings at least this serious: info, low, medium, high or critical. |
Usage
- It has to be the last stage. Put filters, stats and everything else in front of it.
- Needs the Obi AI Assistant add-on and a configured AI provider. What is sent follows the workspace's Obi data level: individual events need the level that allows example events, aggregates need at least the aggregates level, and nothing is sent at the field-names-only level.
- Each run is a call to the AI model and counts toward the workspace's Obi spending limits. Aggregating first with stats or timechart sends less and usually finds more.
- The model reads only the rows sent to it, which may be fewer than the query matched. The result says how many it read.
- Log lines are data, not instructions: text in an event that tries to tell the model what to do is ignored, and the model can only answer with findings.
- Alert rules that use it are evaluated at most every 5 minutes, cannot be grouped, and cannot be backtested.
Examples
1. Anything I need to know
level=error | askObiA digest of what stands out in recent errors.
2. Anomalies in an aggregate
| timechart span=5m count() by service | askObi anomaliesAggregates first: the model sees every service's volume over time rather than a sample of events.
3. Security events worth an alert
service=auth | stats count() by user, outcome, client_ip | askObi security severity=highAs an alert rule with a condition of more than 0, fires when the model reports a high or critical finding.
4. Your own prompt
service=checkout | askObi "Which customers had a payment fail more than once, and why?"Any question about the results, in plain words.