ablate 0 0 0

mayank-dubey-ai/enterprise-100-db-steering

published by @mayank-dubey-ai

Alignment dataset tracked in the /datasets sub-catalog.

Lifetime downloads
930
Last 30 days
322
Likes
1
Size
2.2 MB
Created on HF
2026-08-23
Age
1 months ago

Description

Enterprise-100: Multi-Table Database Activation Steering & Benchmark

This repository contains a 100-table synthetic enterprise relational SQLite database, multi-table join benchmarks (2 to 6 table joins), activation steering vectors for Qwen3-8B, and automated evaluation scripts with Gemini 2.5 Flash as an LLM judge.

πŸ›οΈ 1. The 100-Table Enterprise Database Schema (enterprise_100.db)

Contains 100 interrelated tables across 10 core business domains:

Core Users… See the full description on the dataset page: https://huggingface.co/datasets/mayank-dubey-ai/enterprise-100-db-steering.

Tags

task_categories:table-question-answeringtask_categories:text-generationlicense:mitsize_categories:n<1Kmodality:textregion:usactivation-steeringtext-to-sqlrepresentation-engineeringsqliteqwen3

README current version from Hugging Face


license: mit
task_categories:

  • table-question-answering
  • text-generation
    tags:
  • activation-steering
  • text-to-sql
  • representation-engineering
  • sqlite
  • qwen3
    size_categories:
  • n<1K

Enterprise-100: Multi-Table Database Activation Steering & Benchmark

This repository contains a 100-table synthetic enterprise relational SQLite database, multi-table join benchmarks (2 to 6 table joins), activation steering vectors for Qwen3-8B, and automated evaluation scripts with Gemini 2.5 Flash as an LLM judge.


πŸ›οΈ 1. The 100-Table Enterprise Database Schema (enterprise_100.db)

Contains 100 interrelated tables across 10 core business domains:

  1. Core Users (10 tables): users, user_profiles, user_settings, auth_tokens, roles, permissions, role_permissions, user_roles, login_history, user_devices
  2. Organizations (10 tables): organizations, org_members, org_invites, departments, teams, team_members, org_tiers, org_settings, api_keys, oauth_apps
  3. Catalog & Inventory (10 tables): categories, subcategories, products, product_variants, product_attributes, attribute_values, inventory_locations, warehouse_stocks, stock_transfers, stock_adjustments
  4. Pricing & Promotions (10 tables): currency_rates, price_lists, price_tiers, discount_coupons, coupon_usages, flash_sales, bundle_deals, loyalty_programs, loyalty_tiers, customer_points
  5. Orders & Fulfillment (10 tables): order_statuses, delivery_addresses, orders, order_items, order_notes, fulfillments, fulfillment_items, shipments, carrier_tracking, returns
  6. Payments & Billing (10 tables): billing_accounts, payment_methods, invoices, invoice_line_items, payment_transactions, refunds, subscription_plans, customer_subscriptions, payouts, tax_rates
  7. CRM & Support (10 tables): pipeline_stages, contacts, leads, sales_opportunities, crm_activities, tickets, ticket_messages, ticket_tags, customer_feedback, agent_ratings
  8. Marketing & Engagement (10 tables): campaigns, campaign_audiences, email_templates, sent_emails, click_events, web_sessions, session_pageviews, ad_campaigns, conversion_events, push_notifications
  9. Procurement (10 tables): suppliers, supplier_contacts, supplier_contracts, raw_materials, purchase_orders, po_items, po_receipts, vendor_ratings, procurement_approvals, reorder_rules
  10. Audit & Telemetry (10 tables): audit_logs, system_events, security_incidents, metric_snapshots, api_usage_logs, background_jobs, error_traces, feature_flags, flag_evaluations, data_retention_policies

⚑ 2. Activation Steering Dynamics (Layer 16 on Qwen3-8B)

Using representation engineering, we extract steering vectors from contrast pairs:
$$\mathbf{v}{\text{steer}} = \frac{1}{N} \sum{i=1}^N \left( \mathbf{h}{\text{python}}^{(i)} - \mathbf{h}{\text{sql}}^{(i)} \right)$$

During autoregressive generation, a PyTorch forward hook intervenes on the residual stream at Layer 16:
$$\mathbf{h}' = \mathbf{h} + \alpha \cdot \mathbf{v}_{\text{steer}}$$

  • $\alpha < 0$ (Negative Steering): Direct ANSI SQL multi-table join queries.
  • $\alpha = 0$ (Baseline): Standard unsteered model response.
  • $\alpha > 0$ (Positive Steering): Python sqlite3 + pandas data pipeline.

πŸ“Š 3. 10-Query Benchmark & Gemini Judge Results

Evaluated across 10 queries spanning from 2-table joins to 6-table joins:

