Skip to main content
Version: 2.1

Choosing a Model

Reveal SDK AI works with any supported provider and the models each one offers. Your choice of model is the single biggest factor in the quality, speed, and cost of the AI features you expose to users. This page gives concrete recommendations — a flagship cloud model and a self-hosted local model — backed by Reveal's ongoing benchmarking.

What the model has to do

Reveal asks the model to handle two very different kinds of work, and a model that excels at one is not guaranteed to excel at the other:

  • Dashboard generation — the Chat endpoint turns a natural-language request ("show me sales by region for 2023") into a dashboard. This is the harder task: the model must emit strictly structured JSON that references real tables and fields, applies the correct chart types, and respects filters and rules. Small formatting mistakes cause the whole result to fail.
  • Data insights — the Insights endpoint analyzes the data behind a visualization to produce summaries, statistical analysis (correlation, trend, mean/standard deviation), and forecasts. The output format is simpler, but the reasoning is more open-ended.

Use GPT-4.1 (OpenAI). It is the most balanced performer across both workloads — reliably handling dashboard generation while staying fast — and it is already the SDK's default model, so no extra configuration is required to adopt it.

Program.cs
builder.Services.AddRevealAI()
.AddOpenAI(options =>
{
options.ApiKey = builder.Configuration["RevealAI:OpenAI:ApiKey"];
options.Model = "gpt-4.1";
});

See the OpenAI provider for full configuration options.

Strong alternatives

If you prefer a different provider, or want to compare quality and cost against your own workloads, these models also perform at or near flagship level:

  • Claude Sonnet 4.5 / Claude Opus (Anthropic) — match GPT-4.1 on quality, with Sonnet 4.5 offering a strong quality-to-cost balance. Expect somewhat higher latency on data insights.
  • Gemini 2.5 Pro / Gemini 3 Pro (Google Gemini) — capable across both workloads and a good fit if you are already on Google Cloud.
Reasoning models are not always better

For these structured tasks, dedicated "reasoning" models tend to be slower and less reliable than GPT-4.1, not more capable — they take much longer to answer and are more prone to timeouts, especially on data insights. Reach for a fast, non-reasoning flagship model first.

If you need to keep data on your own infrastructure or avoid per-token API costs, you can run a model locally and point the OpenAI provider at it through a custom endpoint.

Use Gemma 4 26B (gemma-4-26b-a4b-it). Among locally hosted models it delivers the best overall accuracy on both workloads, and it is small enough to run on a capable workstation (validated on a 64 GB Apple Silicon machine).

If you want faster responses and a smaller memory footprint, GPT-OSS 20B is a strong runner-up — noticeably quicker, though a step behind Gemma 4 26B on data insights.

Run either model with a server that exposes an OpenAI-compatible API — such as Ollama, LM Studio, or vLLM — and set the Endpoint and Model options:

Program.cs
builder.Services.AddRevealAI()
.AddOpenAI(options =>
{
options.ApiKey = "ollama"; // local servers ignore the key
options.Endpoint = "http://localhost:11434/v1";
options.Model = "gemma-4-26b-a4b-it";
});
Local models and dashboard generation

Local models are a good fit for data insights and for straightforward dashboard generation. For complex, multi-widget dashboards, the strongest cloud models are still meaningfully more reliable — validate against your own prompts before committing to a fully local setup. Avoid "thinking"/reasoning local models: they struggle to stay within the required JSON schema and are slow on modest hardware.

Benchmark summary

The recommendations above come from Reveal's ongoing benchmarking. Each model runs two 10-task suites built on the Northwind sample database — one for dashboard generation, one for data insights — with tasks of increasing difficulty graded by an independent LLM judge. The score is how many of the 10 tasks the model handled reliably (a correct result on the majority of attempts), out of 10. DNF means the suite did not complete — the model failed the early tasks and the run was stopped.

The full results for every model tested are below. Find your current model to see how it compares — if it scores poorly on the workload you care about, the models recommended above are drop-in replacements.

Cloud models

ModelProviderDashboard generationData insights
GPT-4.1 (recommended)OpenAI109
GPT-5.4OpenAI610
GPT-5.4 miniOpenAI69
GPT-5.4 nanoOpenAI66
GPT-5.3 CodexOpenAI79
GPT-5.2OpenAI89
GPT-5.1OpenAI88
GPT-5OpenAI66
Claude Opus 4.6Anthropic910
Claude Opus 4.5Anthropic88
Claude Opus 4.1Anthropic104
Claude Sonnet 4.6Anthropic610
Claude Sonnet 4.5Anthropic99
Gemini 3.1 ProGoogle89
Gemini 3 ProGoogle79
Gemini 3 FlashGoogle67
Gemini 3.1 Flash LiteGoogle47
Gemini 2.5 ProGoogle68
Gemini 2.5 FlashGoogle56
Mercury 2Inception Labs45

Newer and preview model versions were sometimes captured under early-access conditions and their scores may not reflect current generally-available behavior. Latency varies widely too: reasoning-oriented models (several of the GPT-5.x variants, and Claude Opus/Sonnet when thinking is engaged) answer much more slowly — especially on data insights — without a matching gain in reliability.

Open-weight models

These models can be self-hosted or accessed through a hosted-inference provider, using the custom endpoint configuration.

ModelDashboard generationData insightsNotes
Gemma 4 26B (recommended)78Best open-weight accuracy overall
GPT-OSS 20B66Fastest; light memory footprint
GPT-OSS 120B58Larger; strong on data insights
Kimi K2 Instruct19Excellent insights, weak generation
Qwen3 32B62Decent generation, weak insights
Llama 4 Maverick 17B36
Llama 3.3 70B16
Gemma 3 12B24Smallest; limited on harder tasks
Qwen3.5 35B-A3B3DNFInsights suite did not complete
Nemotron 3 Nano 30B03Reasoning model; poor schema adherence
Gemma 3 27BDNFGeneration suite did not complete
Llama 3 70BDNFGeneration suite did not complete

Open-weight scores depend heavily on quantization, host, and sampling settings — treat them as indicative of a well-configured run rather than fixed numbers. The results above use 4-bit to 8-bit quantizations on workstation-class hardware or a hosted-inference provider.

A moving target

Model quality shifts every time a provider ships a new version, so treat these figures as a snapshot rather than a permanent ranking. The best way to choose is to test the top candidates against your own data and prompts before you commit.