Feature preview: Optimization
Version 1.3.0 of Splunk AI Assistant for SPL offers a preview of a new feature - optimization. Optimization can improve existing SPL searches or generate better searches when used with the Write SPL feature.
Use optimization to run faster searches and reduce costs with similar results. Through the Write SPL tab you can optimize existing searches, including saved searches, or compose new SPL searches that are then optimized.
Requirements
The optimization feature uses metadata from your Splunk deployment to provide better results from Splunk AI Assistant for SPL. Opting into personalization is a requirement to using optimization. See Configure Personalization settings
In order to participate in the preview, you must also share your AI Service Data so that we can gather the necessary feedback to improve this feature before general availability. See Configure share data settings.
Participating in the preview
If you are a user with administrator privileges, when you install version 1.3.0 or upgrade to version 1.3.0, you will see the following modal window and the option to opt-in:
Only users with administrator privileges can opt-in or opt-out of this preview. You can opt-in or out at any time and the change takes effect immediately.
Whether the optimization preview is turned off or on, that setting applies at the app level, across all users, and not at the individual user level.
If you want to opt-in or out of this preview feature at a later date than the app installation or upgrade, navigate to the Settings tab of the assistant. Select or deselect the Optimize SPL option, as shown in the following image:
Optimization strategies
The following optimization strategies are leveraged in this feature preview:
- Choosing the right index
- Using
tstat
- Eliminating unnecessary wildcards
Optimization examples
To optimize an existing search, you can paste that existing search in the Write & optimize SPL tab. Alternately, you can ask the assistant to perform optimization using the format of Optimize this search <original_search_query>
.
The following are examples of SPL searches before and after SPL optimization:
Use case | Input | GPT Output | Llama Output |
---|---|---|---|
Select correct index |
|
|
|
|
|
|
|
|
|
|
|
Optimize stats > tstats |
|
|
|
|
|
|
|
Wildcard replacement |
|
|
|