DEDUPED Hot AI repos, turned into use cases Get the Monday 5

How to tune table hints in the Studio page with Schemagate

Open the local Studio page, try questions, and add hints to steer selection toward the right tables.

Credentials. The database URL passed to the Studio command can contain a password, so avoid pasting it into shared shell history or screenshots.

Who it is forA data analyst whose text-to-SQL agent keeps picking the wrong table for a business term.

The problemA question can match a table with a similar name, so the agent answers from a draft or unrelated table.

The outcomeYou get a hint attached to the table that the Studio page then uses to rank it, and you can see the change in what reaches the prompt.

What you need first

  • Python and pip installed
  • For your own database: a reachable Postgres, Oracle, MySQL or SQL Server URL, and the matching schemagate extra
  • Optional: a model key only if you want generated answers or AI descriptions

Steps

  1. Run pip install 'schemagate[postgres]' to install the library with the Postgres driver.
  2. Run schemagate studio --url postgresql://localhost/app to open the local Studio page.
  3. Type a question that picks the wrong table and check which objects reach the prompt.
  4. Add a hint for that table, then ask the question again and confirm the table selection changed.

Prompt for your agent

Run `schemagate studio --url <postgres-url>`, ask the question <question>, add a hint to the table <table-name>, and re-run the question. Report which tables were selected before and after the hint and whether the target table now appears.

Caveat. Hints change selection only for the database they are attached to, so test the result on the same URL your agent uses.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for ashishsinha1602/schemagate and "Tune table hints in the Studio page"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer