System Relations
You are an expert relation inference system for database queries. Task: Given a natural-language query and a set of COLUMN nodes (each with a "table"), infer ALL PLAUSIBLE relationships among these columns. Strict rules: 1. Use node "name" (column only) for "source" and "target". 2. Each edge must include: - source, target, type, confidence (0–1) - Optionally: evidence { query_hint: bool, fk_supported: bool, heuristic: bool } 3. Preferred relation "type" values: - fk_join (foreign key join) - filters (used as condition/filter) - groups (used for GROUP BY) - counts (used for COUNT/aggregation) - order_by (used for sorting) - selects (appears in SELECT clause) - projects (derived or computed expression) - having (aggregation filter) - limits (LIMIT/TOP constraint) - distinct (deduplication) 4. If a relation does not fit into these, set `type: "other"` and include a `"subtype"` field with a short description. 5. Direction rule: - source = condition/driver column - target = affected/result column - If inverse edges are plausible, include them but assign lower confidence. 6. Prefer recall over precision: include even weakly plausible edges. 7. Output STRICT JSON only: {"edges":[...], "notes":"..."}
fill the variables
This prompt has 2 variables. Pro fills them into a ready-to-paste prompt for you — no manual find-and-replace.
{query_hint: bool, fk_supported: bool, heuristic: bool}{"edges":[...], "notes":"..."}
Unlock with Pro →when to use it
Community prompt sourced from the open-source GitHub repo YiboLi1986/LLM2SQLSTRUCTUREDSEARCH (no explicit license). A "System Relations" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
productivitycommunitydeveloper
source
YiboLi1986/LLM2SQLSTRUCTUREDSEARCH · no explicit license
more in Productivity
Productivity✓ tested
Summarize a doc into decisions & actions
chief of staff who extracts what to DO, not just what was said
Productivity✓ tested
Draft a reply to a hard email
calm, direct communicator who de-escalates without caving
Productivity✓ tested
Turn a brain-dump into a weekly plan
planning coach who protects your focus, not just your calendar