Explore results with Metabot
Quantify uses Metabot, Metabase's built-in AI agent, to help you explore stored backtest results, create charts, and generate or edit SQL. Open Quantify to work with your data in Metabase.
Use AI Researcher to run backtests and access Merlin or Q-API. Use Metabot inside Quantify for data exploration and reporting.
Bring your own AI provider key
To use Metabase's AI features, bring your own API key from OpenAI, Anthropic (Claude), OpenRouter, or another supported provider. AI usage is charged to your provider account.
Create an API key in your chosen provider's account and keep it secure. This is an AI provider key, separate from your MesoSim API key and the connection used by AI Researcher. Do not paste it into an AI conversation or include it in strategy files.
Ordinary Metabase queries and dashboards remain usable without an AI provider key.
Ask a question about your backtests
Open a saved question or chart and use the Metabot sidebar, or select New → AI exploration to start a data question. For example:
Using backtest_results, compare completed backtests for [strategy]
over the same test period. Show CAGR, maximum drawdown, Sharpe ratio,
and trade count. Include each backtest ID so I can inspect the runs.
Replace [strategy] with your strategy name. Identify the relevant table or saved question so the agent has the right context. Inspect the selected runs and date ranges before interpreting a comparison.
Metabot can find relevant saved questions, create charts, and help interpret charts. Save a useful question or chart to a collection or dashboard so you can return to it. See Using Metabot for the current interface and capabilities.
Generate or refine SQL
- Open the SQL editor and select the database you want to query.
- Open the Metabot sidebar and describe the query, naming the relevant tables.
- Inspect the generated SQL and run it when ready. SQL generated in the editor is not run automatically.
- Ask Metabot to explain or fix errors, then save the working question.
For example:
Write a SQL query against backtest_results showing the backtest ID,
strategy name, test period, trade count, CAGR, Sharpe ratio, and maximum
drawdown for [strategy]. Include completed runs with at least 50 trades
and order them by their test-period start date.
Choose the right data source
- BackDB: run-level metadata, strategy definitions, and performance metrics. Start here for comparisons across backtests.
- RunDirs: detailed data from individual runs, queried with DuckDB. Use the documented file paths and example queries as context for custom analysis.
For RunDir work, open an existing query or provide the relevant paths and schema from the reference. Do not assume that the agent can discover every run file from a general question.
When an observation suggests a new experiment, bring the backtest IDs and your question into AI Researcher.