Analytics stack: asking your database in plain words

Reports always lag behind questions. While an analyst builds an extract the question has already moved on, and simple things like a weekly breakdown sit in a queue. This chain closes exactly that gap: a question in plain language becomes a database query, the result is explained in words, and a separate part checks that the answer actually follows from the data. That last part is what separates a working tool from a nice demo.

Updated 22 Sep 2026Find a model in 4 questions

Step 1. Tell the model what is in the database

Before a question becomes a query, the system has to find the right tables and fields among hundreds. Meaning-based search does that: table descriptions and a business glossary become fingerprints, and each question gets the matching slice of the schema. Without this step the model either receives the whole schema, which is expensive and confusing, or a random slice and answers from the wrong tables.

What does the work

Search and RAGRUOllamaNot maintained2024

BGE-M3

BAAI · China

A model for meaning-based search in about a hundred languages. The core of RAG: the bot finds the right part of a document before answering.

  • Search across a document base
  • RAG for a chatbot
  • Finding similar requests and duplicates
Sizes
568M
Hardware
from: Laptop
Commercial use allowedDetails
Search and RAGRU2023–2025

GTE

Alibaba · China

Alibaba embeddings and rerankers for search: from tiny to 7B based on Qwen2. There is a multilingual mGTE version with long context.

  • Semantic search across documents
  • Reranking search results
  • Clustering and classifying texts
Sizes
33M – 7B
Hardware
from: Laptop
Commercial use allowedDetails

Step 2. Turn the question into a query

A specialised model writes a valid database query from the wording of the question and the schema description. Narrow models built for this are usually more accurate and cheaper than general ones, because queries are exactly what they were trained on. Access must be read-only and role-based: the chain should be physically unable to change anything. Without this part everything queues behind an analyst.

What does the work

Text to SQLOllamaNot maintained2023–2024

SQLCoder

Defog · USA

One of the first open models that turn a plain-language question into an SQL query against a database. Available in Ollama, but newer competitors are already stronger.

  • Answering managers' questions from the sales database without an analyst
  • Drafting SQL queries for reports
  • An assistant inside a BI system
Sizes
7B – 70B
Hardware
from: Laptop
Commercial use with conditionsDetails
Text to SQL2025

XiYanSQL-QwenCoder

Alibaba · China

Alibaba models for turning questions into SQL, based on Qwen2.5-Coder. They work with different SQL dialects; a small 3B version suits modest hardware.

  • Plain-language database questions
  • Queries for different databases (PostgreSQL, MySQL, SQLite)
  • Automating routine reports
Sizes
3B – 32B
Hardware
from: Laptop
Commercial use allowedDetails
Text to SQL2025

OmniSQL

Renmin University of China (RUC) · China

Models for turning questions into SQL, trained on millions of synthetic query examples across different databases. Three sizes for different hardware.

  • Database questions without knowing SQL
  • Generating queries for reports
  • A base for fine-tuning on your own database schema
Sizes
7B – 32B
Hardware
from: Laptop
Commercial use allowedDetails

Step 3. Explain the result in words

A language model takes the returned table and turns it into a readable answer: what grew, how it compares with the previous period, what the data does not cover. It also asks back when a question has more than one reading, for example whether revenue should include tax. Without this part a manager gets a table and still walks over to an analyst for a summary.

What does the work

TextRUOllama2023–2026

Qwen

Alibaba · China

A family of language models with strong Russian language support, from small versions for a laptop to a flagship on par with commercial APIs.

  • Chatbot and knowledge-base assistant
  • Replies to emails and customer requests
  • Document parsing and classification
Sizes
0,6B – 2,4T-A95B
Hardware
from: Laptop
Commercial use with conditionsDetails
TextOllama2023–2026

DeepSeek

DeepSeek · China

DeepSeek's flagship line: from the first 7B/67B to V4-Pro with 1.6 trillion parameters. Closed-model quality under an open MIT license; V4-Flash-Vision-Exp and V4.1-Flash understand images, context up to 1M tokens.

  • Employee assistant on your own server
  • Analysis of long contracts and reports
  • Agents that work with tools and APIs
Sizes
7B – 1.6T-A49B
Hardware
from: Laptop
Commercial use allowedDetails
TextOllama2025

gpt-oss

OpenAI · USA

OpenAI's first open models since GPT-2. Reasoning and tool calling; the smaller version fits on a single GPU.

  • AI agent that calls internal systems
  • Answers based on internal policies
  • Drafts of emails and reports
Sizes
20B, 120B
Hardware
from: 1 GPU
Commercial use allowedDetails

Step 4. Check the answer before showing it

A separate checking model compares the written answer against what the database actually returned and flags claims the data does not support. That is cheaper than working out afterwards why a wrong number was quoted in a meeting. Without it, mistakes are visible only to someone who knows the data by heart, and that person is usually not the one reading this report.

What does the work

Fact-checking and judgesNot maintained2023–2024

Prometheus 2

KAIST and LG AI Research (prometheus-eval) · South Korea

An open judge model: it scores other models' answers against your criteria and explains the score. A replacement for paid models in the reviewer role.

  • Scoring chatbot answers on your own scale
  • Comparing two answer options
  • Quality checks before launching an AI service
Sizes
7B – 8x7B
Hardware
from: Laptop
Commercial use allowedDetails
Fact-checking and judgesOllamaNot maintained2024

MiniCheck

UT Austin and Bespoke Labs · USA

Checks whether each claim in an AI answer is supported by the source documents. The small versions are free; the larger 7B is in Ollama but non-commercial.

  • Checking RAG bot answers against documents
  • Finding unsupported claims in reports and summaries
  • Automated quality control of AI answers
Sizes
0.4B – 7B
Hardware
from: Laptop
Commercial use with conditionsDetails
Fact-checking and judgesNot maintained2023–2024

HHEM (Vectara)

Vectara · USA

A small model that checks whether an AI answer is grounded in the source text or made up. Runs on a CPU and works well as a filter in RAG systems.

  • Checking knowledge base chatbot answers for fabrications
  • Quality control of document summaries
  • Comparing language models by their tendency to make errors
Sizes
110M
Hardware
from: Laptop
Commercial use allowedDetails

What to check before you start

The chain works only as well as your database is understandable. If fields are named in abbreviations and the same metric is computed three different ways, the model inherits that confusion. Start with one data mart and a dozen agreed metrics with written definitions rather than the whole warehouse. Read-only access, role separation and a query log are mandatory, otherwise a convenient tool becomes a leak.

Other stacks

Need a model for your task?

An open model can run on your own server: data stays in-house, there is no per-request fee, and the model can be fine-tuned on your documents.

  1. SelectThe model and size for your task and hardware budget
  2. DeployOn your server or in a closed network, with an API
  3. Fine-tuneOn your data, or connect a knowledge base
  4. IntegrateInto your CRM, ERP, bot, website or team chat
Discuss deployment