new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

AI SDK · Providers · all subjects

confident-ai/capabilities

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Confident AI tracing: generateText example

Example of tracing generateText with Confident AI: import { generateText } from 'ai'; import { openai } from '@ai-sdk/openai'; import { LegacyOpenTelemetry } from '@ai-sdk/otel'; import { configureAiSdkTracing } from 'deepeval-ts'; const tracer = configureAiSdkTracing(); const { text } = await generateText({ model: openai('gpt-4o'), prompt: 'What are LLMs?', telemetry: { integrations: new LegacyOpenTelemetry({ tracer }), }, });

Confident AI tracing: streamText example

Example of tracing streamText with Confident AI: import { streamText } from 'ai'; import { openai } from '@ai-sdk/openai'; import { LegacyOpenTelemetry } from '@ai-sdk/otel'; import { configureAiSdkTracing } from 'deepeval-ts'; const tracer = configureAiSdkTracing(); const result = streamText({ model: openai('gpt-4o'), prompt: 'Invent a new holiday and describe its traditions.', telemetry: { integrations: new LegacyOpenTelemetry({ tracer }), }, }); for await (const textPart of result.textStream) { console.log(textPart); }

Confident AI tracing: generateText with tool calls example

Example of tracing generateText with tool calls using Confident AI: import { generateText, tool, isStepCount } from 'ai'; import { openai } from '@ai-sdk/openai'; import { z } from 'zod'; import { LegacyOpenTelemetry } from '@ai-sdk/otel'; import { configureAiSdkTracing } from 'deepeval-ts'; const tracer = configureAiSdkTracing(); const result = await generateText({ model: openai('gpt-4o'), tools: { weather: tool({ description: 'Get the weather in a location', inputSchema: z.object({ location: z.string().describe('The location to get the weather for'), }), execute: async ({ location }) => ({ location, temperature: 72 + Math.floor(Math.random() * 21) - 10, }), }), }, stopWhen: isStepCount(5), prompt: 'What is the weather in San Francisco?', telemetry: { integrations: new LegacyOpenTelemetry({ tracer }), }, });

Confident AI tracing: generateObject example

Example of tracing generateObject with Confident AI: import { generateObject } from 'ai'; import { openai } from '@ai-sdk/openai'; import { z } from 'zod'; import { LegacyOpenTelemetry } from '@ai-sdk/otel'; import { configureAiSdkTracing } from 'deepeval-ts'; const tracer = configureAiSdkTracing(); const { object } = await generateObject({ model: openai('gpt-4o'), schema: z.object({ recipe: z.object({ name: z.string(), ingredients: z.array(z.object({ name: z.string(), amount: z.string() })), steps: z.array(z.string()), }), }), prompt: 'Generate a lasagna recipe.', telemetry: { integrations: new LegacyOpenTelemetry({ tracer }), }, });

Confident AI capabilities overview

Confident AI is an LLM observability and evaluation platform that integrates with the AI SDK via the deepeval-ts package to provide tracing, online evaluations, and session analytics. It supports tracing for generateText, streamText, generateText with tools, and generateObject functions.

Give your agent this brain