Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@
"future-agi/products/observe/quickstart",
"future-agi/products/observe/evals",
"future-agi/products/observe/session",
"future-agi/products/observe/alerts-and-monitors"
"future-agi/products/observe/alerts-and-monitors",
"future-agi/products/observe/users"
]
},
{
Expand Down
101 changes: 101 additions & 0 deletions future-agi/products/observe/users.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
title: "User Tab"
description: "The User-Level Tab provides a consolidated view of all interactions, sessions, and traces linked to a specific user. It enables LLM application developers to debug issues, analyze behavior patterns, and optimize resource allocation at the individual user level."
---

## Key Features

- **Unified User Journey View**: Consolidates all traces, sessions, and metrics related to a specific user into one tab, eliminating the need to manually piece together their journey.

- **Efficient Debugging**: Quickly isolate and investigate a user's reported issue by viewing all associated sessions and anomalies.

- **User-Level Quality Metrics**: Track satisfaction scores, frustration indices, and success rates at the individual level.

- **Behavioral Insights**: Identify patterns such as engagement frequency, query evolution, task completion rates, and guardrail triggers.

- **Resource Optimization**: Detect power users, problematic users, or high-cost accounts to inform allocation strategies.

- **Search & Filtering**: Search by UserID and apply filters across date, metrics, and custom attributes.

## How to Use the User Tab

### 1. Pass User Identifiers in Traces
When creating a trace or span, include `user.id` and optional metadata to associate interactions with a specific user:

```json
with using_attributes(
session_id="new-session",
user_id="newuser",
):
response = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[{"role": "user", "content": "Write a haiku."}],
max_tokens=20,
)
```

OR

```json
from fi_instrumentation import register, FITracer

trace_provider = register(
project_type=ProjectType.OBSERVE,
project_name="PROJECT_NAME",
session_name="SESSION_NAME"
)

tracer = FITracer(trace_provider.get_tracer(__name__))

with tracer.start_as_current_span(
f"SPAN_NAME",
) as span:
span.set_status(Status(StatusCode.OK))
span.set_attribute("user.id", "vivek.gupta")
span.set_attribute("user.id.type", "email | phone | uuid | custom")
span.set_attribute("user.id.hash", "<hash_for_the_user.id>")
span.set_attribute("user.metadata", {})
span.set_attribute("fi.span.kind", "llm")
span.set_attribute("llm.provider", "claude")
span.set_attribute("input.value", "input")
span.set_attribute("output.value", "output")
```

### 2. Explore the User Tab

The User Tab displays a paginated table with:

* **UserID**
* **Activation Date**
* **Last Active Date**
* **Count of Traces / Count of Error Traces**
* **Count of Sessions**
* **Average Latency (Trace & Session)**
* **Total LLM Calls**
* **Evaluation Pass Rate**
* **Guardrail Trigger Count**
* **Total Tokens (Input, Output, Total)**
* **Total Cost**

### 3. Drill into User Details

Click on any **user.id** to open a detailed view containing:

* **Summary**: Total traces, cost, active days, average latency, total sessions, session duration, task completion rate, satisfaction score, and % successful sessions.
* **Traces Tab**: Trace ID, session ID, latency, input/output, evaluation results, cost, annotations, and full trace details.
* **Sessions Tab**: Session ID, start/end time, # of traces, session-level evals, cost/tokens, first/last message, status, and filters by date, status, duration, or cost.
* **Behavioral Insights**: Engagement trends, anomalies (e.g., spikes in errors), and guardrail triggers.

### 4. Apply Filters & Search

Filter by:

* Date range
* Trace ID
* Evaluation metrics
* System metrics
* Custom attributes

Search across the **User Tab**, **Sessions**, or **Traces** using UserID.

By leveraging the User-Level Tab, teams can proactively manage user experiences, accelerate debugging, and gain deep behavioral insights to improve product quality and personalization.