very_simple_apex

Generates SQLite queries from natural language questions using schema exploration, curated SQL tips, and reward-model ranking.

2|1|Updated Jun 10, 2026
One-click install
npx skills add https://github.com/Tencent/AdaSkill --skill very-simple-apex-tencent
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: very_simple_apex
Source: https://github.com/Tencent/AdaSkill/tree/main/skills/adaptive_text2sql_bird
Command: npx skills add https://github.com/Tencent/AdaSkill --skill very-simple-apex-tencent

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Translating natural language questions into correct SQLite queries is error-prone: ambiguous column names, evidence hints that must be followed exactly, and subtle choices like DISTINCT vs COUNT(*) often break accuracy. This Skill gives an AI agent the tools and expert knowledge to explore a database, apply proven SQL-generation tips, and pick the best query among multiple candidates. ## Core Features & Use Cases - SQL Execution & Schema Probing: Run read-only queries against a SQLite database to inspect schema, verify row counts, and preview values, with automatic statistical summaries for large results. - Deterministic Tip Selection: Retrieve relevant expert SQL tips (evidence enforcement, string matching, aggregation, joins) selected by rule-based logic matched to the question and evidence. - Reward-Model Candidate Ranking: Generate several SQL candidates and score them with a trained reward model to pick the best one for in-distribution datasets like BIRD. - Use Case: Given a BIRD benchmark question such as "What is the highest free meal count for K-12 schools in Alameda County?", the agent probes the frpm table, pulls tips about exact column usage, drafts candidate queries, ranks them, and outputs a JSON object with selected tables, columns, and the final SQL. ## Quick Start Ask the agent to answer a natural language question over a SQLite database and return the final SQL as a JSON object with selected tables and columns.

Frequently Asked Questions about very_simple_apex

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate SQL from a natural language question with this skill?▼

Provide the question, evidence, and database path, then use execute_sql to probe the schema, select_tips to retrieve relevant SQL guidance, and the reward model to rank multiple candidate queries. The final answer is a JSON object with selected_tables, selected_columns, and the sql string.

What is the select_tips tool used for in Text-to-SQL?▼

select_tips applies rule-based logic over the question, evidence, logical plan, and schema to pick relevant expert tips from a structured library. It returns tip IDs and formatted text covering evidence enforcement, string matching, aggregation, joins, and common pitfalls.

How does the reward model rank SQL candidates?▼

The RewardModelClient sends each candidate SQL with schema, question, and evidence to a persistent reward server via SSH and kubectl exec, returning a probability score. Higher scores indicate better candidates, and only relative ordering within the same question matters.

Does execute_sql work on large query results?▼

Yes, execute_sql opens the SQLite database read-only and returns full rows when results have 30 rows or fewer. Larger results are automatically summarized into per-column statistics including min, max, distinct count, and sample values.

What environment setup does the reward model require?▼

The reward model requires environment variables for the jump host, port, user, password, and pod name, plus sshpass and kubectl access to a pod already running the reward server on a Unix socket. Without this setup, candidate scoring is unavailable but other tools still work.