How harshitakatariya-devx/ktx-bigquery-eval works
This repository is a proof-of-concept evaluation of ktx as a semantic context layer for a BigQuery warehouse, rather than the implementation of ktx itself. Its principal workflow configures a read-only scan, records warehouse evidence, and maintains generated semantic metadata alongside human-authored metric overlays and business notes. For questions, Claude Code uses ktx’s MCP tools to discover data and query BigQuery using the semantic YAML; benchmark and audit artifacts assess answer quality and metadata. Relationships are based on the README; unsampled runtime internals are not inferred.
Main entry points: dev_dna_silver.yaml Generated schema · runs Benchmark results · ktx.yaml ktx config · warehouse Metric overlays
Components 19
Warehouse scan
- ktx config
ktx.yaml - BigQuery warehouse
- ktx scan
- LLM descriptions
- Join detection
- Scan evidence
raw-sources/warehouse
Semantic assets
- Generated schema
semantic-layer/warehouse/_schema/dev_dna_silver.yaml - Metric overlays
semantic-layer/warehouse - Business notes
wiki/global
Question answering
- Claude Code
- Local search index
.ktx - ktx MCP server
- discover_data
- sl_query
Evaluation
- Benchmark questions
eval/questions.txt - Ground-truth SQL
eval/ground-truth - Benchmark results
eval/runs - Semantic-layer audit
eval/audit
Other components
- Analyst
Connections 18
- Analyst → Claude Code: asks question
README.md - ktx config → ktx scan: configures scan
README.md - BigQuery warehouse → ktx scan: provides schema
README.md - ktx scan → LLM descriptions: generates descriptions
README.md - ktx scan → Join detection: detects joins
README.md - ktx scan → Scan evidence: records evidence
README.md - ktx scan → Generated schema: writes schema
README.md - ktx scan → Business notes: writes notes
README.md - Metric overlays → Generated schema: overlays metrics
README.md - Claude Code → ktx MCP server: uses MCP
README.md - ktx MCP server → discover_data: exposes tool
README.md - ktx MCP server → sl_query: exposes tool
README.md - discover_data → Local search index: searches index
README.md - sl_query → Generated schema: writes SQL from
README.md - sl_query → BigQuery warehouse: queries
README.md - Benchmark questions → Benchmark results: evaluates answers
README.md - Ground-truth SQL → Benchmark results: scores against
README.md - Semantic-layer audit → Generated schema: audits metadata
README.md