Query ID Complexity Tables SQL Execution SQL Rows Python Execution Python Rows
q01 Simple 2 βœ… Success 50 βœ… Success 50
q02 Simple 2 βœ… Success 5 βœ… Success 5
q03 Medium 3 βœ… Success 50 βœ… Success 150
q04 Medium 3 βœ… Success 10 βœ… Success 0
q05 Medium 4 βœ… Success 15 βœ… Success 15
q06 Complex 4 βœ… Success 0 βœ… Success 0
q07 Complex 5 βœ… Success 250 βœ… Success 54
q08 Complex 5 βœ… Success 0 βœ… Success 0
q09 Complex 5 βœ… Success 100 ❌ Error 0
q10 Very Complex 6 βœ… Success 0 ❌ Error 0

Key Findings:

  1. SQL Success Rate: 100% execution success across all 10 queries.
  2. Neutral JSON Schema Impact: Replaced SQL DDL (CREATE TABLE) with JSON schema metadata ({"columns": [...], "foreign_keys": {...}}), eliminating linguistic bias and allowing seamless generation of both Python scripts and SQL queries.

πŸš€ 4. How to Run & Reproduce

# 1. Clone repository from Hugging Face
git clone https://huggingface.co/datasets/mayank-dubey-ai/enterprise-100-db-steering
cd enterprise-100-db-steering

# 2. Run full 1-click reproduction suite (DB generation -> vector extraction -> benchmark execution)
bash reproduce.sh

# 3. Or run fast benchmark evaluation directly
python3 fast_benchmark_eval.py

# 4. Or test interactive query steering
python3 steer_db.py --query "Fetch customer orders with user email and product name." --mode all

Published artifacts

The vector repository separates reusable model artifacts from this dataset and
reproduction code. The free static Space exposes layer diagnostics, all saved
benchmark generations, execution outcomes, and the downloadable SQLite fixture.

Optional live H100 API

api/server.py exposes the real activation intervention as an authenticated,
generation-only FastAPI service. It never executes generated SQL or Python.

pip install -r api/requirements.txt
export STEERING_API_KEY="$(openssl rand -hex 32)"
export STEERING_CORS_ORIGINS="https://mayank-dubey-ai-enterprise-100-db-steering-lab.static.hf.space"
bash api/run.sh

Endpoints:

  • GET /health
  • POST /v1/generate β€” one layer/alpha configuration
  • POST /v1/compare β€” negative, neutral, and positive steering

Example:

curl -H "Authorization: Bearer $STEERING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"List orders with user email","strength":0.75,"layer":16}' \
  http://127.0.0.1:8000/v1/compare

The current public quick-tunnel URL is temporary and has no uptime guarantee.
For durable deployment, use a named Cloudflare Tunnel or a managed inference
service and retain bearer authentication, concurrency limits, and request caps.

README history 11 revisions

Every night we snapshot the README of every dataset in the catalog. When the SHA changes we archive the new version and diff it against the last. This is the evolving thought record of the alignment-data field: what the author decided to say about the corpus, and how that framing shifted over time.

  1. 2026-08-24Add repetition-safe calibrated decoding749ed526.7 KB
    Loading...
  2. 2026-08-24Document calibrated API steering strength957d4af6.7 KB
    Loading...
  3. 2026-08-24Fix dataset task metadata6afcb8c6.7 KB
    Loading...
  4. 2026-08-24Document model artifacts, Space, and authenticated H100 steering API38175376.7 KB
    Loading...
  5. 2026-08-23Make benchmark fully reproducible with reproduce.sh, requirements.txt, and po...16e7d315.1 KB
    Loading...
  6. 2026-08-23Add DOCX, RTF, HTML for Substack and X publishingb4c23594.9 KB
    Loading...
  7. 2026-08-23Update final Substack and X thread markdown with public asset URLs33c806a4.9 KB
    Loading...
  8. 2026-08-23Add publication images and social cards6c936574.9 KB
    Loading...
  9. 2026-08-23Add Substack article, X thread, and fast benchmark results38cbe8c4.9 KB
    Loading...
  10. 2026-08-23Initial commit: 100-table SQLite DB, steering scripts, vectors, and eval benc...23075884.9 KB
    Loading...
  11. 2026-08-23initial commita3a91f70 B
    Loading...

Used by abliterated models none yet

No abliterated models in our catalog have declared this dataset in their YAML metadata yet. This can mean the dataset is used but not declared, is used outside abliteration workflows, or is new. The link will populate automatically as models are indexed.

Related datasets same stage Β· ablate

Read further

Metadata

License
mit

Repository

Download the dataset

0

Copy any of these snippets into your notebook or terminal. All three fetch directly from Hugging Face using your own credentials.

Recommended: datasets library (Python)
from datasets import load_dataset
ds = load_dataset("mayank-dubey-ai/enterprise-100-db-steering")
Raw snapshot (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="mayank-dubey-ai/enterprise-100-db-steering", repo_type="dataset")
git clone (requires git-lfs)
git clone https://huggingface.co/datasets/mayank-dubey-ai/enterprise-100-db-steering
Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every model page has an "Open in Abliteration" button that hands the model directly to the first-party desktop client, at the quantization your rig can actually run. No API keys, no subscription, no prompt leakage.

Open in Abliteration