This example Next.js project evaluates multiple LLM models using the Vercel AI SDK and streams updates to the frontend using Trigger.dev Realtime.
This demo is a full stack example that uses the following:
batch.triggerByTaskAndWait
method.Click here to view the full code for this project in our examples repository on GitHub. You can fork it and use it as a starting point for your own project.
evaluateModels
task uses the batch.triggerByTaskAndWait
method to distribute the task to the different LLM models.summarizeEvals
task that calculates some dummy “tags” for each LLM response.AnthropicEval
component: src/components/evals/Anthropic.tsxXAIEval
component: src/components/evals/XAI.tsxOpenAIEval
component: src/components/evals/OpenAI.tsxTo learn more, take a look at the following resources: