@mastra/mcp-docs-server 1.3.15-alpha.1 → 1.3.15-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/docs/agents/guardrails.md +1 -1
- package/.docs/docs/agents/human-in-the-loop.md +2 -2
- package/.docs/docs/agents/networks.md +1 -1
- package/.docs/docs/agents/overview.md +2 -2
- package/.docs/docs/agents/processors.md +2 -2
- package/.docs/docs/agents/tools.md +3 -3
- package/.docs/docs/auth/composite-auth.md +1 -1
- package/.docs/docs/auth/custom-auth-provider.md +5 -5
- package/.docs/docs/auth/fga.md +1 -1
- package/.docs/docs/auth/jwt.md +2 -2
- package/.docs/docs/auth/simple-auth.md +1 -1
- package/.docs/docs/browser.md +1 -1
- package/.docs/docs/channels.md +2 -2
- package/.docs/docs/connections/sdk-agents.md +1 -1
- package/.docs/docs/deployment/overview.md +2 -2
- package/.docs/docs/deployment/web-framework.md +3 -3
- package/.docs/docs/develop.md +1 -1
- package/.docs/docs/evals/built-in-scorers.md +1 -1
- package/.docs/docs/evals/custom-scorers.md +8 -8
- package/.docs/docs/evals/overview.md +1 -1
- package/.docs/docs/evals/quick-checks.md +1 -1
- package/.docs/docs/guides/authentication-identity.md +1 -1
- package/.docs/docs/guides/context-engineering.md +1 -1
- package/.docs/docs/guides/multi-agent-systems.md +2 -2
- package/.docs/docs/harness/agent-controller.md +5 -3
- package/.docs/docs/harness/background-tasks.md +7 -1
- package/.docs/docs/harness/durable-agents.md +1 -1
- package/.docs/docs/index.md +2 -2
- package/.docs/docs/license.md +1 -1
- package/.docs/docs/mastra-platform/server.md +1 -1
- package/.docs/docs/mastra-platform/trace-intelligence.md +3 -3
- package/.docs/docs/mastra-platform/workspaces.md +1 -1
- package/.docs/docs/memory/memory-processors.md +2 -2
- package/.docs/docs/memory/message-history.md +1 -1
- package/.docs/docs/memory/multi-user-threads.md +1 -1
- package/.docs/docs/memory/observational-memory.md +3 -3
- package/.docs/docs/memory/semantic-recall.md +4 -4
- package/.docs/docs/memory/working-memory.md +16 -16
- package/.docs/docs/observability/integrations/exporters/mastra-storage.md +12 -12
- package/.docs/docs/observability/tracing/overview.md +4 -2
- package/.docs/docs/sandbox/filesystem.md +1 -1
- package/.docs/docs/server/custom-api-routes.md +1 -1
- package/.docs/docs/server/middleware.md +1 -1
- package/.docs/docs/server/request-context.md +1 -1
- package/.docs/docs/signals/overview.md +1 -1
- package/.docs/docs/signals/sending-signals.md +1 -1
- package/.docs/docs/studio/deployment.md +2 -2
- package/.docs/docs/studio/editor.md +2 -2
- package/.docs/docs/studio/observability.md +1 -1
- package/.docs/docs/workflows/control-flow.md +4 -4
- package/.docs/docs/workflows/overview.md +3 -3
- package/.docs/docs/workflows/snapshots.md +2 -2
- package/.docs/integrations/agentic-ui/ai-sdk-ui.md +3 -3
- package/.docs/integrations/agentic-ui/assistant-ui.md +5 -5
- package/.docs/integrations/agentic-ui/copilotkit.md +4 -4
- package/.docs/integrations/agentic-ui/openui.md +2 -2
- package/.docs/integrations/auth/auth0.md +3 -3
- package/.docs/integrations/auth/better-auth.md +1 -1
- package/.docs/integrations/auth/clerk.md +1 -1
- package/.docs/integrations/auth/firebase.md +3 -3
- package/.docs/integrations/auth/google.md +2 -2
- package/.docs/integrations/auth/okta.md +3 -3
- package/.docs/integrations/auth/supabase.md +1 -1
- package/.docs/integrations/auth/workos.md +1 -1
- package/.docs/integrations/browsers/stagehand.md +1 -1
- package/.docs/integrations/channels/imessage.md +1 -1
- package/.docs/integrations/channels/ring.md +6 -6
- package/.docs/integrations/channels/slack.md +1 -1
- package/.docs/integrations/channels/whatsapp.md +1 -1
- package/.docs/integrations/databases/aurora-dsql.md +13 -13
- package/.docs/integrations/databases/clickhouse.md +2 -2
- package/.docs/integrations/databases/cloudflare-d1.md +4 -4
- package/.docs/integrations/databases/cloudflare-kv.md +10 -10
- package/.docs/integrations/databases/convex.md +6 -6
- package/.docs/integrations/databases/dynamodb.md +8 -8
- package/.docs/integrations/databases/elasticsearch.md +6 -6
- package/.docs/integrations/databases/lancedb.md +4 -4
- package/.docs/integrations/databases/mongodb.md +2 -2
- package/.docs/integrations/databases/mssql.md +2 -2
- package/.docs/integrations/databases/oracledb.md +2 -2
- package/.docs/integrations/databases/postgresql.md +14 -14
- package/.docs/integrations/databases/redis.md +7 -7
- package/.docs/integrations/databases/spanner.md +2 -2
- package/.docs/integrations/databases/upstash.md +5 -5
- package/.docs/integrations/databases/valkey.md +1 -1
- package/.docs/integrations/deploy/amazon-ec2.md +1 -1
- package/.docs/integrations/deploy/aws-bedrock-agentcore.md +1 -1
- package/.docs/integrations/deploy/aws-lambda.md +12 -12
- package/.docs/integrations/deploy/azure-app-services.md +2 -2
- package/.docs/integrations/deploy/cloudflare.md +2 -2
- package/.docs/integrations/deploy/digital-ocean.md +2 -2
- package/.docs/integrations/deploy/inngest.md +5 -5
- package/.docs/integrations/deploy/kubernetes-helm.md +20 -20
- package/.docs/integrations/deploy/neon.md +1 -1
- package/.docs/integrations/deploy/netlify.md +1 -1
- package/.docs/integrations/deploy/render.md +1 -1
- package/.docs/integrations/deploy/temporal.md +1 -1
- package/.docs/integrations/deploy/vercel.md +4 -4
- package/.docs/integrations/file-storage/google-cloud-storage.md +1 -1
- package/.docs/integrations/frameworks/angular.md +1 -1
- package/.docs/integrations/frameworks/astro.md +3 -3
- package/.docs/integrations/frameworks/electron.md +1 -1
- package/.docs/integrations/frameworks/express.md +1 -1
- package/.docs/integrations/frameworks/hono.md +1 -1
- package/.docs/integrations/frameworks/nestjs.md +2 -2
- package/.docs/integrations/frameworks/next-js.md +3 -3
- package/.docs/integrations/frameworks/nuxt.md +1 -1
- package/.docs/integrations/frameworks/sveltekit.md +1 -1
- package/.docs/integrations/frameworks/tanstack-start.md +3 -3
- package/.docs/integrations/frameworks/vite-react.md +3 -3
- package/.docs/integrations/observability/arize.md +9 -9
- package/.docs/integrations/observability/arthur.md +3 -3
- package/.docs/integrations/observability/braintrust.md +3 -3
- package/.docs/integrations/observability/confident-ai.md +5 -5
- package/.docs/integrations/observability/datadog.md +9 -9
- package/.docs/integrations/observability/laminar.md +2 -2
- package/.docs/integrations/observability/langfuse.md +13 -13
- package/.docs/integrations/observability/langsmith.md +9 -9
- package/.docs/integrations/observability/opentelemetry.md +23 -23
- package/.docs/integrations/observability/sentry.md +4 -4
- package/.docs/integrations/sandboxes/agentcore.md +1 -1
- package/.docs/integrations/sandboxes/apple-container.md +2 -2
- package/.docs/integrations/sandboxes/cloudflare-sandbox.md +6 -6
- package/.docs/integrations/sandboxes/daytona.md +5 -5
- package/.docs/integrations/sandboxes/docker.md +6 -6
- package/.docs/integrations/sandboxes/e2b-desktop.md +1 -1
- package/.docs/integrations/sandboxes/e2b.md +14 -14
- package/.docs/integrations/sandboxes/modal.md +1 -1
- package/.docs/integrations/sandboxes/railway.md +1 -1
- package/.docs/integrations/sandboxes/sprites.md +2 -2
- package/.docs/integrations/sandboxes/vercel.md +4 -4
- package/.docs/integrations/vectors/couchbase.md +1 -1
- package/.docs/integrations/vectors/duckdb.md +5 -5
- package/.docs/integrations/vectors/lance.md +3 -3
- package/.docs/integrations/vectors/mongodb.md +5 -5
- package/.docs/integrations/vectors/pg.md +11 -11
- package/.docs/integrations/vectors/qdrant.md +2 -2
- package/.docs/integrations/vectors/upstash.md +4 -4
- package/.docs/integrations/voice/azure.md +1 -1
- package/.docs/integrations/voice/cloudflare.md +1 -1
- package/.docs/integrations/voice/google.md +12 -12
- package/.docs/integrations/voice/inworld.md +2 -2
- package/.docs/integrations/voice/livekit.md +25 -25
- package/.docs/integrations/voice/openai.md +4 -4
- package/.docs/integrations/voice/sarvam.md +1 -1
- package/.docs/integrations/voice/speechify.md +1 -1
- package/.docs/integrations/voice/xai.md +1 -1
- package/.docs/models/environment-variables.md +92 -3
- package/.docs/models/gateways/merge-gateway.md +4 -1
- package/.docs/models/gateways/neon.md +1 -2
- package/.docs/models/gateways/netlify.md +7 -6
- package/.docs/models/gateways/openrouter.md +16 -11
- package/.docs/models/gateways/requesty.md +7 -17
- package/.docs/models/gateways/vercel.md +12 -16
- package/.docs/models/index.md +93 -30
- package/.docs/models/providers/302ai.md +2 -1
- package/.docs/models/providers/abacus.md +1 -1
- package/.docs/models/providers/abliteratedllm.md +95 -0
- package/.docs/models/providers/abliteration-ai.md +7 -6
- package/.docs/models/providers/adaption.md +87 -0
- package/.docs/models/providers/adzuki.md +92 -0
- package/.docs/models/providers/aigrow.md +89 -0
- package/.docs/models/providers/aimlapi.md +1 -7
- package/.docs/models/providers/aipg.md +82 -0
- package/.docs/models/providers/aistupidlevel.md +90 -0
- package/.docs/models/providers/aki-io.md +15 -13
- package/.docs/models/providers/ambient.md +13 -12
- package/.docs/models/providers/anonrouter.md +83 -0
- package/.docs/models/providers/anthropic.md +18 -20
- package/.docs/models/providers/apiko.md +83 -0
- package/.docs/models/providers/augure.md +86 -0
- package/.docs/models/providers/autarcho.md +81 -0
- package/.docs/models/providers/bailing.md +15 -12
- package/.docs/models/providers/bumo.md +100 -0
- package/.docs/models/providers/byteplus.md +94 -0
- package/.docs/models/providers/cedarllm.md +81 -0
- package/.docs/models/providers/cheapaimodel.md +85 -0
- package/.docs/models/providers/cheapest-token.md +99 -0
- package/.docs/models/providers/cheapllm.md +81 -0
- package/.docs/models/providers/chutes.md +8 -8
- package/.docs/models/providers/cline-pass.md +4 -3
- package/.docs/models/providers/cloudcode.md +86 -0
- package/.docs/models/providers/cloudflare-workers-ai.md +2 -1
- package/.docs/models/providers/commandcode.md +22 -1
- package/.docs/models/providers/confidential-ai.md +81 -0
- package/.docs/models/providers/cortecs.md +14 -14
- package/.docs/models/providers/crossmodel.md +7 -2
- package/.docs/models/providers/deepinfra.md +3 -1
- package/.docs/models/providers/digitalocean.md +5 -4
- package/.docs/models/providers/dothoosh.md +96 -0
- package/.docs/models/providers/doubleword.md +98 -0
- package/.docs/models/providers/edenai.md +52 -44
- package/.docs/models/providers/empiriolabs.md +2 -1
- package/.docs/models/providers/engy.md +2 -1
- package/.docs/models/providers/entrim.md +84 -0
- package/.docs/models/providers/ezkielyna.md +85 -0
- package/.docs/models/providers/fastrouter.md +21 -5
- package/.docs/models/providers/fiftyx.md +81 -0
- package/.docs/models/providers/fireworks-ai.md +1 -1
- package/.docs/models/providers/fortytwo.md +81 -0
- package/.docs/models/providers/frequency.md +81 -0
- package/.docs/models/providers/frogbot.md +30 -5
- package/.docs/models/providers/gisoo.md +96 -0
- package/.docs/models/providers/google.md +5 -4
- package/.docs/models/providers/graphn.md +87 -0
- package/.docs/models/providers/hetzner.md +1 -1
- package/.docs/models/providers/hostinger-router.md +88 -0
- package/.docs/models/providers/huawei-maas.md +88 -0
- package/.docs/models/providers/hubris.md +96 -0
- package/.docs/models/providers/huggingface.md +5 -1
- package/.docs/models/providers/humain.md +82 -0
- package/.docs/models/providers/hyper.md +24 -22
- package/.docs/models/providers/inceptron.md +4 -4
- package/.docs/models/providers/infer.md +17 -9
- package/.docs/models/providers/inferall.md +86 -0
- package/.docs/models/providers/inference-coop.md +88 -0
- package/.docs/models/providers/inferenceapis.md +91 -0
- package/.docs/models/providers/inferris.md +84 -0
- package/.docs/models/providers/infersia.md +86 -0
- package/.docs/models/providers/isoquant.md +82 -0
- package/.docs/models/providers/iteracompute.md +33 -16
- package/.docs/models/providers/jad-ai.md +83 -0
- package/.docs/models/providers/joingonka.md +83 -0
- package/.docs/models/providers/jzstoken.md +102 -0
- package/.docs/models/providers/keln.md +94 -0
- package/.docs/models/providers/kenari.md +47 -12
- package/.docs/models/providers/kilo.md +191 -100
- package/.docs/models/providers/kitani.md +89 -0
- package/.docs/models/providers/klavo.md +90 -0
- package/.docs/models/providers/korouter.md +99 -0
- package/.docs/models/providers/kunavo.md +96 -0
- package/.docs/models/providers/liquid.md +15 -8
- package/.docs/models/providers/lithosai.md +83 -0
- package/.docs/models/providers/llmgateway-providers.md +96 -43
- package/.docs/models/providers/llmgateway.md +33 -21
- package/.docs/models/providers/logits.md +82 -0
- package/.docs/models/providers/lowrouter.md +17 -4
- package/.docs/models/providers/lyceum.md +88 -0
- package/.docs/models/providers/mallard.md +81 -0
- package/.docs/models/providers/meragpt.md +81 -0
- package/.docs/models/providers/mistral.md +1 -1
- package/.docs/models/providers/moneo.md +92 -0
- package/.docs/models/providers/nan.md +11 -8
- package/.docs/models/providers/nano-gpt.md +77 -73
- package/.docs/models/providers/nearai.md +1 -1
- package/.docs/models/providers/nebius.md +3 -6
- package/.docs/models/providers/neuralwatt.md +28 -25
- package/.docs/models/providers/nodecode.md +81 -0
- package/.docs/models/providers/nokeep.md +83 -0
- package/.docs/models/providers/novita-ai.md +4 -1
- package/.docs/models/providers/oathbreaker.md +82 -0
- package/.docs/models/providers/obscurify.md +95 -0
- package/.docs/models/providers/ofox.md +7 -3
- package/.docs/models/providers/ollama-cloud.md +2 -1
- package/.docs/models/providers/openai.md +4 -2
- package/.docs/models/providers/opencode-go.md +3 -1
- package/.docs/models/providers/opencode.md +5 -3
- package/.docs/models/providers/opper.md +2 -1
- package/.docs/models/providers/outerlabs.md +98 -0
- package/.docs/models/providers/paraloncloud.md +81 -0
- package/.docs/models/providers/pareto.md +9 -7
- package/.docs/models/providers/phala.md +99 -0
- package/.docs/models/providers/phase.md +82 -0
- package/.docs/models/providers/powerspring.md +87 -0
- package/.docs/models/providers/prime.md +5 -5
- package/.docs/models/providers/proxystacks.md +84 -0
- package/.docs/models/providers/rayline.md +82 -0
- package/.docs/models/providers/refuseless.md +86 -0
- package/.docs/models/providers/ruapi.md +89 -0
- package/.docs/models/providers/runcrate.md +91 -0
- package/.docs/models/providers/runinfra.md +2 -1
- package/.docs/models/providers/sagg.md +81 -0
- package/.docs/models/providers/sambanova.md +10 -12
- package/.docs/models/providers/sandbase.md +90 -0
- package/.docs/models/providers/scx-ai.md +20 -10
- package/.docs/models/providers/sensenova.md +4 -4
- package/.docs/models/providers/siliconflow-cn.md +2 -1
- package/.docs/models/providers/sokkan.md +85 -0
- package/.docs/models/providers/sparrowcodes.md +99 -0
- package/.docs/models/providers/steadyrouter.md +101 -0
- package/.docs/models/providers/stepping-stone.md +95 -0
- package/.docs/models/providers/superbot-gg.md +82 -0
- package/.docs/models/providers/synthetic.md +14 -14
- package/.docs/models/providers/synthorai.md +92 -0
- package/.docs/models/providers/teamorouter.md +90 -0
- package/.docs/models/providers/teapot-router.md +87 -0
- package/.docs/models/providers/tencent-token-plan.md +23 -11
- package/.docs/models/providers/tenstorrent.md +84 -0
- package/.docs/models/providers/therouter.md +81 -0
- package/.docs/models/providers/tinfoil.md +1 -1
- package/.docs/models/providers/toapis.md +83 -0
- package/.docs/models/providers/tokenify.md +85 -0
- package/.docs/models/providers/tokenlab.md +81 -0
- package/.docs/models/providers/tokenwatt.md +81 -0
- package/.docs/models/providers/trustedtokens.md +90 -0
- package/.docs/models/providers/umans-ai-coding-plan.md +2 -5
- package/.docs/models/providers/umans-ai.md +5 -7
- package/.docs/models/providers/unbiased.md +81 -0
- package/.docs/models/providers/uncensuredai.md +83 -0
- package/.docs/models/providers/unrestricted.md +84 -0
- package/.docs/models/providers/uplinkswitch.md +92 -0
- package/.docs/models/providers/verda.md +81 -0
- package/.docs/models/providers/volcengine-coding-plan.md +16 -9
- package/.docs/models/providers/volcengine.md +2 -2
- package/.docs/models/providers/wafer.ai.md +20 -10
- package/.docs/models/providers/wallaby.md +7 -5
- package/.docs/models/providers/wally.md +9 -8
- package/.docs/models/providers/watt.md +98 -0
- package/.docs/models/providers/xxapi.md +96 -0
- package/.docs/models/providers/zenifra.md +22 -10
- package/.docs/models/providers/zerogpu.md +89 -0
- package/.docs/models/providers/zro.md +85 -0
- package/.docs/models/providers.md +92 -3
- package/.docs/reference/agents/agent.md +1 -1
- package/.docs/reference/agents/durable-agent.md +2 -2
- package/.docs/reference/agents/generateLegacy.md +4 -4
- package/.docs/reference/agents/network.md +2 -2
- package/.docs/reference/ai-sdk/overview.md +2 -2
- package/.docs/reference/build-with-ai.md +3 -3
- package/.docs/reference/channels/slack-provider.md +1 -1
- package/.docs/reference/classifier/classifier.md +1 -1
- package/.docs/reference/cli/mastra.md +2 -2
- package/.docs/reference/client-js/agent-controller.md +1 -1
- package/.docs/reference/client-js/memory.md +10 -10
- package/.docs/reference/client-js/observability.md +1 -1
- package/.docs/reference/client-js/responses.md +1 -1
- package/.docs/reference/client-js/tools.md +2 -2
- package/.docs/reference/client-js/vectors.md +6 -6
- package/.docs/reference/configuration.md +1 -1
- package/.docs/reference/connect/tools.md +1 -1
- package/.docs/reference/deployer.md +4 -4
- package/.docs/reference/evals/answer-relevancy.md +2 -2
- package/.docs/reference/evals/bias.md +2 -2
- package/.docs/reference/evals/checks.md +1 -1
- package/.docs/reference/evals/completeness.md +4 -4
- package/.docs/reference/evals/content-similarity.md +4 -4
- package/.docs/reference/evals/context-precision.md +6 -6
- package/.docs/reference/evals/context-recall.md +1 -1
- package/.docs/reference/evals/context-relevance.md +9 -9
- package/.docs/reference/evals/create-scorer.md +3 -3
- package/.docs/reference/evals/faithfulness.md +1 -1
- package/.docs/reference/evals/hallucination.md +6 -6
- package/.docs/reference/evals/keyword-coverage.md +2 -2
- package/.docs/reference/evals/multi-turn-judge.md +1 -1
- package/.docs/reference/evals/noise-sensitivity.md +16 -16
- package/.docs/reference/evals/prompt-alignment.md +25 -25
- package/.docs/reference/evals/run-evals.md +2 -2
- package/.docs/reference/evals/summarization.md +1 -1
- package/.docs/reference/evals/textual-difference.md +2 -2
- package/.docs/reference/evals/tone-consistency.md +2 -2
- package/.docs/reference/evals/tool-call-accuracy.md +10 -10
- package/.docs/reference/evals/toxicity.md +2 -2
- package/.docs/reference/evals/trajectory-accuracy.md +2 -2
- package/.docs/reference/manual-install.md +2 -2
- package/.docs/reference/memory/listThreads.md +1 -1
- package/.docs/reference/migrations/agentnetwork.md +1 -1
- package/.docs/reference/migrations/mastra-cloud.md +4 -4
- package/.docs/reference/migrations/mcp-v2.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/deployment.md +1 -1
- package/.docs/reference/migrations/upgrade-to-v1/overview.md +8 -8
- package/.docs/reference/migrations/upgrade-to-v1/tracing.md +3 -3
- package/.docs/reference/observability/tracing/bridges/datadog.md +4 -4
- package/.docs/reference/observability/tracing/bridges/otel.md +4 -4
- package/.docs/reference/observability/tracing/exporters/arize.md +4 -4
- package/.docs/reference/observability/tracing/exporters/arthur.md +3 -3
- package/.docs/reference/observability/tracing/exporters/braintrust.md +2 -2
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +2 -2
- package/.docs/reference/observability/tracing/exporters/confident-ai.md +2 -2
- package/.docs/reference/observability/tracing/exporters/console-exporter.md +1 -1
- package/.docs/reference/observability/tracing/exporters/datadog.md +3 -3
- package/.docs/reference/observability/tracing/exporters/default-exporter.md +5 -5
- package/.docs/reference/observability/tracing/exporters/laminar.md +2 -2
- package/.docs/reference/observability/tracing/exporters/langfuse.md +3 -3
- package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +1 -1
- package/.docs/reference/observability/tracing/exporters/mastra-storage-exporter.md +5 -5
- package/.docs/reference/observability/tracing/exporters/otel.md +4 -4
- package/.docs/reference/observability/tracing/exporters/posthog.md +2 -2
- package/.docs/reference/observability/tracing/exporters/sentry.md +4 -4
- package/.docs/reference/observability/tracing/instances.md +1 -1
- package/.docs/reference/processors/model-selection-processor.md +2 -2
- package/.docs/reference/processors/processor-interface.md +3 -3
- package/.docs/reference/processors/stream-error-retry-processor.md +1 -1
- package/.docs/reference/processors/system-prompt-scrubber.md +1 -1
- package/.docs/reference/processors/token-limiter-processor.md +1 -1
- package/.docs/reference/processors/unicode-normalizer.md +1 -1
- package/.docs/reference/project-structure.md +2 -2
- package/.docs/reference/pubsub/google-cloud-pubsub.md +1 -1
- package/.docs/reference/pubsub/lease-provider.md +1 -1
- package/.docs/reference/pubsub/redis-streams.md +1 -1
- package/.docs/reference/pubsub/unix-socket-pubsub.md +1 -1
- package/.docs/reference/rag/chunk.md +1 -1
- package/.docs/reference/rag/chunking-and-embedding.md +4 -4
- package/.docs/reference/rag/database-config.md +4 -4
- package/.docs/reference/rag/graph-rag-guide.md +3 -3
- package/.docs/reference/rag/metadata-filters.md +4 -4
- package/.docs/reference/rag/overview.md +4 -0
- package/.docs/reference/rag/rerank.md +1 -1
- package/.docs/reference/rag/rerankWithScorer.md +1 -1
- package/.docs/reference/rag/retrieval.md +8 -6
- package/.docs/reference/rag/vector-databases.md +7 -7
- package/.docs/reference/server/nestjs-adapter.md +1 -1
- package/.docs/reference/server/register-api-route.md +5 -5
- package/.docs/reference/storage/composite.md +1 -1
- package/.docs/reference/storage/overview.md +1 -1
- package/.docs/reference/storage/retention.md +2 -2
- package/.docs/reference/storage/turso.md +1 -1
- package/.docs/reference/streaming/agents/MastraModelOutput.md +5 -5
- package/.docs/reference/streaming/agents/stream.md +5 -5
- package/.docs/reference/streaming/agents/streamLegacy.md +4 -4
- package/.docs/reference/templates/overview.md +1 -1
- package/.docs/reference/tools/bedrock-kb-tool.md +8 -8
- package/.docs/reference/tools/mcp-client.md +9 -9
- package/.docs/reference/tools/mcp-server.md +17 -17
- package/.docs/reference/tools/vector-query-tool.md +6 -6
- package/.docs/reference/voice/composite-voice.md +3 -3
- package/.docs/reference/voice/overview.md +5 -5
- package/.docs/reference/voice/speech-to-speech.md +2 -2
- package/.docs/reference/voice/voice.close.md +1 -1
- package/.docs/reference/voice/voice.connect.md +1 -1
- package/.docs/reference/voice/voice.listen.md +1 -1
- package/.docs/reference/voice/voice.speak.md +1 -1
- package/.docs/reference/workspace/local-sandbox.md +1 -1
- package/package.json +2 -2
|
@@ -42,7 +42,7 @@ const thread = mastraClient.getMemoryThread({ threadId: 'thread-id', agentId: 'a
|
|
|
42
42
|
|
|
43
43
|
## Thread methods
|
|
44
44
|
|
|
45
|
-
### Get
|
|
45
|
+
### Get thread details
|
|
46
46
|
|
|
47
47
|
Retrieve details about a specific thread:
|
|
48
48
|
|
|
@@ -50,7 +50,7 @@ Retrieve details about a specific thread:
|
|
|
50
50
|
const details = await thread.get()
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
### Update
|
|
53
|
+
### Update thread
|
|
54
54
|
|
|
55
55
|
Update thread properties:
|
|
56
56
|
|
|
@@ -62,7 +62,7 @@ const updated = await thread.update({
|
|
|
62
62
|
})
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
### Delete
|
|
65
|
+
### Delete thread
|
|
66
66
|
|
|
67
67
|
Delete a thread and its messages:
|
|
68
68
|
|
|
@@ -70,7 +70,7 @@ Delete a thread and its messages:
|
|
|
70
70
|
await thread.delete()
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
### Clone
|
|
73
|
+
### Clone thread
|
|
74
74
|
|
|
75
75
|
Create a copy of a thread with all its messages:
|
|
76
76
|
|
|
@@ -111,7 +111,7 @@ The clone response includes:
|
|
|
111
111
|
|
|
112
112
|
## Message operations
|
|
113
113
|
|
|
114
|
-
### Save
|
|
114
|
+
### Save messages
|
|
115
115
|
|
|
116
116
|
Save messages to memory:
|
|
117
117
|
|
|
@@ -135,7 +135,7 @@ const result = await mastraClient.saveMessageToMemory({
|
|
|
135
135
|
console.log(result.messages)
|
|
136
136
|
```
|
|
137
137
|
|
|
138
|
-
### Retrieve
|
|
138
|
+
### Retrieve thread messages
|
|
139
139
|
|
|
140
140
|
Get messages associated with a memory thread:
|
|
141
141
|
|
|
@@ -172,7 +172,7 @@ const result = await thread.listMessages({
|
|
|
172
172
|
|
|
173
173
|
Metadata filters match shallow scalar values only: `string`, finite `number`, `boolean`, and `null`. Every key-value pair must match with AND semantics. `null` matches only keys explicitly set to `null`. Metadata keys must start with a letter or underscore and contain only alphanumeric or underscore characters. The limit is 128 characters. Reserved prototype keys such as `__proto__`, `constructor`, and `prototype` aren't allowed. Performance depends on the server storage backend, and arbitrary metadata filters may scan candidate messages.
|
|
174
174
|
|
|
175
|
-
### Delete
|
|
175
|
+
### Delete messages
|
|
176
176
|
|
|
177
177
|
Delete one or more messages from a thread:
|
|
178
178
|
|
|
@@ -190,7 +190,7 @@ const result = await thread.deleteMessages(['message-1', 'message-2', 'message-3
|
|
|
190
190
|
|
|
191
191
|
Working memory allows agents to maintain persistent information about users across interactions. It can be scoped to either a specific thread or across all threads for a resource (user).
|
|
192
192
|
|
|
193
|
-
### Get
|
|
193
|
+
### Get working Memory
|
|
194
194
|
|
|
195
195
|
Retrieve the current working memory for a thread:
|
|
196
196
|
|
|
@@ -209,7 +209,7 @@ The response includes:
|
|
|
209
209
|
- `workingMemoryTemplate`: The template used for working memory (if configured)
|
|
210
210
|
- `threadExists`: Whether the thread exists
|
|
211
211
|
|
|
212
|
-
### Update
|
|
212
|
+
### Update working Memory
|
|
213
213
|
|
|
214
214
|
Update the working memory content for a thread:
|
|
215
215
|
|
|
@@ -242,7 +242,7 @@ await mastraClient.updateWorkingMemory({
|
|
|
242
242
|
})
|
|
243
243
|
```
|
|
244
244
|
|
|
245
|
-
### Get Memory
|
|
245
|
+
### Get Memory status
|
|
246
246
|
|
|
247
247
|
Check the status of the memory system:
|
|
248
248
|
|
|
@@ -360,7 +360,7 @@ Both methods use case-insensitive literal substring search and accept an empty s
|
|
|
360
360
|
|
|
361
361
|
Suggestions are bounded and advisory. Manual values remain valid when suggestions are unavailable, empty, or truncated. Discovery doesn't accept a draft query predicate. The client doesn't retry either request, and a per-call `AbortSignal` takes precedence over the signal configured on `MastraClient`.
|
|
362
362
|
|
|
363
|
-
A discovery timeout rejects with `504 TRACE_QUERY_EXECUTION_TIMEOUT`. Backend memory or resource exhaustion rejects with `503 TRACE_QUERY_RESOURCE_LIMIT`. Neither error contains partial suggestions; truncation flags are only present on successful,
|
|
363
|
+
A discovery timeout rejects with `504 TRACE_QUERY_EXECUTION_TIMEOUT`. Backend memory or resource exhaustion rejects with `503 TRACE_QUERY_RESOURCE_LIMIT`. Neither error contains partial suggestions; truncation flags are only present on successful, fully ranked responses.
|
|
364
364
|
|
|
365
365
|
## Deleting traces
|
|
366
366
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
4
4
|
|
|
5
|
-
# OpenAI
|
|
5
|
+
# OpenAI responses API
|
|
6
6
|
|
|
7
7
|
This OpenAI-compatible, agent-backed interface lets you use Mastra Agents as a Responses API. It provides methods to create, retrieve, stream, and delete responses through Mastra agents.
|
|
8
8
|
|
|
@@ -24,7 +24,7 @@ const tool = mastraClient.getTool('tool-id')
|
|
|
24
24
|
|
|
25
25
|
## Tool methods
|
|
26
26
|
|
|
27
|
-
### Get
|
|
27
|
+
### Get tool details
|
|
28
28
|
|
|
29
29
|
Retrieve detailed information about a tool:
|
|
30
30
|
|
|
@@ -32,7 +32,7 @@ Retrieve detailed information about a tool:
|
|
|
32
32
|
const details = await tool.details()
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
### Execute
|
|
35
|
+
### Execute tool
|
|
36
36
|
|
|
37
37
|
Execute a tool with specific arguments:
|
|
38
38
|
|
|
@@ -16,7 +16,7 @@ const vector = mastraClient.getVector('vector-name')
|
|
|
16
16
|
|
|
17
17
|
## Vector methods
|
|
18
18
|
|
|
19
|
-
### Get
|
|
19
|
+
### Get vector index details
|
|
20
20
|
|
|
21
21
|
Retrieve information about a specific vector index:
|
|
22
22
|
|
|
@@ -24,7 +24,7 @@ Retrieve information about a specific vector index:
|
|
|
24
24
|
const details = await vector.details('index-name')
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
### Create
|
|
27
|
+
### Create vector index
|
|
28
28
|
|
|
29
29
|
Create a new vector index:
|
|
30
30
|
|
|
@@ -36,7 +36,7 @@ const result = await vector.createIndex({
|
|
|
36
36
|
})
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
### Upsert
|
|
39
|
+
### Upsert vectors
|
|
40
40
|
|
|
41
41
|
Add or update vectors in an index:
|
|
42
42
|
|
|
@@ -52,7 +52,7 @@ const ids = await vector.upsert({
|
|
|
52
52
|
})
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
### Query
|
|
55
|
+
### Query vectors
|
|
56
56
|
|
|
57
57
|
Search for similar vectors:
|
|
58
58
|
|
|
@@ -66,7 +66,7 @@ const results = await vector.query({
|
|
|
66
66
|
})
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
### Get
|
|
69
|
+
### Get all indexes
|
|
70
70
|
|
|
71
71
|
List all available indexes:
|
|
72
72
|
|
|
@@ -74,7 +74,7 @@ List all available indexes:
|
|
|
74
74
|
const indexes = await vector.getIndexes()
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
### Delete
|
|
77
|
+
### Delete index
|
|
78
78
|
|
|
79
79
|
Delete a vector index:
|
|
80
80
|
|
|
@@ -145,7 +145,7 @@ Error handling depends on the cause:
|
|
|
145
145
|
- If a background refresh fails while a snapshot is cached, the resolver keeps serving the cached toolsets and warns. It rejects only when nothing was ever cached.
|
|
146
146
|
- A problem with one provider, such as a connection that needs reauthorization, logs a warning and skips that provider. The other providers' tools still load.
|
|
147
147
|
|
|
148
|
-
## Code
|
|
148
|
+
## Code mode
|
|
149
149
|
|
|
150
150
|
`codeMode()` gives the agent the connected tools through [Code Mode](https://mastra.ai/docs/agents/code-mode): the agent writes one TypeScript program that calls the tools as `external_*` functions, instead of calling each tool in its own step. Use it when tasks fan out across many calls or providers, such as listing items in one provider and looking each one up in another.
|
|
151
151
|
|
|
@@ -41,7 +41,7 @@ class CustomDeployer extends Deployer {
|
|
|
41
41
|
|
|
42
42
|
**args.name** (`string`): A unique name for the deployer instance.
|
|
43
43
|
|
|
44
|
-
### deploy
|
|
44
|
+
### deploy parameters
|
|
45
45
|
|
|
46
46
|
**outputDirectory** (`string`): The directory where the bundled and deployment-ready application will be output.
|
|
47
47
|
|
|
@@ -63,7 +63,7 @@ The Deployer class inherits the following key methods from the Bundler class:
|
|
|
63
63
|
|
|
64
64
|
## Core concepts
|
|
65
65
|
|
|
66
|
-
### Deployment
|
|
66
|
+
### Deployment lifecycle
|
|
67
67
|
|
|
68
68
|
The Deployer abstract class implements a structured deployment lifecycle:
|
|
69
69
|
|
|
@@ -73,7 +73,7 @@ The Deployer abstract class implements a structured deployment lifecycle:
|
|
|
73
73
|
4. **Bundling**: The `_bundle` method (inherited from Bundler) packages the application code and its dependencies.
|
|
74
74
|
5. **Deployment**: The abstract `deploy` method is implemented by subclasses to handle the actual deployment process.
|
|
75
75
|
|
|
76
|
-
### Environment
|
|
76
|
+
### Environment file management
|
|
77
77
|
|
|
78
78
|
The Deployer class includes built-in support for environment file management through the `getEnvFiles` method. This method:
|
|
79
79
|
|
|
@@ -90,7 +90,7 @@ getEnvFiles(): Promise<string[]> {
|
|
|
90
90
|
}
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
### Bundling and
|
|
93
|
+
### Bundling and deployment relationship
|
|
94
94
|
|
|
95
95
|
The Deployer class extends the Bundler class, establishing a clear relationship between bundling and deployment:
|
|
96
96
|
|
|
@@ -40,7 +40,7 @@ This function returns an instance of the MastraScorer class. The `.run()` method
|
|
|
40
40
|
|
|
41
41
|
The scorer evaluates relevancy through query-answer alignment, considering completeness and detail level, but not factual correctness.
|
|
42
42
|
|
|
43
|
-
### Scoring
|
|
43
|
+
### Scoring process
|
|
44
44
|
|
|
45
45
|
1. **Statement Preprocess:**
|
|
46
46
|
- Breaks output into useful statements while preserving context.
|
|
@@ -56,7 +56,7 @@ The scorer evaluates relevancy through query-answer alignment, considering compl
|
|
|
56
56
|
3. **Score Calculation:**
|
|
57
57
|
- `((direct + uncertainty * partial) / total_statements) * scale`
|
|
58
58
|
|
|
59
|
-
### Score
|
|
59
|
+
### Score interpretation
|
|
60
60
|
|
|
61
61
|
A relevancy score between 0 and `scale` (0 to 1 with the default scale). The ranges below assume the default scale:
|
|
62
62
|
|
|
@@ -53,7 +53,7 @@ The scorer evaluates bias through opinion analysis based on:
|
|
|
53
53
|
- Balance in perspective presentation
|
|
54
54
|
- Loaded or prejudicial terminology
|
|
55
55
|
|
|
56
|
-
### Scoring
|
|
56
|
+
### Scoring process
|
|
57
57
|
|
|
58
58
|
1. Extracts opinions from text:
|
|
59
59
|
|
|
@@ -77,7 +77,7 @@ A bias score between 0 and `scale` (0 to 1 with the default scale). The ranges b
|
|
|
77
77
|
- **0.7 to 0.9**: Includes strong prejudiced assumptions or generalizations.
|
|
78
78
|
- **0.4 to 0.6**: Mixes reasonable points with subtle bias or stereotypes.
|
|
79
79
|
- **0.1 to 0.3**: Mostly neutral with minor biased language or assumptions.
|
|
80
|
-
- **0.0**:
|
|
80
|
+
- **0.0**: Fully objective and free from bias.
|
|
81
81
|
|
|
82
82
|
## Example
|
|
83
83
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
4
4
|
|
|
5
|
-
# Quick
|
|
5
|
+
# Quick checks
|
|
6
6
|
|
|
7
7
|
Quick Checks are zero-LLM, composable micro-scorers for common assertions. They plug into the existing `scorers: [...]` array anywhere scorers are used: in `runEvals`, live scoring, experiments, and Studio.
|
|
8
8
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Completeness scorer
|
|
6
6
|
|
|
7
|
-
The `createCompletenessScorer()` function evaluates how
|
|
7
|
+
The `createCompletenessScorer()` function evaluates how well an LLM's output covers the key elements present in the input. It analyzes nouns, verbs, topics, and terms to determine coverage and provides a detailed completeness score.
|
|
8
8
|
|
|
9
9
|
## Parameters
|
|
10
10
|
|
|
@@ -64,7 +64,7 @@ From the `.run()` method, you can get the `preprocessStepResult` object with the
|
|
|
64
64
|
|
|
65
65
|
The scorer evaluates completeness through linguistic element coverage analysis.
|
|
66
66
|
|
|
67
|
-
### Scoring
|
|
67
|
+
### Scoring process
|
|
68
68
|
|
|
69
69
|
1. Extracts key elements:
|
|
70
70
|
|
|
@@ -89,8 +89,8 @@ The completeness scorer has no `scale` option. The score is always between 0 and
|
|
|
89
89
|
A completeness score between 0 and 1:
|
|
90
90
|
|
|
91
91
|
- **1.0**: Addresses all aspects of the query in detail.
|
|
92
|
-
- **0.7 to 0.9**: Covers most important
|
|
93
|
-
- **0.4 to 0.6**: Addresses some key points but
|
|
92
|
+
- **0.7 to 0.9**: Covers most of the important points with good detail, minor gaps.
|
|
93
|
+
- **0.4 to 0.6**: Addresses some key points but misses important points or lacks detail.
|
|
94
94
|
- **0.1 to 0.3**: Only partially addresses the query with substantial gaps.
|
|
95
95
|
- **0.0**: Fails to address the query or provides irrelevant information.
|
|
96
96
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Content similarity scorer
|
|
6
6
|
|
|
7
|
-
The `createContentSimilarityScorer()` function measures the textual similarity between two strings, providing a score that indicates how
|
|
7
|
+
The `createContentSimilarityScorer()` function measures the textual similarity between two strings, providing a score that indicates how similar they are. It supports configurable options for case sensitivity and whitespace handling.
|
|
8
8
|
|
|
9
9
|
## Parameters
|
|
10
10
|
|
|
@@ -28,7 +28,7 @@ This function returns an instance of the MastraScorer class. See the [MastraScor
|
|
|
28
28
|
|
|
29
29
|
The scorer evaluates textual similarity through character-level matching and configurable text normalization.
|
|
30
30
|
|
|
31
|
-
### Scoring
|
|
31
|
+
### Scoring process
|
|
32
32
|
|
|
33
33
|
1. Normalizes text:
|
|
34
34
|
|
|
@@ -89,11 +89,11 @@ To add this scorer to an agent, see the [Scorers overview](https://mastra.ai/doc
|
|
|
89
89
|
|
|
90
90
|
A similarity score between 0 and 1:
|
|
91
91
|
|
|
92
|
-
- **1.0**: Perfect match, content is
|
|
92
|
+
- **1.0**: Perfect match, content is identical in substance.
|
|
93
93
|
- **0.7 to 0.9**: High similarity, minor differences in word choice or structure.
|
|
94
94
|
- **0.4 to 0.6**: Moderate similarity, general overlap with noticeable variation.
|
|
95
95
|
- **0.1 to 0.3**: Low similarity, few common elements or shared meaning.
|
|
96
|
-
- **0.0**: No similarity,
|
|
96
|
+
- **0.0**: No similarity, unrelated content.
|
|
97
97
|
|
|
98
98
|
## Related
|
|
99
99
|
|
|
@@ -42,7 +42,7 @@ If you pass `context`, the array must be non-empty. The constructor throws `Cont
|
|
|
42
42
|
|
|
43
43
|
## Scoring details
|
|
44
44
|
|
|
45
|
-
### Mean
|
|
45
|
+
### Mean average precision (MAP)
|
|
46
46
|
|
|
47
47
|
Context Precision uses **Mean Average Precision** to evaluate both relevance and positioning:
|
|
48
48
|
|
|
@@ -51,7 +51,7 @@ Context Precision uses **Mean Average Precision** to evaluate both relevance and
|
|
|
51
51
|
3. **Average Precision**: Sum all precision values and divide by total relevant items
|
|
52
52
|
4. **Final Score**: Multiply by scale factor and round to 2 decimals
|
|
53
53
|
|
|
54
|
-
### Scoring
|
|
54
|
+
### Scoring formula
|
|
55
55
|
|
|
56
56
|
```text
|
|
57
57
|
MAP = (Σ Precision@k) / R
|
|
@@ -62,12 +62,12 @@ Where:
|
|
|
62
62
|
- Only calculated at positions where relevant items appear
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
### Score
|
|
65
|
+
### Score interpretation
|
|
66
66
|
|
|
67
|
-
- **0.9-1.0**:
|
|
67
|
+
- **0.9-1.0**: High precision - all relevant context early in sequence
|
|
68
68
|
- **0.7-0.8**: Good precision - most relevant context well-positioned
|
|
69
69
|
- **0.4-0.6**: Moderate precision - relevant context mixed with irrelevant
|
|
70
|
-
- **0.1-0.3**: Poor precision - little relevant context or
|
|
70
|
+
- **0.1-0.3**: Poor precision - little relevant context or badly positioned
|
|
71
71
|
- **0.0**: No relevant context found
|
|
72
72
|
|
|
73
73
|
### Reason analysis
|
|
@@ -87,7 +87,7 @@ Use results to:
|
|
|
87
87
|
- **Tune chunk size**: Balance context detail vs. relevance precision
|
|
88
88
|
- **Evaluate embeddings**: Test different embedding models for better retrieval
|
|
89
89
|
|
|
90
|
-
### Example
|
|
90
|
+
### Example calculation
|
|
91
91
|
|
|
92
92
|
context: `[relevant, irrelevant, relevant, irrelevant]`
|
|
93
93
|
|
|
@@ -64,7 +64,7 @@ Where:
|
|
|
64
64
|
|
|
65
65
|
These ranges assume the default `scale` of 1. When using a custom scale, multiply accordingly.
|
|
66
66
|
|
|
67
|
-
- **0.9-1.0**:
|
|
67
|
+
- **0.9-1.0**: High recall, context covers almost all ground-truth claims
|
|
68
68
|
- **0.7-0.8**: Good recall. Most claims are covered, with minor gaps
|
|
69
69
|
- **0.4-0.6**: Moderate recall, substantial information missing from context
|
|
70
70
|
- **0.1-0.3**: Poor recall, most ground-truth claims not found in context
|
|
@@ -40,7 +40,7 @@ Note: Either `context` or `contextExtractor` must be provided. If both are provi
|
|
|
40
40
|
|
|
41
41
|
## Scoring details
|
|
42
42
|
|
|
43
|
-
### Weighted
|
|
43
|
+
### Weighted relevance scoring
|
|
44
44
|
|
|
45
45
|
Context Relevance uses a advanced scoring algorithm that considers:
|
|
46
46
|
|
|
@@ -49,7 +49,7 @@ Context Relevance uses a advanced scoring algorithm that considers:
|
|
|
49
49
|
- `high` = 1.0 (directly addresses the query)
|
|
50
50
|
- `medium` = 0.7 (supporting information)
|
|
51
51
|
- `low` = 0.3 (tangentially related)
|
|
52
|
-
- `none` = 0.0 (
|
|
52
|
+
- `none` = 0.0 (irrelevant)
|
|
53
53
|
|
|
54
54
|
2. **Usage Detection**: Tracks whether relevant context was actually used in the response
|
|
55
55
|
|
|
@@ -58,7 +58,7 @@ Context Relevance uses a advanced scoring algorithm that considers:
|
|
|
58
58
|
- **Unused High-Relevance**: `unusedHighRelevanceContext` penalty per unused high-relevance context (default: 0.1)
|
|
59
59
|
- **Missing Context**: Up to `maxMissingContextPenalty` for identified missing information (default: 0.5)
|
|
60
60
|
|
|
61
|
-
### Scoring
|
|
61
|
+
### Scoring formula
|
|
62
62
|
|
|
63
63
|
```text
|
|
64
64
|
Base Score = Σ(relevance_weights) / (num_contexts × 1.0)
|
|
@@ -77,11 +77,11 @@ Final Score = max(0, Base Score - Usage Penalty - Missing Penalty) × scale
|
|
|
77
77
|
|
|
78
78
|
### Score interpretation
|
|
79
79
|
|
|
80
|
-
- **0.9-1.0**:
|
|
80
|
+
- **0.9-1.0**: High - all context highly relevant and used
|
|
81
81
|
- **0.7-0.8**: Good - mostly relevant with minor gaps
|
|
82
82
|
- **0.4-0.6**: Mixed - substantial irrelevant or unused context
|
|
83
83
|
- **0.2-0.3**: Poor - mostly irrelevant context
|
|
84
|
-
- **0.0-0.1**:
|
|
84
|
+
- **0.0-0.1**: Low - no relevant context found
|
|
85
85
|
|
|
86
86
|
### Reason analysis
|
|
87
87
|
|
|
@@ -97,12 +97,12 @@ The reason field provides insights on:
|
|
|
97
97
|
Use results to improve your system:
|
|
98
98
|
|
|
99
99
|
- **Filter irrelevant context**: Remove low/none relevance pieces before processing
|
|
100
|
-
- **Ensure context usage**:
|
|
100
|
+
- **Ensure context usage**: Ensure high-relevance context is incorporated
|
|
101
101
|
- **Fill context gaps**: Add missing information identified by the scorer
|
|
102
102
|
- **Balance context size**: Find optimal amount of context for best relevance
|
|
103
103
|
- **Tune penalty sensitivity**: Adjust `unusedHighRelevanceContext`, `missingContextPerItem`, and `maxMissingContextPenalty` based on your application's tolerance for unused or missing context
|
|
104
104
|
|
|
105
|
-
### Difference from
|
|
105
|
+
### Difference from context precision
|
|
106
106
|
|
|
107
107
|
| Aspect | Context Relevance | Context Precision |
|
|
108
108
|
| ------------- | -------------------------------------- | ---------------------------------- |
|
|
@@ -183,7 +183,7 @@ console.log('Strict penalties:', strictResult.score) // Lower score due to unuse
|
|
|
183
183
|
console.log('Lenient penalties:', lenientResult.score) // Higher score, less penalty
|
|
184
184
|
```
|
|
185
185
|
|
|
186
|
-
### Dynamic
|
|
186
|
+
### Dynamic context extraction
|
|
187
187
|
|
|
188
188
|
```typescript
|
|
189
189
|
const scorer = createContextRelevanceScorerLLM({
|
|
@@ -246,7 +246,7 @@ const scorer = createContextRelevanceScorerLLM({
|
|
|
246
246
|
|
|
247
247
|
### High relevance example
|
|
248
248
|
|
|
249
|
-
This example shows
|
|
249
|
+
This example shows strong context relevance where all context directly supports the response:
|
|
250
250
|
|
|
251
251
|
```typescript
|
|
252
252
|
import { createContextRelevanceScorerLLM } from '@mastra/evals/scorers/prebuilt'
|
|
@@ -128,7 +128,7 @@ Coordinated processor retries require a judge model that uses Mastra’s current
|
|
|
128
128
|
|
|
129
129
|
You can specify input/output types when creating scorers for better type inference and IntelliSense support:
|
|
130
130
|
|
|
131
|
-
### Agent
|
|
131
|
+
### Agent type shortcut
|
|
132
132
|
|
|
133
133
|
For evaluating agents, use `type: 'agent'` to automatically get the correct types for agent input/output:
|
|
134
134
|
|
|
@@ -153,7 +153,7 @@ const agentScorer = createScorer({
|
|
|
153
153
|
})
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
-
### Custom
|
|
156
|
+
### Custom types with generics
|
|
157
157
|
|
|
158
158
|
For custom input/output types, use the generic approach:
|
|
159
159
|
|
|
@@ -173,7 +173,7 @@ const customScorer = createScorer<CustomInput, CustomOutput>({
|
|
|
173
173
|
})
|
|
174
174
|
```
|
|
175
175
|
|
|
176
|
-
### Built-in
|
|
176
|
+
### Built-in agent types
|
|
177
177
|
|
|
178
178
|
- **`ScorerRunInputForAgent`** - Contains `inputMessages`, `rememberedMessages`, `systemMessages`, and `taggedSystemMessages` for agent evaluation
|
|
179
179
|
- **`ScorerRunOutputForAgent`** - Array of agent response messages
|
|
@@ -42,7 +42,7 @@ This function returns an instance of the MastraScorer class. The `.run()` method
|
|
|
42
42
|
|
|
43
43
|
The scorer evaluates faithfulness through claim verification against provided context.
|
|
44
44
|
|
|
45
|
-
### Scoring
|
|
45
|
+
### Scoring process
|
|
46
46
|
|
|
47
47
|
1. Analyzes claims and context:
|
|
48
48
|
|
|
@@ -44,7 +44,7 @@ This function returns an instance of the MastraScorer class. The `.run()` method
|
|
|
44
44
|
|
|
45
45
|
The scorer evaluates hallucination through contradiction detection and unsupported claim analysis.
|
|
46
46
|
|
|
47
|
-
### Scoring
|
|
47
|
+
### Scoring process
|
|
48
48
|
|
|
49
49
|
1. Extracts claims from the output:
|
|
50
50
|
|
|
@@ -67,7 +67,7 @@ The scorer evaluates hallucination through contradiction detection and unsupport
|
|
|
67
67
|
|
|
68
68
|
Final score: `min(1, hallucinated_statements / total_statements) * (scale || 1)`, rounded to two decimal places, when `total_statements > 0`, otherwise `0`.
|
|
69
69
|
|
|
70
|
-
### Important
|
|
70
|
+
### Important considerations
|
|
71
71
|
|
|
72
72
|
- Claims not present in context are treated as hallucinations
|
|
73
73
|
|
|
@@ -99,7 +99,7 @@ The score represents the degree of hallucination - lower scores indicate better
|
|
|
99
99
|
|
|
100
100
|
## Examples
|
|
101
101
|
|
|
102
|
-
### Static
|
|
102
|
+
### Static context
|
|
103
103
|
|
|
104
104
|
Use static context when you have known ground truth to compare against:
|
|
105
105
|
|
|
@@ -118,7 +118,7 @@ const scorer = createHallucinationScorer({
|
|
|
118
118
|
})
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
### Dynamic
|
|
121
|
+
### Dynamic context with `getContext`
|
|
122
122
|
|
|
123
123
|
Use `getContext` for live scoring scenarios where context comes from tool results:
|
|
124
124
|
|
|
@@ -138,7 +138,7 @@ const scorer = createHallucinationScorer({
|
|
|
138
138
|
})
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
-
### Live
|
|
141
|
+
### Live scoring with agent
|
|
142
142
|
|
|
143
143
|
Attach the scorer to an agent for live evaluation:
|
|
144
144
|
|
|
@@ -168,7 +168,7 @@ const agent = new Agent({
|
|
|
168
168
|
})
|
|
169
169
|
```
|
|
170
170
|
|
|
171
|
-
### Batch
|
|
171
|
+
### Batch evaluation with `runEvals`
|
|
172
172
|
|
|
173
173
|
```typescript
|
|
174
174
|
import { runEvals } from '@mastra/core/evals'
|
|
@@ -48,7 +48,7 @@ The scorer evaluates keyword coverage by matching keywords with the following fe
|
|
|
48
48
|
- Word form variation handling
|
|
49
49
|
- Special handling of technical terms and compound words
|
|
50
50
|
|
|
51
|
-
### Scoring
|
|
51
|
+
### Scoring process
|
|
52
52
|
|
|
53
53
|
1. Processes keywords from input and output:
|
|
54
54
|
|
|
@@ -74,7 +74,7 @@ A coverage score between 0 and 1:
|
|
|
74
74
|
- **0.1 to 0.3**: Low coverage, few keywords matched.
|
|
75
75
|
- **0.0**: The response contains none of the keywords.
|
|
76
76
|
|
|
77
|
-
### Special
|
|
77
|
+
### Special cases
|
|
78
78
|
|
|
79
79
|
The scorer handles several special cases:
|
|
80
80
|
|