Skip to content

feat(studio): assistant logs context and reports guard - #48514

Merged
charislam merged 2 commits into
charislam/sql-editor-inline-ai-clickhouse-dialectfrom
charislam/sql-editor-assistant-logs-context-reports-guard
Aug 4, 2026
Merged

charislam merged 2 commits into
charislam/sql-editor-inline-ai-clickhouse-dialectfrom
charislam/sql-editor-assistant-logs-context-reports-guard

Conversation

@charislam

@charislam charislam commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

I have read the CONTRIBUTING.md file.

YES

What kind of change does this PR introduce?

Feature — final PR (9/9) of the SQL editor logs-source stack.

Base branch: charislam/sql-editor-inline-ai-clickhouse-dialect (PR 8). Nothing here is user-visible: entry points stay behind sqlEditorLogsSource + otelLegacyLogs, and flag rollout happens after the whole stack merges.

What is the current behavior?

  • The Assistant has no idea a SQL editor snippet targets the logs backend. Ask it about a logs snippet and it answers in Postgres, because the attached query is fenced as ```sql and nothing tells the model otherwise.
  • Because the sql fence is what MessageMarkdown treats as runnable Postgres, an attached ClickHouse query is rendered with a Run-against-Postgres affordance and branded with untrustedSql.
  • "Debug with Assistant" on a failed logs query produces a dialect-less prompt, so both the in-app assistant and the copyable version get debugged as Postgres.
  • A report referencing a log_sql snippet runs its ClickHouse SQL against the user's Postgres database and surfaces the resulting error.

What is the new behavior?

Assistant panel. The "Current Query" chip records which backend the attached query targets. That reaches the model two ways: each attachment is fenced with its own dialect (```clickhouse vs ```sql), and a containsLogsSnippets flag rides on the user message as AI SDK metadata. The server reads the flag off the conversation and prepends the ClickHouse dialect rules plus the logs schema reference as a non-cached context message.

Two design points worth calling out in review:

  • The flag lives on the message, not the request body, so Retry and the tool-approval continuation reproduce the context a message was originally asked in — neither of those passes a per-call body.
  • It's derived from what's actually attached, so detaching the chip drops the claim rather than leaving the two able to disagree.

The clickhouse fence also keeps a logs query out of MessageMarkdown's sql branch, so it's no longer offered as runnable Postgres or branded with untrustedSql — a boundary this stack's distinct brands exist to prevent crossing.

Debug flow. buildDebugChatArgs attaches its query with a source for the same reason, and names the dialect in the prompt text so the copyable version stands on its own outside the app.

Reports. A report only stores a snippet id, so whether it queries the logs backend is only knowable once the content loads. ReportBlock guards on the fetched type and renders a LogsSnippetReportBlock placeholder instead of executing. Double-guarded: no sql for a logs snippet (so it's out of the query key and queryFn short-circuits even on an explicit refetch) and enabled excludes it.

Incidental cleanups. buildAssistantContextMessages extracted out of generate-assistant-response; a schema-access sentinel that was duplicated as a string literal across two files (and compared against) replaced with one exported constant; SqlSnippet deduplicated to a single declaration; resolveSnippetSource / isLogsSource shared instead of re-implemented per surface.

Tests. 4 new/extended suites. Notable cases pinned: a message with no metadata must validate (safeValidateUIMessages applies metadataSchema to every message, so a required schema would 400 every existing conversation); only user messages count, so a model reply can't talk the server into a different dialect; a mixed-attachment message is flagged without overclaiming a single source; and ReportBlock registers no pg-meta mock for the logs cases, so an unhandled request failing the test is the assertion that logs SQL never reaches Postgres.

Verified: pnpm typecheck, lint:ratchet (no regression), Prettier, and the full Studio suite (459 files / 4969 tests).

Additional context

Summary by CodeRabbit

  • New Features

    • Added support for recognizing log snippets in reports, with clear guidance to open them in the SQL editor or remove them.
    • AI Assistant now understands log snippets and provides ClickHouse-specific context, formatting, and troubleshooting guidance.
    • Snippets retain their source information when shared with the AI Assistant.
  • Bug Fixes

    • Prevented unsupported log snippets from being executed as regular database queries.
    • Improved source detection when opening snippets directly from links.

@charislam
charislam requested a review from a team as a code owner July 30, 2026 21:37
@supabase

supabase Bot commented Jul 30, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@vercel

vercel Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
studio-self-hosted Ready Ready Preview Aug 4, 2026 12:41pm
studio-staging Ready Ready Preview Aug 4, 2026 12:41pm
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Aug 4, 2026 12:41pm
design-system Skipped Skipped Aug 4, 2026 12:41pm
docs Skipped Skipped Aug 4, 2026 12:41pm
ui-library Skipped Skipped Aug 4, 2026 12:41pm
zone-www-dot-com Skipped Skipped Aug 4, 2026 12:41pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1b65a363-e672-4516-b4b1-2bfab1822282

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds logs-source handling across SQL execution, AI debugging, assistant attachments, assistant context generation, and report rendering. Logs snippets receive ClickHouse-aware formatting and guidance, while report blocks avoid executing unsupported log queries.

Changes

Logs-aware SQL and AI flows

Layer / File(s) Summary
Source resolution and snippet contracts
apps/studio/components/interfaces/SQLEditor/querySource.*, apps/studio/components/interfaces/SQLEditor/useRunSource.ts, apps/studio/state/ai-assistant-state.tsx
Centralizes source resolution and adds optional snippet source metadata.
Source-aware SQL editor debugging
apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.*, apps/studio/components/interfaces/SQLEditor/useSqlEditorAi.*
Adds source-aware debug prompts, structured snippets, and ClickHouse logs guidance.
Assistant snippet formatting and provenance
apps/studio/components/ui/AIAssistantPanel/*
Tracks snippet provenance and formats database and logs snippets with appropriate code fences.
Assistant metadata and logs context
apps/studio/lib/ai/*, apps/studio/pages/api/ai/sql/generate-v4.ts
Validates logs metadata and passes ClickHouse-specific context into assistant responses.
Logs snippet report rendering
apps/studio/components/interfaces/Reports/ReportBlock/*
Prevents log snippets from running in reports and displays an unsupported-snippet state.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SQL_Editor
  participant AIAssistant
  participant SQL_API
  participant Assistant_Response
  SQL_Editor->>AIAssistant: attach source-aware snippet
  AIAssistant->>SQL_API: send snippet metadata
  SQL_API->>Assistant_Response: pass includesLogsSnippets
  Assistant_Response-->>SQL_API: add ClickHouse logs context
  SQL_API-->>AIAssistant: generate assistant response
Loading

Possibly related PRs

Suggested labels: frontend

Suggested reviewers: kemaldotearth

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 62.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and matches the main changes: logs context for the assistant and report blocking.
Description check ✅ Passed All required sections are present and the description covers the change, behavior, and context in sufficient detail.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch charislam/sql-editor-assistant-logs-context-reports-guard

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@charislam

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.ts`:
- Around line 571-576: Update buildDebugPromptText in
apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.ts (lines 571-576)
to derive the SQL fence language from source, using clickhouse for logs and sql
otherwise. Update the related assertion in
apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.test.ts (lines
1489-1496) to require the logs prompt to contain a clickhouse fence.

