Skip to content

Productionize AI orchestration, safety, usage metering, and evaluations #248

Description

@Vinosaamaa

Parent

#107 (identified by #238)

What to build

Make the AI Study Assistant safe, measurable, and reliable with a real provider. The runtime must use a production model only when configured, stream grounded answers with citations, resist untrusted instructions, meter actual token/cost usage, and route uncertain or unsafe requests to human support.

Acceptance criteria

  • Production provider/model configuration is validated at startup; incompatible defaults such as an OpenAI provider with an Ollama model name fail fast.
  • The orchestration loop has bounded steps/time/tokens, structured tool contracts, cancellation, retries only where safe, and deterministic audit records.
  • Responses cite only retrieved, currently authorized evidence; unsupported claims are refused or labeled uncertain and can create a Support Question/TA handoff.
  • Input/output safety covers prompt injection, harmful content, sensitive data, and abuse without sending unauthorized Course content to third parties.
  • Usage persists provider, model, prompt/completion/cached tokens, latency, outcome, and estimated cost; quotas enforce measured usage rather than invocation count alone.
  • Instructors get truthful usage/error/quality dashboards without access to private learner content beyond policy.
  • A versioned evaluation suite measures groundedness, citation correctness, refusal, scope isolation, handoff quality, latency, and cost against release thresholds.
  • Provider outage, timeout, quota exhaustion, and safety rejection produce useful UI states and never fabricate an answer.

Blocked by

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-agentAI Study Assistant and agentsanalyticsInstructor dashboard and analyticsbackendBackend servicesfrontendFrontend applicationpost-launchAfter Public Launch #86–#104; see post-launch-ui-backlog.mdready-for-agentReady for agent implementationsecuritySecurity and permissionsstoryVertical-slice story

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions