Real-time Market Trend Agent
Develop a real-time market trend analysis agent using Mastra AI, designed to monitor specific metrics (e.g., user engagement on social platforms, e-commerce order volumes) and identify significant shifts. The agent will leverage Mistral Large 2 via the Hugging Face Inference API for advanced pattern recognition and sentiment analysis. It will utilize Pinecone as a vector store to maintain a historical context of trends and associated data points, preventing information overload by focusing on novel insights. A Bito AI-like interface component will allow users to interact with the agent for on-demand reports and trend explanations, requiring efficient, scalable processing to deliver timely insights.
What you are building
The core problem, expected build, and operating context for this challenge.
Build a real-time market trend analysis agent with Mastra AI, Mistral Large 2, and Pinecone, surfaced through an interactive interface.
How work is evaluated
The agent will be evaluated on its ability to accurately detect pre-defined market trend shifts from streaming data, generate concise summaries, and respond to user queries effectively through its interface. Accuracy of trend identification and responsiveness are key.
Challenge datasets
Public datasets, plus the private datasets you have access to.
What you should walk away with
Master the Mastra AI TypeScript framework for building scalable, reactive AI agents with built-in memory and tool orchestration capabilities.
Integrate `Mistral Large 2` via the Hugging Face Inference API, understanding efficient model invocation and output parsing for real-time analysis.
Design and manage vector indexes in Pinecone for semantic search and historical trend comparison, optimizing for fast retrieval.
Develop custom tools within Mastra AI to interact with simulated external APIs for data fetching (e.g., social media DAUs, e-commerce orders).
Build a simple interactive frontend component (e.g., using React/Next.js) that communicates with your Mastra AI agent, mimicking a Bito AI interaction pattern.
Implement prompt engineering techniques for `Mistral Large 2` to accurately identify market shifts, sentiment changes, and generate concise reports.
Configure data pipelines to continuously feed new market data into the Mastra agent and Pinecone for real-time updates.
Reference links and supporting material
Sample data for 2 tasks
Challenge setup
The agent will be evaluated on its ability to accurately detect pre-defined market trend shifts from streaming data, generate concise summaries, and respond to user queries effectively through its interface. Accuracy...
Challenge input
JSON: {'timestamp': 'string', 'platform': 'string', 'daily_active_users': 'integer'}
Agent execution
No agent tool is listed for this challenge.
Evaluated output
JSON: {'timestamp': 'string', 'platform': 'string', 'trend_change': 'positive_shift|negative_shift|stable', 'magnitude': 'float', 'explanation': 's...
- Checks if the agent's output for TrendDetection matches the expected JSON format.
- Checks if the agent's response to a user query is not empty.
- TrendDetectionAccuracy target: 0.8
- JavaScript execution harness
Summary shows the first task, up to three tools, and up to three evidence items. Open the technical recipe to view all configured items.
View technical recipe
Configured tools
No tool records are attached.
Evaluation contract
- Checks if the agent's output for TrendDetection matches the expected JSON format.
- Checks if the agent's response to a user query is not empty.
Metrics
- TrendDetectionAccuracy · Target 0.8
- UserResponseRelevance · Target 0.9
Workflow tasks
- Task 1
Input: JSON: {'timestamp': 'string', 'platform': 'string', 'daily_active_users': 'integer'}
Output: JSON: {'timestamp': 'string', 'platform': 'string', 'trend_change': 'positive_shift|negative_shift|stable', 'magnitude': 'float', 'explanation': 'string'}
Execution harness: JavaScript
- Task 2
Input: String: 'What is the current trend for X's daily active users and why?'
Output: String: 'Summary of X's current DAU trend with explanation and source (if any).'
Execution harness: JavaScript
Recipe freeze marker
No recipe freeze time is recorded.