Problem
Wix's data model has hundreds of tables and thousands of dimensions across several domains. Business users ask questions in plain language, and the assistant must find which dimensions and metrics answer them. The first version used RAG: embeddings and semantic search over the metadata. It returned similar-sounding but business-irrelevant dimensions, was misled by uneven metadata quality and domain jargon, and could not capture relations between tables and dimensions.
Example from the article: the largest Wix data model, with thousands of dimensions, was queried with business questions from an evaluation set, and the right dimensions had to be picked.
Solution in brief
Skip retrieval. Put the whole data model metadata (schemas, descriptions, tags) into one long-context prompt and ask the LLM to choose the top k dimensions or metrics, with reasoning. A downstream agent checks the choice. Dimension selection success rose from about 83% (RAG) to about 95%, at higher cost and latency.
Questions this case answers
- How to select the right data assets for a free-text question when the catalog has thousands of entities and embedding retrieval returns plausible but wrong ones
- How to swap the retrieval stage of a multi-agent pipeline for a long-context model while keeping a check against hallucinated selections
- How to pick the right dimensions and metrics from a data model with thousands of fields for a natural-language business question?
- How to stop embedding search from surfacing similar-sounding but business-irrelevant dimensions?
Tools and methods
- Model Assisted Generation (MAG) — the authors' name for letting a long-context LLM do the selection itself; not a standard ML term.
- Gemini 2.5 Pro — the model that received the full data model in the test.
- Assets Selection Agent — builds the prompt from metadata and asks for the top k assets.
- DPG Agent — structures the question, picks the best match among the top results and acts as a critic.
Google or a one-time email code. No password.