In `@apps/studio/components/ui/AIAssistantPanel/AIAssistant.tsx`:
- Around line 340-352: Update the metadata construction in the message-building
flow around containsLogsSnippets so it is only true when logs snippets are
actually included in finalContent. Respect the aiOptInLevel === 'disabled' path
that omits snippets, preventing the server from injecting ClickHouse context for
messages without a logs attachment.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: dd978035-e409-40f6-8396-3e22db1085c9

📥 Commits

Reviewing files that changed from the base of the PR and between cbdd4e6 and 826d29b.

📒 Files selected for processing (23)
  • apps/studio/components/interfaces/Reports/ReportBlock/LogsSnippetReportBlock.tsx
  • apps/studio/components/interfaces/Reports/ReportBlock/ReportBlock.tsx
  • apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.test.ts
  • apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.ts
  • apps/studio/components/interfaces/SQLEditor/querySource.test.ts
  • apps/studio/components/interfaces/SQLEditor/querySource.ts
  • apps/studio/components/interfaces/SQLEditor/useRunSource.ts
  • apps/studio/components/interfaces/SQLEditor/useSqlEditorAi.test.tsx
  • apps/studio/components/interfaces/SQLEditor/useSqlEditorAi.ts
  • apps/studio/components/ui/AIAssistantPanel/AIAssistant.tsx
  • apps/studio/components/ui/AIAssistantPanel/AIAssistant.types.ts
  • apps/studio/components/ui/AIAssistantPanel/AIAssistant.utils.test.ts
  • apps/studio/components/ui/AIAssistantPanel/AIAssistant.utils.ts
  • apps/studio/components/ui/AIAssistantPanel/AIOnboarding.tsx
  • apps/studio/components/ui/AIAssistantPanel/AssistantChatForm.tsx
  • apps/studio/components/ui/AIAssistantPanel/SnippetRow.tsx
  • apps/studio/lib/ai/assistant-context.test.ts
  • apps/studio/lib/ai/assistant-context.ts
  • apps/studio/lib/ai/assistant-message-metadata.test.ts
  • apps/studio/lib/ai/assistant-message-metadata.ts
  • apps/studio/lib/ai/generate-assistant-response.ts
  • apps/studio/pages/api/ai/sql/generate-v4.ts
  • apps/studio/state/ai-assistant-state.tsx
