7: Insights
The CMS dashboard can answer questions about your data in plain language. The CMS.dashboard.bi module turns a question like "articles about travel from last month" into a structured, parameterized query on your own models: type it, or say it out loud.
7.1: How it works
The module hands the AI exactly two things: your question and the schema of your models (names and columns). The AI answers with a JSON description of a search (model, filters, operators, sort); the module validates every column and operator against the schema, binds every value as a parameter and runs the query through the ORM. The AI never sees your data and never writes SQL: it picks from your schema, the module builds the query.
Answers are cached by question, and every search gets a shareable URL (/<list>/<token>), so an insight becomes a link you can bookmark or send around.
7.2: Setup
- List
CMS.dashboard.biinresources. - Select it as the dashboard type:
phlo_app(..., dashboard: 'bi'). - Configure an AI provider: the module talks to
%AI, the facade that picks the engine for the key you set indata/creds.ini(OpenAI, Claude, Gemini, Grok or DeepSeek). Which model reads your questions is entirely your choice.
7.3: Voice
The search field carries a microphone button: dictate the question and it lands in the same flow. Speech input uses the browser's built-in speech recognition (Chrome-based browsers).