Sep 9, 2026

How to trace and evaluate open-source custom GPT applications

Instrument open-source custom GPT apps across prompts, retrieval, tools, models, sessions, tokens, and cost, then build offline and production evaluations.

GUIDE9 min readThe Currai team / Engineering

Open-source custom GPT applications are easier to inspect than hosted black boxes, but they still need explicit tracing and evaluation. Instrument the full request—prompt assembly, retrieval, model generations, tools, sessions, token usage, latency, and cost—then score outcomes against the application's actual purpose.

Define the application boundary

Create one trace per user turn and group turns into a session. Add nested spans for retrieval and tools, and generations for model calls. Attach application, prompt, model, and knowledge-base versions.

Open source gives you access to these boundaries; use it. Printing the final prompt is not enough for multi-step behavior.

Instrument provider-neutrally

Use a stable internal trace model so changing the model provider does not destroy comparability. Currai's TypeScript and Python SDKs use traces, spans, and generations; applications can also send OpenTelemetry GenAI spans from other languages. Start with your first trace.

Build task-specific evals

For document Q&A, score retrieval and groundedness. For action agents, score tool selection, arguments, and confirmed completion. For writing assistants, use rubrics calibrated to human preferences. Add deterministic checks for schemas, citations, and prohibited behavior.

Keep a held-out dataset and compare prompt, model, or retrieval candidates on the same examples. Include cost and latency in the decision.

Test configuration and security

Open-source apps are frequently self-hosted with custom connectors. Test missing environment variables, provider timeouts, malformed documents, tenant isolation, prompt injection, and secret redaction. Pin dependency and model versions in experiment metadata.

Do not assume a community template's defaults match your risk profile. Verify tool permissions and side-effect confirmation directly.

Learn from production traces

Monitor errors, user corrections, low-quality scores, repeated turns, and costly paths. Review representative traces, sanitize confirmed failures, and add them to the offline regression suite.

Currai gives an open-source GPT application a consistent evidence layer without requiring a particular agent framework. That keeps the app flexible while making behavior comparable across prompts, models, tools, and releases.

03

Keep going with nearby topics from the Currai blog.