{
 "schema_version": 1,
 "generated": "2026-10-24",
 "id": "ashishsinha1602-schemagate--tune-table-hints-in-the-studio-page",
 "repo": "ashishsinha1602/schemagate",
 "repo_url": "https://github.com/ashishsinha1602/schemagate",
 "repo_slug": "ashishsinha1602-schemagate",
 "title": "Tune table hints in the Studio page",
 "page_title": "How to tune table hints in the Studio page with Schemagate",
 "summary": "Open the local Studio page, try questions, and add hints to steer selection toward the right tables.",
 "who": "A data analyst whose text-to-SQL agent keeps picking the wrong table for a business term.",
 "problem": "A question can match a table with a similar name, so the agent answers from a draft or unrelated table.",
 "outcome": "You 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.",
 "steps": [
  "Run `pip install 'schemagate[postgres]'` to install the library with the Postgres driver.",
  "Run `schemagate studio --url postgresql://localhost/app` to open the local Studio page.",
  "Type a question that picks the wrong table and check which objects reach the prompt.",
  "Add a hint for that table, then ask the question again and confirm the table selection changed."
 ],
 "agent_prompt": "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.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "Hints change selection only for the database they are attached to, so test the result on the same URL your agent uses.",
 "category": "Data and analytics",
 "tags": [
  "Data and analytics"
 ],
 "lang": "python",
 "requirements": [
  "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"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "The database URL passed to the Studio command can contain a password, so avoid pasting it into shared shell history or screenshots."
  }
 ],
 "best": false,
 "score": 0.6,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/ashishsinha1602-schemagate/tune-table-hints-in-the-studio-page/",
 "md": "https://dedupedai.com/use-cases/ashishsinha1602-schemagate/tune-table-hints-in-the-studio-page/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/ashishsinha1602-schemagate--tune-table-hints-in-the-studio-page.json",
 "api_version": "v1"
}
