General and core concepts
What is Splunk Agent Observability?
Splunk Agent Observability is an end-to-end platform for evaluating and improving the performance of generative AI models. It provides tools to help teams deeply understand model behavior across tasks like text generation, summarization, classification, and more. Splunk Agent Observability integrates seamlessly into your LLM pipeline and supports evaluation with both human feedback and automated evaluators. View the Splunk Agent Observability platform overview →How does Splunk Agent Observability help with generative AI evaluation?
Splunk Agent Observability enables teams to evaluate generative models through:- Automatic and custom evaluators: Evaluate and track instruction adherence, correctness, safety & compliance, chunk utilization, and more.
- Human feedback integration: Annotate and label logs through the UI or SDK.
- Fine-grained error analysis: Detect generation quality and systematically log responses as CLLF, ILLF, IHFA, etc.
- Multi-model comparison: Evaluate different model outputs side by side.
How is evaluating generative AI models different from traditional ML evaluation?
Unlike traditional ML, where outputs are often single values or labels, generative AI outputs are open-ended and nuanced (e.g. full text). This creates challenges like:- Subjectivity: There’s often no single correct answer.
- Evaluation complexity: Evaluators must handle variation, style, relevance, and factual accuracy.
- Human oversight: Required to understand intent and impact of generations.
How do I get started with Splunk Agent Observability to evaluate my AI models?
Visit the Getting Started guide and follow along to create your first Splunk Agent Observability application. Then, you can start incorporating Splunk Agent Observability into your AI project pipeline. Getting Started guide →How does Splunk Agent Observability fit into the generative AI development lifecycle?
Splunk Agent Observability supports every stage of generative AI development:- Prompt & data experimentation: Evaluate prompt effectiveness.
- Model comparison: Choose the best model or fine-tuned variant.
- Fine-tuning oversight: Identify when training introduces regressions.
- Pre-deployment checks: Surface edge cases, hallucinations, or bias.
- Post-deployment monitoring: Continuously analyze performance and drift.
SDK usage
What SDKs does Splunk Agent Observability provide?
Splunk Agent Observability provides a Python SDK designed to integrate with your generative AI pipelines. They allow you to log prompts, model generations, evaluators, and feedback directly from your application. Install the Splunk Agent Observability SDK using the following terminal command:How do I log prompt and response data using the SDK?
You can log AI prompt and response data by recording logs to an Agent Stream using the Splunk Agent Observability Logger. By initializing a new Trace, the AI activity executed in the subsequent code is recorded to the selected Project’s Agent Stream.How do I use the Python SDK in a Python notebook (e.g. Jupyter, Google Colab, etc.)?
When using a Python Notebook (such as Jupyter, Google Colab, etc.), you should use thesplunk_ao_context and make sure to call splunk_ao_context.flush() at the end of your notebook.
Can I log custom evaluators with the SDK?
Yes, you can create custom evaluators in the Splunk Agent Observability UI, and then use them with the SDK.- Log in to the Splunk Agent Observability UI.
- Select your Project in the top-left corner
- Click “Agent Streams” in the top menu bar
- Click the “Configure Evaluators” button in the top-right corner
How can I annotate or categorize different experiments in my logs?
Use the ‘tags’ andmetadata fields to attach filterable labels to your logged Traces and Spans. This allows you organize and view the logged data in the Splunk Agent Observability UI, and add annotation-based logic to your AI application.
Annotations can be used to track things like relevant topics, version numbers, experiment IDs, and beyond.
How do I handle logging sensitive data like PII?
If your prompts or generations may contain personally identifiable information (PII), ensure that you mask, anonymize, or exclude that data before logging. Use annotations like tags and metadata to mark sensitive content without logging it directly.API integration
How do I authenticate with the API?
Use the authentication header for your deployment:- Splunk Observability Cloud
- On-premises, standalone, or custom
How do I log a sample via the API?
Send aPOST request to the /samples endpoint with a JSON payload:
What’s the best way to handle errors and retries with the API?
Unlike the SDK, the API does not automatically retry failed requests. You’ll need to:- Check for
4XXand5XXstatus codes - Parse error messages in the response body
- Implement retry logic using exponential backoff
Can I update a previously logged data using the API?
Yes, you can update logged data by including thetrace_id or span_id created when initially logging. View Trace IDs and Span IDs in the Splunk Agent Observability UI in your Project’s Agent Streams.
This is useful for streaming or progressive generation workflows.
How do I retrieve data I’ve previously logged to Splunk Agent Observability via the API?
The API includes endpoints for retrieving logs, evaluators, and datasets. To fetch an Agent Stream, replaceproject_id and log_stream_id with your IDs. Add the variables for your deployment to .env, then load the file and configure helper variables for the request:
- Splunk Observability Cloud
- On-premises, standalone, or custom
.env
How do I structure metadata for complex use cases (e.g. nested values)?
Metadata must be a flat key-value object. Nested or deeply structured metadata (e.g. JSON objects within JSON) should be flattened. Metadata keys and values must be strings.Integration and compatibility
Which LLM providers, models, and frameworks does Splunk Agent Observability support out of the box?
Splunk Agent Observability is model agnostic, and supports leading LLM providers including OpenAI, Azure OpenAI, Anthropic, and Llama. Splunk Agent Observability’s flexible SDK and API allow it to work with any model or provider. View supported integrations on the LLM Integrations the Splunk Agent Observability UI.Does Splunk Agent Observability integrate with LlamaIndex or other retrieval frameworks for RAG pipelines?
Yes, Splunk Agent Observability works with LlamaIndex (formerly GPT Index) and other retrieval-augmented generation frameworks. You can log RAG context, query, and generation data as part of a single sample or as separate, chained samples. This makes it easier to analyze the quality of both retrieved context and final generations. RAG pipeline logging →Does Splunk Agent Observability support non-English languages?
This section applies to both on-premises and SaaS deployments. Individual features may not be available for every deployment option. See Feature differences by deployment option for details.
Troubleshooting and best practices
What should I do if the Splunk Agent Observability SDK fails to install or initialize?
If you are experiencing errors when installing or initializing the Splunk Agent Observability SDK, follow these diagnostic steps:- Reinstall the SDK by running
pip install splunk-ao(Python). - Inspect browser/network logs for failed requests to Splunk Agent Observability endpoints, using the Network tab in browser dev tools.
- Ensure environment variables (API Key, environment, etc.) are correctly set and loaded by printing them in your app initialization script.
What should I do if Splunk Agent Observability is not logging any data from my application?
If your application is running, but doesn’t appear to be creating logs, try these diagnostic steps:- Ensure you are checking the same Project and Agent Stream that is being logged to in your application. They are case-sensitive.
- Use
splunk_ao_contextor create a new Trace in your application.