Back to Prompt Library
testing
User Interaction & Report Generation
Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.
Linked challenge: Real-time Market Trend Agent
Format
Code-aware
Lines
20
Sections
4
Linked challenge
Real-time Market Trend Agent
Prompt source
Original prompt text with formatting preserved for inspection.
20 lines
4 sections
No variables
1 code block
Develop a simple interactive prompt (simulating a Bito AI chat interface) where a user can ask the `MarketMonitorAgent` about recent trends. The agent should:
1. Use `searchTrendsInPinecone` to retrieve relevant historical trends based on the user's query.
2. Synthesize information from `Mistral Large 2` and Pinecone to provide a coherent and informative response.
3. Focus on providing actionable insights or explanations, not just raw data. This will be evaluated by the `UserQueryResponse` task.
```typescript
// ... (previous MarketMonitorAgent setup)
async function handleUserQuery(query: string) {
console.log(`User query: ${query}`);
const response = await MarketMonitorAgent.run({
prompt: `Respond to the user's query about market trends: "${query}". Use the searchTrendsInPinecone tool to gather historical context and provide a comprehensive explanation.`,
context: {
userQuery: query
}
});
console.log('MarketMonitorAgent:', response.response); // Assuming response contains the LLM's final answer
}
// Simulate user interaction for evaluation
// handleUserQuery('What is the current trend for X daily active users?');
// handleUserQuery('Tell me about recent shifts in Threads engagement.');
```Adaptation plan
Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.
Keep stable
Preserve the rubric, target behavior, and pass-fail criteria as the baseline for evaluation.
Tune next
Adjust fixtures, mocks, and thresholds to the system under test instead of weakening the assertions.
Verify after
Make sure the prompt catches regressions instead of just mirroring the happy-path examples.