build-kb

Build vector-indexed knowledge bases from project files, database metadata, and validated SQL corpora.

1.5k|222|Updated Jul 4, 2025
One-click install
npx skills add https://github.com/Datus-ai/Datus-agent --skill build-kb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: build-kb
Source: https://github.com/Datus-ai/Datus-agent/tree/main/datus/resources/skills/build-kb
Command: npx skills add https://github.com/Datus-ai/Datus-agent --skill build-kb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the manual, error-prone work of building and maintaining searchable, domain-aware knowledge bases for data projects, which is critical for ensuring LLM-generated SQL is accurate and aligned with business context.

Core Features & Use Cases

  • Scoped or full-project generation: Build knowledge bases for entire projects or narrow them to specific files, tables, datasources, or business domains.
  • Parallel domain exploration: Delegate read-only exploration of tables and documentation to subagents per business domain, classifying content into the correct storage types.
  • Validated SQL corpus indexing: Enumerate every (natural language question, SQL) pair for reference with no curation required, and dual-route schema-non-inferable rules to knowledge stores for improved retrieval.
  • Use Case: A data engineering team can use this Skill to generate a knowledge base for their e-commerce domain, including semantic models for orders and products tables, metrics for GMV and conversion rate, and all validated sales queries, so analysts can ask natural language questions and get accurate SQL instantly.

Quick Start

Use the build-kb skill to generate a vector knowledge base for the sales domain, including semantic models for orders tables, metrics for monthly revenue, and all validated sales queries from the queries/ directory.

Frequently Asked Questions about build-kb

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

FAQPage Schema
How do I build a vector knowledge base for data engineering projects?

To build a vector knowledge base, this Skill indexes project files, database metadata, and validated SQL corpora. It dual-routes content into semantic models, metrics, reference SQL, and knowledge stores to provide domain-aware context for retrieval-augmented generation.

What is the best way to improve LLM-generated SQL accuracy with domain context?

Improving LLM-generated SQL accuracy requires indexing schema metadata, business metrics, and reusable query examples. This Skill builds an evolvable, domain-aware context that supplies these specific elements to retrieval-augmented generation workflows.

Can I generate knowledge bases scoped to specific business domains or tables?

Yes, you can scope knowledge generation to specific files, tables, datasources, or business domains. The Skill delegates parallel exploration to subagents per domain, classifying content into the correct storage types for focused retrieval.

How do I index validated SQL query corpora for natural language retrieval?

Indexing validated SQL query corpora is handled by enumerating every natural language question and SQL pair. Schema-non-inferable rules are dual-routed to knowledge stores, requiring no manual curation, enabling analysts to retrieve accurate queries instantly.

Does this knowledge base creation process require manual data curation?

No manual curation is required for validated SQL corpora. The Skill automatically enumerates query pairs and applies business domain classification to schema metadata and documentation, building an evolvable context without ongoing manual maintenance.

When should I use a vector-indexed knowledge store for data workflows?

Use a vector-indexed knowledge store when LLM-generated SQL needs accurate, domain-aware context. It is essential for data engineering workflows where schema metadata, business metrics, and reusable query examples must be retrieved for retrieval-augmented generation.