How Doram answers
What happens between asking a question and seeing the answer.
Doram answers in four steps. Only the first and the last use an LLM. The steps in between are code, so the LLM never picks a definition and never writes SQL.
Understand
The AI analyst's LLM reads your question and splits it into parts: the metric, the splits, the filters, the time range, and whether you want to look something up, compare, see a trend or explain a change. It keeps your words. It doesn't choose tables.
Resolve
The retriever matches each part to approved facts in the second brain. It only looks at facts you're allowed to see, and it resolves all parts together, so the metric, splits and filters are sure to fit.
When a word means different things to different teams, your team's meaning comes first. When two meanings are too close to call, Doram asks you to choose.
The result is a context pack: the definitions, the join path, the rules and access policies that apply, and any events or decisions from the same time period, each with its evidence.
Compile
The semantic compiler turns the context pack into one SQL query. It checks joins, grain and filters, applies your access rules before anything is added up, and gets a cost estimate from your warehouse before the query runs.
Execute
The query runs in your own warehouse through a read-only account. The analyst's LLM reads the results and explains them, with the definitions and SQL behind every number.
Same question, same answer
Every read uses one version of the second brain. The same question, from the same person, on the same version, gets the same facts and the same SQL. Any past answer can be replayed on the version that produced it.
When Doram refuses
Doram refuses instead of guessing when:
- a term still has more than one valid meaning,
- the question needs a fact that isn't approved,
- an approved metric no longer works after a source changed, or
- the answer would need data you're not allowed to see.
The refusal says what's missing, so the owner can settle it once.