KX’s qSQL agent improves with voting—but “passed” still does not mean correct
The new self-hosted MCP pipeline catches syntax and execution failures, yet production teams still need an independent semantic check and licensed q infrastructure.
KX has released a self-hosted MCP qSQL Suggester for turning natural-language financial analytics requests into q/kdb+ queries. The package combines a 9-billion-parameter Qwen3.5 fine-tune, an MCP server and two Claude Code skills; KX says the model and server can run on a single 24GB GPU, while q/kdb+ and some validation components remain separately licensed dependencies. KX’s launch post and the repository describe the release.
The useful part is the gate, not just the model
The server does not trust one completion. It draws independent candidates in expanding rounds, rejects drafts that fail q parsing or optional KX qlint checks, executes survivors against generated tables across multiple seeds, and clusters candidates by equivalent results. It returns the shortest query from the largest cluster, according to the repository’s documented pipeline.
On the repository’s 1,078-task held-out set, greedy single-sample decoding passed 606 tasks, while the self-consistency pipeline passed 690. KX defines a pass as matching the task’s reference implementation on generated tables after parsing and execution; failures, timeouts and degenerate results count against the total. The company also says the task set was machine-generated from the training distribution, so it uses the result to measure the pipeline’s contribution rather than to rank the system against unrelated models.
That distinction matters. The server documentation explicitly warns that passed=true means the candidates ran and agreed—not that they interpreted the user’s intent correctly. Agreement can amplify the same semantic mistake across several samples.
Choose the verified route for consequential queries
KX ships a quick skill that presents the consensus draft and a fuller skill that executes the draft beside an independently derived reference query. In KX’s worked examples, the full path checks running VWAP and functional-select outputs against references, while the quick path stops after candidate agreement. The launch post still advises users to treat every result as a draft.
For a production rollout, teams should reserve quick mode for exploratory work and require the verified path when a wrong aggregation, time bucket or join could influence trading, risk or reporting. They should also pin the model revision: the model card says serving the Hugging Face main revision can silently pick up a later checkpoint after restart.
The privacy story also has a boundary. KX says the specialist model and MCP server can remain inside the organization, but a hosted coding assistant can still receive the request. Fully internal operation requires using the supplied direct query script or another internal client. The model weights are Apache-2.0, but the end-to-end checked path requires an organization-supplied q/kdb+ license; KX qlint is optional and separately licensed.
The practical takeaway is encouraging but narrow: KX has shipped an inspectable, self-hostable qSQL drafting stack with measurable gains from execution-based voting. Its own documentation also gives operators the right warning label—consistency is evidence, not semantic proof.
sources
comments · 0