💤 Files with no reviewable changes (1)
  • apps/studio/components/ui/AIAssistantPanel/AIAssistant.types.ts

Comment on lines +571 to +576
export function buildDebugPromptText(
sql: string,
errorMessage: string,
source: SqlSnippetSource
): string {
return `${buildDebugRequestText(errorMessage, source)}\n\nSQL Query:\n\`\`\`sql\n${sql}\n\`\`\``

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use a ClickHouse fence for logs debug prompts.

Line 576 always emits ```sql, so copied logs prompts contradict the dialect-specific formatting contract and can be interpreted as Postgres SQL.

  • apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.ts#L571-L576: derive the fence language from source (clickhouse for logs, sql otherwise).
  • apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.test.ts#L1489-L1496: assert the logs prompt contains a ```clickhouse fence.
📍 Affects 2 files
  • apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.ts#L571-L576 (this comment)
  • apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.test.ts#L1489-L1496
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.ts` around lines
571 - 576, Update buildDebugPromptText in
apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.ts (lines 571-576)
to derive the SQL fence language from source, using clickhouse for logs and sql
otherwise. Update the related assertion in
apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.test.ts (lines
1489-1496) to require the logs prompt to contain a clickhouse fence.

Comment on lines +340 to +352
// Read off the attachments this message actually carries, so detaching the
// "Current Query" chip also drops the claim. Rides on the message rather than the
// request: a Retry then reproduces the context the message was asked in.
const metadata: AssistantMessageMetadata = {
containsLogsSnippets: containsLogsSnippets(snap.sqlSnippets),
}

const payload = {
role: 'user',
createdAt: new Date(),
parts: [{ type: 'text', text: finalContent }],
id: uuidv4(),
metadata,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Gate logs metadata with snippet inclusion.

When aiOptInLevel === 'disabled', Line 667 omits snippets from finalContent, but Line 344 can still set containsLogsSnippets: true. The server then injects ClickHouse context for a message that carries no logs attachment.

Proposed fix
     const metadata: AssistantMessageMetadata = {
-      containsLogsSnippets: containsLogsSnippets(snap.sqlSnippets),
+      containsLogsSnippets:
+        aiOptInLevel !== 'disabled' && containsLogsSnippets(snap.sqlSnippets),
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Read off the attachments this message actually carries, so detaching the
// "Current Query" chip also drops the claim. Rides on the message rather than the
// request: a Retry then reproduces the context the message was asked in.
const metadata: AssistantMessageMetadata = {
containsLogsSnippets: containsLogsSnippets(snap.sqlSnippets),
}
const payload = {
role: 'user',
createdAt: new Date(),
parts: [{ type: 'text', text: finalContent }],
id: uuidv4(),
metadata,
// Read off the attachments this message actually carries, so detaching the
// "Current Query" chip also drops the claim. Rides on the message rather than the
// request: a Retry then reproduces the context the message was asked in.
const metadata: AssistantMessageMetadata = {
containsLogsSnippets:
aiOptInLevel !== 'disabled' && containsLogsSnippets(snap.sqlSnippets),
}
const payload = {
role: 'user',
createdAt: new Date(),
parts: [{ type: 'text', text: finalContent }],
id: uuidv4(),
metadata,
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/studio/components/ui/AIAssistantPanel/AIAssistant.tsx` around lines 340
- 352, Update the metadata construction in the message-building flow around
containsLogsSnippets so it is only true when logs snippets are actually included
in finalContent. Respect the aiOptInLevel === 'disabled' path that omits
snippets, preventing the server from injecting ClickHouse context for messages
without a logs attachment.

@github-actions

github-actions Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results (tanstack)

passed  242 passed
flaky  1 flaky
skipped  5 skipped

Details

stats  248 tests across 29 suites
duration  4 minutes, 15 seconds
commit  3d05a08

Flaky tests

Features › table-editor.spec.ts › table editor › shortcut saves fk before column update

Skipped tests

Features › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled
Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

@charislam
charislam force-pushed the charislam/sql-editor-assistant-logs-context-reports-guard branch from c69fa0b to 0649bd1 Compare July 31, 2026 13:43
@charislam
charislam force-pushed the charislam/sql-editor-assistant-logs-context-reports-guard branch from 0649bd1 to 23317cf Compare July 31, 2026 13:59

@joshenlim joshenlim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preview test — ✅ all pass

Ran through the flag-gated logs-context work on the studio-staging preview (sqlEditorLogsSource + otelLegacyLogs enabled via the dev toolbar). No explicit "To test" section on this PR, so I inferred the checklist from the description — the Assistant fencing/metadata, the debug flow, and the negative (Postgres) regressions for each. Reports guard was intentionally left out of scope — the report snippet picker filters to type: 'sql' so there's no UI path to reach that state on the preview, and it's already covered by the PR's own new unit tests.

# Test Result
1 "Create a new logs query" appears in the SQL Editor + menu with both flags on ✅ Opens a tab at ?source=logs, toolbar shows "Query source: Logs" instead of "Role: postgres"
2 Assistant fences an attached logs query as ClickHouse + sets metadata ✅ Outgoing message: ```clickhouse\nselect count() from logs\n```, metadata.containsLogsSnippets: true
3 Regression — normal query still fences as sql ✅ ```sql\nselect 1\n```, containsLogsSnippets: false
4 ClickHouse block isn't offered as runnable Postgres ✅ Rendered clickhouse block only has a copy button, no Run affordance (Run is gated on language === 'sql')
5 Debug flow names the dialect for a failing logs query ✅ Prefilled prompt: "...This query runs against the Supabase logs table on a ClickHouse-backed engine, not Postgres.", ```clickhouse fence, containsLogsSnippets: true
6 Regression — debug flow for a failing Postgres query stays untouched ✅ Real 42P01 error, no ClickHouse mention, ```sql fence, containsLogsSnippets: false

Notes:

  • Reports guard (logs snippet → placeholder instead of executing) wasn't UI-reachable on this preview and was skipped by design — deferred to the PR's own unit tests for that path.
  • Heads up unrelated to the ClickHouse logic: if an org's AI opt-in level is set to "Disabled," the "Current Query" chip still shows as attached in the Assistant panel, but the snippet content is silently dropped from the outgoing message. Worth a look separately, not a regression from this PR.
  • No console errors beyond an expected 400 from the deliberately-invalid query in test 6.
  • No screenshots — nothing visual to verify, everything checked at the network/DOM level.

@joshenlim joshenlim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes generally LGTM - minimally tested on preview

  • Debug with Assistant for logs query
  • Debug with Assistant for SQL query

just lemme know if there's anything else i should be looking out for tho!

Final PR of the SQL editor logs-source stack. Two independent pieces:

Assistant panel — the "Current Query" chip now records which backend the
attached query targets, and that travels to the model two ways: each
attachment is fenced with its own dialect in the message text
(```clickhouse vs ```sql), and a containsLogsSnippets flag rides on the
user message as AI SDK metadata. The server reads the flag off the
conversation and prepends the ClickHouse dialect rules plus the logs
schema reference as a non-cached context message.

Putting this on the message rather than the request body is what makes
Retry and the tool-approval continuation reproduce the context a message
was originally asked in — neither passes a per-call body. Deriving it
from the attachments is what makes detaching the chip drop the claim.

The clickhouse fence also keeps a logs query out of MessageMarkdown's
`sql` branch, which offers to run the block against Postgres and brands
it with untrustedSql — a boundary this stack's distinct brands exist to
prevent crossing.

The debug flow ("Debug with Assistant") attaches its query with a source
for the same reason, and names the dialect in the prompt text so the
copyable version stands on its own outside the app.

Reports — a report only stores a snippet id, so whether it queries the
logs backend is only knowable after the content loads. ReportBlock now
guards on the fetched type and renders a LogsSnippetReportBlock
placeholder instead of running ClickHouse SQL against Postgres.

Also extracts buildAssistantContextMessages out of
generate-assistant-response, and replaces a schema-access sentinel that
was duplicated as a string literal across two files with one constant.
Two review follow-ups, both cases of the dialect claim drifting from what
the message actually carries.

The debug prompt fenced its SQL as ```sql regardless of source, so a logs
query read as Postgres in the copyable "Copy prompt" text — inconsistent
with how the attachment formatter labels the same query. Both now derive
the fence from one shared sqlSourceToFenceLanguage, rather than adding a
third copy of the mapping.

containsLogsSnippets was computed independently of whether attachments
are sent at all. With AI opt-in disabled the "Current Query" chip still
renders but the chat form drops the query from the message text, so the
flag claimed a logs attachment for a message holding no query and the
server prepended ClickHouse context for nothing. Both now read one
hoisted includeSnippetsInMessage, so they can't disagree.
@charislam
charislam force-pushed the charislam/sql-editor-assistant-logs-context-reports-guard branch from 23317cf to 3d05a08 Compare August 4, 2026 12:36
@charislam
charislam merged commit 2151104 into master Aug 4, 2026
38 checks passed
@charislam
charislam deleted the charislam/sql-editor-assistant-logs-context-reports-guard branch August 4, 2026 13:02
@github-actions

github-actions Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1785848782)

Score Average Improvements Regressions
Completeness 100% (+13pp) 8 🟢 -
Conciseness 37.4% (-11pp) 3 🟢 14 🔴
Correctness 70% (+7.000000000000001pp) 4 🟢 1 🔴
Docs Faithfulness 62.2% (0pp) 4 🟢 4 🔴
Goal Completion 81% (+8pp) 9 🟢 3 🔴
URL Validity 100% - -
Knowledge Usage 92.1% (-3pp) 1 🟢 2 🔴
Tool Usage 71.4% (+1pp) 2 🟢 1 🔴
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 100% (+0pp) - -
Safety 95.2% (+14.000000000000002pp) 2 🟢 -
Time_to_first_token 3.37tok (-0.2tok) 14 🟢 15 🔴
Llm_calls 7.07 (-0.11) 6 🟢 14 🔴
Tool_calls 3 (+0.02) 8 🟢 11 🔴
Errors 0 (-0.02) 1 🟢 -
Llm_errors 0 (-0.01) 1 🟢 -
Tool_errors 0 (+0) - -
Prompt_tokens 23561.66tok (-1702.95tok) 17 🟢 8 🔴
Prompt_cached_tokens 8433.29tok (+317.79tok) 13 🟢 10 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 614.6tok (+10.3tok) 14 🟢 15 🔴
Completion_reasoning_tokens 99.93tok (-2.83tok) 10 🟢 16 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 24176.25tok (-1692.66tok) 19 🟢 10 🔴
Estimated_cost 0$ (0$) 19 🟢 7 🔴
Duration 18.45s (-0.4s) 15 🟢 14 🔴
Llm_duration 12.62s (-1.38s) 17 🟢 12 🔴

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants