All Apps and Add-ons

Splunk MLTK ai Prompt Testing

Nadeen_98
New Member

I am trying to use the ai prompt in Splunk Machine Learning Toolkit 5.6.0 in order to use Llama Guard Model 4,note that it does not require an access token for it. I am trying to test out the following prompt and I keep getting the following error. Please assist with any help or any correct format to test for using Llama Guard 4.

Test Prompt:
index=_internal log_level=error | table _time _raw | ai prompt="Please summarise these error messages and describe why I might receive them: {_raw}"

Error Message:
SearchMessage orig_component=SearchOrchestrator sid=[sid] message_key= message=Error in 'ai' command: No default model was found.

Labels (1)
0 Karma

ilya_resh
Engager

Hi, 

You must provide a `model` parameter in your `| ai` command.

https://docs.splunk.com/Documentation/MLApp/5.6.0/User/Aboutaicommand#Parameters_for_the_ai_command

Also, I assume that you have configured the required details in the Connections Management page https://docs.splunk.com/Documentation/MLApp/5.6.0/User/Aboutaicommand#Connection_Management_page 

0 Karma

livehybrid
SplunkTrust
SplunkTrust

hi @Nadeen_98 

Can you confirm that in the the Connection Management settings you have the "Set as Default" checked for one of the models? 

If so, please can you check the logs for any errors:

index="_internal" (source="*mlspl.log" OR sourcetype="mlspl" OR source="*python.log*")

🌟 Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

0 Karma

Nadeen_98
New Member

Thanks for your help @livehybrid 

I've added Groq as the default provider but still another issue occurs.

Revised Prompt: 

index=_internal log_level IN ("ERROR","WARNING", "WARN") 
| table _time _raw
| ai prompt="please explain these error message to me: {_raw}" provider="Groq" model="llama3-70b-8192"

Error Message:

RunDispatch has failed: sid=[sid], exit=-1, error=Error in 'ai' command: The provider: '"Groq"' is invalid. Please check the configuration

 

0 Karma

ilya_resh
Engager

The <SPLUNK_HOME>/var/log/splunk/mlspl.log may give you more details about the error.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...