[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-google-cloud-context-generation-guide":3,"mdc-nnabvl-key":35,"related-repo-google-cloud-context-generation-guide":1565,"related-org-google-cloud-context-generation-guide":1657},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":24,"repoUrl":25,"updatedAt":26,"license":27,"forks":28,"topics":29,"repo":30,"sourceUrl":33,"mdContent":34},"context-generation-guide","generate context items for database enrichment","Guidelines and best practices for generating context items (Templates, Facets, Value Searches). Use this skill whenever the user asks to create, author, or generate context for database enrichment, or asks for examples and instructions on how to write templates, facets, or value searches. It helps bridge the gap between LLMs and structured databases. For running the automated generation, evaluation, and tuning lifecycle, see the context-engineering-workflow skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"google-cloud","Google Cloud","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fgoogle-cloud.png","GoogleCloudPlatform",[13,17,20,23],{"name":14,"slug":15,"type":16},"Agent Context","agent-context","tag",{"name":18,"slug":19,"type":16},"Documentation","documentation",{"name":21,"slug":22,"type":16},"Database","database",{"name":9,"slug":8,"type":16},34,"https:\u002F\u002Fgithub.com\u002FGoogleCloudPlatform\u002Fdb-context-enrichment","2026-07-18T05:13:43.403052",null,11,[],{"repoUrl":25,"stars":24,"forks":28,"topics":31,"description":32},[],"A context engineering agent designed to generate, manage, and optimize structured context sets from your database schemas. It bridges the gap between Large Language Models (LLMs) and databases by compiling, evaluating, and maintaining the precise operational context needed for highly accurate natural language-to-SQL query generation.","https:\u002F\u002Fgithub.com\u002FGoogleCloudPlatform\u002Fdb-context-enrichment\u002Ftree\u002FHEAD\u002Fplugin\u002Fskills\u002Fcontext-generation-guide","---\nname: context-generation-guide\ndescription: Guidelines and best practices for generating context items (Templates, Facets, Value Searches). Use this skill whenever the user asks to create, author, or generate context for database enrichment, or asks for examples and instructions on how to write templates, facets, or value searches. It helps bridge the gap between LLMs and structured databases. For running the automated generation, evaluation, and tuning lifecycle, see the context-engineering-workflow skill.\n---\n\n# Context Generation Guide Skill\n\n\nThis skill provides the agent with the necessary information, concepts, and best practices to generate high-quality context items for the \"Context Engineering Agent\". This context bridges the gap between LLMs and structured databases, enabling accurate Natural Language to SQL generation.\n\n## Overview\n\nContext generation allows you to create specific, high-value items in three forms:\n\n1.  **Templates**: End-to-end mappings linking a natural language query to a complete, runnable SQL query. They teach the system overarching operational logic, table join infrastructures, and broad business rules.\n2.  **Facets**: Reusable, modular SQL fragments (like a `WHERE` clause or specialized join). They are dynamically injected filters linked to specific vocabulary or terminology.\n3.  **Value Searches**: Specialized queries used when a value in the natural language query does not perfectly match the stored value in the database. They employ mapping functions to find candidate values.\n\n## Workflow\n\nWhen asked to generate context items:\n1.  **Identify the Type**: Determine if the user wants to create a Template, Facet, or Value Search.\n2.  **Gather Information**: Ensure you have all the required information for the chosen context type as described in the \"Context Type Definitions\" section below. If information is missing, try to explore the database to find it or ask the user for clarification.\n3.  **Select Dialect Reference**: Identify the target database dialect (PostgreSQL, GoogleSQL, or MySQL) and consult the corresponding file in `references\u002F` for specific syntax and patterns.\n4.  **Parameterize**: Follow the [Phrase Extraction and Parameterization Guidelines](references\u002Fphrase_extraction\u002Fguidelines.md) to generalize the values.\n5.  **Format Output**: Construct the final JSON object according to the examples in the reference files.\n6.  **Save Context**: Use the appropriate MCP tool (e.g., `mutate_context_set`) to save or update the context set.\n\nNote: Use the `mutate_context_set` tool for all ContextSet changes. It supports granular additions, updates, and deletions of ContextSet items without replacing the whole file. Pass mutation payloads directly — the tool handles all file I\u002FO internally, so the agent should not read the target file beforehand.\n\n## Context Type Definitions & Rationale\n\nA `ContextSet` is the central artifact managed by the Context Engineering Agent, containing structured knowledge to help the Gemini Data Analytics API understand your database and business logic. \n\nThe following are the currently supported context types:\n\n---\n\n## 1. Blueprints for Predictable SQL Generation: Templates & Facets\n\n**Templates** and **Facets** act as structural **blueprints** that use the pattern of ML tool selection and tool calling to constrain SQL generation. By providing the model with these pre-defined patterns, you ensure that generated queries are highly predictable, structurally sound, and adhere to established database join structures.\n\n### Templates\n* **Purpose**: A blueprint for a complete query lifecycle. It maps a representative natural language query to an executable SQL statement and a declarative intent, teaching the model the overarching operational logic and join paths for a common query pattern.\n* **Parameterization**: Templates are generalized by replacing literal values in both the intent and SQL with placeholders (e.g., `$1`, `$2`) to match query variations.\n* **Schema Layout**:\n```json\n{\n  \"templates\": [\n    {\n      \"nl_query\": \"How many accounts are in London?\",\n      \"sql\": \"SELECT count(*) FROM account WHERE account.city = 'London'\",\n      \"intent\": \"How many accounts are in London?\",\n      \"manifest\": \"How many accounts are in a given city?\",\n      \"parameterized\": {\n        \"parameterized_sql\": \"SELECT count(*) FROM account WHERE account.city = $1\",\n        \"parameterized_intent\": \"How many accounts are in $1?\"\n      }\n    }\n  ]\n}\n```\n\n### Facets\n* **Purpose**: A modular blueprint fragment representing a specific condition, filter, or specialized join predicate. They are dynamically injected filters linked to specific vocabulary, allowing the model to compose complex queries from smaller, validated fragments.\n* **Qualification Rule**: To prevent syntax and ambiguity errors during multi-table joins, **every column reference in a facet MUST be qualified with its table name** (e.g., `table_name.column_name`).\n* **Schema Layout**:\n```json\n{\n  \"facets\": [\n    {\n      \"sql_snippet\": \"products.rating > 4.5\",\n      \"intent\": \"highly rated products (above 4.5)\",\n      \"manifest\": \"highly rated products (above a given number)\",\n      \"parameterized\": {\n        \"parameterized_sql_snippet\": \"products.rating > $1\",\n        \"parameterized_intent\": \"highly rated products (above $1)\"\n      }\n    }\n  ]\n}\n```\n\n---\n\n## 2. Resolving the Value Linking Problem: Value Search Queries\n\nWhen executing blueprint-driven SQL generation, the model inevitably runs into the **value linking problem**—where values in a user's natural language query (e.g., \"Heathrow\", \"Lndn\", \"active\") do not match the exact spelling, case, or formatting of stored records in the database (e.g., \"London Heathrow\", \"London\", \"ACTIVE_STATUS\"). \n\n**Value Search Queries** are the developer-defined mechanism used to resolve the value linking problem, mapping user-supplied terms to their precise schema locations and database records using exact, trigram, or semantic match functions.\n\n* **Schema Layout**:\n```json\n{\n  \"value_searches\": [\n    {\n      \"query\": \"SELECT T.\\\"name\\\" AS value, 'airports.name' AS columns, 'Airport Name' AS concept_type, (T.\\\"name\\\" \u003C-> $value::text) AS distance, '{}'::text AS context FROM \\\"airports\\\" T WHERE T.\\\"name\\\" % $value::text\",\n      \"concept_type\": \"Airport Name\",\n      \"description\": \"Fuzzy match using standard trigram for partial airport names\"\n    }\n  ]\n}\n```\n\n## Best Practices\n\n### General\n*   **Focus on Quality**: Provide accurate and representative examples.\n*   **Avoid Redundancy**: Don't create duplicate templates or facets for the same logic.\n\n### Templates & Facets\n*   Ensure SQL is valid for the target dialect.\n*   Intents should be clear and descriptive.\n*   **Use Parameters**: parameterize values in the SQL and intent according to the [Phrase Extraction and Parameterization Guidelines](references\u002Fphrase_extraction\u002Fguidelines.md). This is necessary to generalize the context items so they can match variations of user queries.\n\n### Facets\n*   **Always qualify every column reference with its table name** (`table.column`) in both the literal and parameterized SQL snippets. A facet is injected into a larger query that may join multiple tables, so unqualified column names risk ambiguity errors or silently binding to the wrong column. Do not use aliases — the surrounding query controls them.\n\n### Value Searches\n*   Choose the appropriate match function based on the column content and performance requirements.\n*   Refer to dialect-specific references for performance optimizations (e.g., indices).\n\n## Shared Guidelines\n\n*   [Phrase Extraction and Parameterization](references\u002Fphrase_extraction\u002Fguidelines.md): Instructions for extracting value phrases and replacing them with placeholders.\n\n## Dialect References\n\nFor specific SQL templates, examples, and performance recommendations, refer to the subdirectories in `references\u002F`:\n\n*   **Templates**:\n    *   [PostgreSQL](references\u002Ftemplate\u002Fpostgresql.md)\n    *   [Spanner (GoogleSQL)](references\u002Ftemplate\u002Fgooglesql.md)\n    *   [MySQL](references\u002Ftemplate\u002Fmysql.md)\n*   **Facets**:\n    *   [PostgreSQL](references\u002Ffacet\u002Fpostgresql.md)\n    *   [Spanner (GoogleSQL)](references\u002Ffacet\u002Fgooglesql.md)\n    *   [MySQL](references\u002Ffacet\u002Fmysql.md)\n*   **Value Searches**:\n    *   [PostgreSQL](references\u002Fvalue_search\u002Fpostgresql.md)\n    *   [Spanner (GoogleSQL)](references\u002Fvalue_search\u002Fgooglesql.md)\n    *   [MySQL](references\u002Fvalue_search\u002Fmysql.md)\n",{"data":36,"body":37},{"name":4,"description":6},{"type":38,"children":39},"root",[40,49,55,62,67,112,118,123,211,223,229,242,247,251,257,279,285,335,687,692,737,1010,1013,1019,1031,1041,1052,1297,1303,1309,1332,1338,1367,1372,1393,1398,1411,1417,1430,1436,1447,1559],{"type":41,"tag":42,"props":43,"children":45},"element","h1",{"id":44},"context-generation-guide-skill",[46],{"type":47,"value":48},"text","Context Generation Guide Skill",{"type":41,"tag":50,"props":51,"children":52},"p",{},[53],{"type":47,"value":54},"This skill provides the agent with the necessary information, concepts, and best practices to generate high-quality context items for the \"Context Engineering Agent\". This context bridges the gap between LLMs and structured databases, enabling accurate Natural Language to SQL generation.",{"type":41,"tag":56,"props":57,"children":59},"h2",{"id":58},"overview",[60],{"type":47,"value":61},"Overview",{"type":41,"tag":50,"props":63,"children":64},{},[65],{"type":47,"value":66},"Context generation allows you to create specific, high-value items in three forms:",{"type":41,"tag":68,"props":69,"children":70},"ol",{},[71,83,102],{"type":41,"tag":72,"props":73,"children":74},"li",{},[75,81],{"type":41,"tag":76,"props":77,"children":78},"strong",{},[79],{"type":47,"value":80},"Templates",{"type":47,"value":82},": End-to-end mappings linking a natural language query to a complete, runnable SQL query. They teach the system overarching operational logic, table join infrastructures, and broad business rules.",{"type":41,"tag":72,"props":84,"children":85},{},[86,91,93,100],{"type":41,"tag":76,"props":87,"children":88},{},[89],{"type":47,"value":90},"Facets",{"type":47,"value":92},": Reusable, modular SQL fragments (like a ",{"type":41,"tag":94,"props":95,"children":97},"code",{"className":96},[],[98],{"type":47,"value":99},"WHERE",{"type":47,"value":101}," clause or specialized join). They are dynamically injected filters linked to specific vocabulary or terminology.",{"type":41,"tag":72,"props":103,"children":104},{},[105,110],{"type":41,"tag":76,"props":106,"children":107},{},[108],{"type":47,"value":109},"Value Searches",{"type":47,"value":111},": Specialized queries used when a value in the natural language query does not perfectly match the stored value in the database. They employ mapping functions to find candidate values.",{"type":41,"tag":56,"props":113,"children":115},{"id":114},"workflow",[116],{"type":47,"value":117},"Workflow",{"type":41,"tag":50,"props":119,"children":120},{},[121],{"type":47,"value":122},"When asked to generate context items:",{"type":41,"tag":68,"props":124,"children":125},{},[126,136,146,164,183,193],{"type":41,"tag":72,"props":127,"children":128},{},[129,134],{"type":41,"tag":76,"props":130,"children":131},{},[132],{"type":47,"value":133},"Identify the Type",{"type":47,"value":135},": Determine if the user wants to create a Template, Facet, or Value Search.",{"type":41,"tag":72,"props":137,"children":138},{},[139,144],{"type":41,"tag":76,"props":140,"children":141},{},[142],{"type":47,"value":143},"Gather Information",{"type":47,"value":145},": Ensure you have all the required information for the chosen context type as described in the \"Context Type Definitions\" section below. If information is missing, try to explore the database to find it or ask the user for clarification.",{"type":41,"tag":72,"props":147,"children":148},{},[149,154,156,162],{"type":41,"tag":76,"props":150,"children":151},{},[152],{"type":47,"value":153},"Select Dialect Reference",{"type":47,"value":155},": Identify the target database dialect (PostgreSQL, GoogleSQL, or MySQL) and consult the corresponding file in ",{"type":41,"tag":94,"props":157,"children":159},{"className":158},[],[160],{"type":47,"value":161},"references\u002F",{"type":47,"value":163}," for specific syntax and patterns.",{"type":41,"tag":72,"props":165,"children":166},{},[167,172,174,181],{"type":41,"tag":76,"props":168,"children":169},{},[170],{"type":47,"value":171},"Parameterize",{"type":47,"value":173},": Follow the ",{"type":41,"tag":175,"props":176,"children":178},"a",{"href":177},"references\u002Fphrase_extraction\u002Fguidelines.md",[179],{"type":47,"value":180},"Phrase Extraction and Parameterization Guidelines",{"type":47,"value":182}," to generalize the values.",{"type":41,"tag":72,"props":184,"children":185},{},[186,191],{"type":41,"tag":76,"props":187,"children":188},{},[189],{"type":47,"value":190},"Format Output",{"type":47,"value":192},": Construct the final JSON object according to the examples in the reference files.",{"type":41,"tag":72,"props":194,"children":195},{},[196,201,203,209],{"type":41,"tag":76,"props":197,"children":198},{},[199],{"type":47,"value":200},"Save Context",{"type":47,"value":202},": Use the appropriate MCP tool (e.g., ",{"type":41,"tag":94,"props":204,"children":206},{"className":205},[],[207],{"type":47,"value":208},"mutate_context_set",{"type":47,"value":210},") to save or update the context set.",{"type":41,"tag":50,"props":212,"children":213},{},[214,216,221],{"type":47,"value":215},"Note: Use the ",{"type":41,"tag":94,"props":217,"children":219},{"className":218},[],[220],{"type":47,"value":208},{"type":47,"value":222}," tool for all ContextSet changes. It supports granular additions, updates, and deletions of ContextSet items without replacing the whole file. Pass mutation payloads directly — the tool handles all file I\u002FO internally, so the agent should not read the target file beforehand.",{"type":41,"tag":56,"props":224,"children":226},{"id":225},"context-type-definitions-rationale",[227],{"type":47,"value":228},"Context Type Definitions & Rationale",{"type":41,"tag":50,"props":230,"children":231},{},[232,234,240],{"type":47,"value":233},"A ",{"type":41,"tag":94,"props":235,"children":237},{"className":236},[],[238],{"type":47,"value":239},"ContextSet",{"type":47,"value":241}," is the central artifact managed by the Context Engineering Agent, containing structured knowledge to help the Gemini Data Analytics API understand your database and business logic.",{"type":41,"tag":50,"props":243,"children":244},{},[245],{"type":47,"value":246},"The following are the currently supported context types:",{"type":41,"tag":248,"props":249,"children":250},"hr",{},[],{"type":41,"tag":56,"props":252,"children":254},{"id":253},"_1-blueprints-for-predictable-sql-generation-templates-facets",[255],{"type":47,"value":256},"1. Blueprints for Predictable SQL Generation: Templates & Facets",{"type":41,"tag":50,"props":258,"children":259},{},[260,264,266,270,272,277],{"type":41,"tag":76,"props":261,"children":262},{},[263],{"type":47,"value":80},{"type":47,"value":265}," and ",{"type":41,"tag":76,"props":267,"children":268},{},[269],{"type":47,"value":90},{"type":47,"value":271}," act as structural ",{"type":41,"tag":76,"props":273,"children":274},{},[275],{"type":47,"value":276},"blueprints",{"type":47,"value":278}," that use the pattern of ML tool selection and tool calling to constrain SQL generation. By providing the model with these pre-defined patterns, you ensure that generated queries are highly predictable, structurally sound, and adhere to established database join structures.",{"type":41,"tag":280,"props":281,"children":283},"h3",{"id":282},"templates",[284],{"type":47,"value":80},{"type":41,"tag":286,"props":287,"children":288},"ul",{},[289,299,325],{"type":41,"tag":72,"props":290,"children":291},{},[292,297],{"type":41,"tag":76,"props":293,"children":294},{},[295],{"type":47,"value":296},"Purpose",{"type":47,"value":298},": A blueprint for a complete query lifecycle. It maps a representative natural language query to an executable SQL statement and a declarative intent, teaching the model the overarching operational logic and join paths for a common query pattern.",{"type":41,"tag":72,"props":300,"children":301},{},[302,307,309,315,317,323],{"type":41,"tag":76,"props":303,"children":304},{},[305],{"type":47,"value":306},"Parameterization",{"type":47,"value":308},": Templates are generalized by replacing literal values in both the intent and SQL with placeholders (e.g., ",{"type":41,"tag":94,"props":310,"children":312},{"className":311},[],[313],{"type":47,"value":314},"$1",{"type":47,"value":316},", ",{"type":41,"tag":94,"props":318,"children":320},{"className":319},[],[321],{"type":47,"value":322},"$2",{"type":47,"value":324},") to match query variations.",{"type":41,"tag":72,"props":326,"children":327},{},[328,333],{"type":41,"tag":76,"props":329,"children":330},{},[331],{"type":47,"value":332},"Schema Layout",{"type":47,"value":334},":",{"type":41,"tag":336,"props":337,"children":342},"pre",{"className":338,"code":339,"language":340,"meta":341,"style":341},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"templates\": [\n    {\n      \"nl_query\": \"How many accounts are in London?\",\n      \"sql\": \"SELECT count(*) FROM account WHERE account.city = 'London'\",\n      \"intent\": \"How many accounts are in London?\",\n      \"manifest\": \"How many accounts are in a given city?\",\n      \"parameterized\": {\n        \"parameterized_sql\": \"SELECT count(*) FROM account WHERE account.city = $1\",\n        \"parameterized_intent\": \"How many accounts are in $1?\"\n      }\n    }\n  ]\n}\n","json","",[343],{"type":41,"tag":94,"props":344,"children":345},{"__ignoreMap":341},[346,358,386,395,438,476,513,551,577,617,652,660,669,678],{"type":41,"tag":347,"props":348,"children":351},"span",{"class":349,"line":350},"line",1,[352],{"type":41,"tag":347,"props":353,"children":355},{"style":354},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[356],{"type":47,"value":357},"{\n",{"type":41,"tag":347,"props":359,"children":361},{"class":349,"line":360},2,[362,367,372,377,381],{"type":41,"tag":347,"props":363,"children":364},{"style":354},[365],{"type":47,"value":366},"  \"",{"type":41,"tag":347,"props":368,"children":370},{"style":369},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[371],{"type":47,"value":282},{"type":41,"tag":347,"props":373,"children":374},{"style":354},[375],{"type":47,"value":376},"\"",{"type":41,"tag":347,"props":378,"children":379},{"style":354},[380],{"type":47,"value":334},{"type":41,"tag":347,"props":382,"children":383},{"style":354},[384],{"type":47,"value":385}," [\n",{"type":41,"tag":347,"props":387,"children":389},{"class":349,"line":388},3,[390],{"type":41,"tag":347,"props":391,"children":392},{"style":354},[393],{"type":47,"value":394},"    {\n",{"type":41,"tag":347,"props":396,"children":398},{"class":349,"line":397},4,[399,404,410,414,418,423,429,433],{"type":41,"tag":347,"props":400,"children":401},{"style":354},[402],{"type":47,"value":403},"      \"",{"type":41,"tag":347,"props":405,"children":407},{"style":406},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[408],{"type":47,"value":409},"nl_query",{"type":41,"tag":347,"props":411,"children":412},{"style":354},[413],{"type":47,"value":376},{"type":41,"tag":347,"props":415,"children":416},{"style":354},[417],{"type":47,"value":334},{"type":41,"tag":347,"props":419,"children":420},{"style":354},[421],{"type":47,"value":422}," \"",{"type":41,"tag":347,"props":424,"children":426},{"style":425},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[427],{"type":47,"value":428},"How many accounts are in London?",{"type":41,"tag":347,"props":430,"children":431},{"style":354},[432],{"type":47,"value":376},{"type":41,"tag":347,"props":434,"children":435},{"style":354},[436],{"type":47,"value":437},",\n",{"type":41,"tag":347,"props":439,"children":441},{"class":349,"line":440},5,[442,446,451,455,459,463,468,472],{"type":41,"tag":347,"props":443,"children":444},{"style":354},[445],{"type":47,"value":403},{"type":41,"tag":347,"props":447,"children":448},{"style":406},[449],{"type":47,"value":450},"sql",{"type":41,"tag":347,"props":452,"children":453},{"style":354},[454],{"type":47,"value":376},{"type":41,"tag":347,"props":456,"children":457},{"style":354},[458],{"type":47,"value":334},{"type":41,"tag":347,"props":460,"children":461},{"style":354},[462],{"type":47,"value":422},{"type":41,"tag":347,"props":464,"children":465},{"style":425},[466],{"type":47,"value":467},"SELECT count(*) FROM account WHERE account.city = 'London'",{"type":41,"tag":347,"props":469,"children":470},{"style":354},[471],{"type":47,"value":376},{"type":41,"tag":347,"props":473,"children":474},{"style":354},[475],{"type":47,"value":437},{"type":41,"tag":347,"props":477,"children":479},{"class":349,"line":478},6,[480,484,489,493,497,501,505,509],{"type":41,"tag":347,"props":481,"children":482},{"style":354},[483],{"type":47,"value":403},{"type":41,"tag":347,"props":485,"children":486},{"style":406},[487],{"type":47,"value":488},"intent",{"type":41,"tag":347,"props":490,"children":491},{"style":354},[492],{"type":47,"value":376},{"type":41,"tag":347,"props":494,"children":495},{"style":354},[496],{"type":47,"value":334},{"type":41,"tag":347,"props":498,"children":499},{"style":354},[500],{"type":47,"value":422},{"type":41,"tag":347,"props":502,"children":503},{"style":425},[504],{"type":47,"value":428},{"type":41,"tag":347,"props":506,"children":507},{"style":354},[508],{"type":47,"value":376},{"type":41,"tag":347,"props":510,"children":511},{"style":354},[512],{"type":47,"value":437},{"type":41,"tag":347,"props":514,"children":516},{"class":349,"line":515},7,[517,521,526,530,534,538,543,547],{"type":41,"tag":347,"props":518,"children":519},{"style":354},[520],{"type":47,"value":403},{"type":41,"tag":347,"props":522,"children":523},{"style":406},[524],{"type":47,"value":525},"manifest",{"type":41,"tag":347,"props":527,"children":528},{"style":354},[529],{"type":47,"value":376},{"type":41,"tag":347,"props":531,"children":532},{"style":354},[533],{"type":47,"value":334},{"type":41,"tag":347,"props":535,"children":536},{"style":354},[537],{"type":47,"value":422},{"type":41,"tag":347,"props":539,"children":540},{"style":425},[541],{"type":47,"value":542},"How many accounts are in a given city?",{"type":41,"tag":347,"props":544,"children":545},{"style":354},[546],{"type":47,"value":376},{"type":41,"tag":347,"props":548,"children":549},{"style":354},[550],{"type":47,"value":437},{"type":41,"tag":347,"props":552,"children":554},{"class":349,"line":553},8,[555,559,564,568,572],{"type":41,"tag":347,"props":556,"children":557},{"style":354},[558],{"type":47,"value":403},{"type":41,"tag":347,"props":560,"children":561},{"style":406},[562],{"type":47,"value":563},"parameterized",{"type":41,"tag":347,"props":565,"children":566},{"style":354},[567],{"type":47,"value":376},{"type":41,"tag":347,"props":569,"children":570},{"style":354},[571],{"type":47,"value":334},{"type":41,"tag":347,"props":573,"children":574},{"style":354},[575],{"type":47,"value":576}," {\n",{"type":41,"tag":347,"props":578,"children":580},{"class":349,"line":579},9,[581,586,592,596,600,604,609,613],{"type":41,"tag":347,"props":582,"children":583},{"style":354},[584],{"type":47,"value":585},"        \"",{"type":41,"tag":347,"props":587,"children":589},{"style":588},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[590],{"type":47,"value":591},"parameterized_sql",{"type":41,"tag":347,"props":593,"children":594},{"style":354},[595],{"type":47,"value":376},{"type":41,"tag":347,"props":597,"children":598},{"style":354},[599],{"type":47,"value":334},{"type":41,"tag":347,"props":601,"children":602},{"style":354},[603],{"type":47,"value":422},{"type":41,"tag":347,"props":605,"children":606},{"style":425},[607],{"type":47,"value":608},"SELECT count(*) FROM account WHERE account.city = $1",{"type":41,"tag":347,"props":610,"children":611},{"style":354},[612],{"type":47,"value":376},{"type":41,"tag":347,"props":614,"children":615},{"style":354},[616],{"type":47,"value":437},{"type":41,"tag":347,"props":618,"children":620},{"class":349,"line":619},10,[621,625,630,634,638,642,647],{"type":41,"tag":347,"props":622,"children":623},{"style":354},[624],{"type":47,"value":585},{"type":41,"tag":347,"props":626,"children":627},{"style":588},[628],{"type":47,"value":629},"parameterized_intent",{"type":41,"tag":347,"props":631,"children":632},{"style":354},[633],{"type":47,"value":376},{"type":41,"tag":347,"props":635,"children":636},{"style":354},[637],{"type":47,"value":334},{"type":41,"tag":347,"props":639,"children":640},{"style":354},[641],{"type":47,"value":422},{"type":41,"tag":347,"props":643,"children":644},{"style":425},[645],{"type":47,"value":646},"How many accounts are in $1?",{"type":41,"tag":347,"props":648,"children":649},{"style":354},[650],{"type":47,"value":651},"\"\n",{"type":41,"tag":347,"props":653,"children":654},{"class":349,"line":28},[655],{"type":41,"tag":347,"props":656,"children":657},{"style":354},[658],{"type":47,"value":659},"      }\n",{"type":41,"tag":347,"props":661,"children":663},{"class":349,"line":662},12,[664],{"type":41,"tag":347,"props":665,"children":666},{"style":354},[667],{"type":47,"value":668},"    }\n",{"type":41,"tag":347,"props":670,"children":672},{"class":349,"line":671},13,[673],{"type":41,"tag":347,"props":674,"children":675},{"style":354},[676],{"type":47,"value":677},"  ]\n",{"type":41,"tag":347,"props":679,"children":681},{"class":349,"line":680},14,[682],{"type":41,"tag":347,"props":683,"children":684},{"style":354},[685],{"type":47,"value":686},"}\n",{"type":41,"tag":280,"props":688,"children":690},{"id":689},"facets",[691],{"type":47,"value":90},{"type":41,"tag":286,"props":693,"children":694},{},[695,704,729],{"type":41,"tag":72,"props":696,"children":697},{},[698,702],{"type":41,"tag":76,"props":699,"children":700},{},[701],{"type":47,"value":296},{"type":47,"value":703},": A modular blueprint fragment representing a specific condition, filter, or specialized join predicate. They are dynamically injected filters linked to specific vocabulary, allowing the model to compose complex queries from smaller, validated fragments.",{"type":41,"tag":72,"props":705,"children":706},{},[707,712,714,719,721,727],{"type":41,"tag":76,"props":708,"children":709},{},[710],{"type":47,"value":711},"Qualification Rule",{"type":47,"value":713},": To prevent syntax and ambiguity errors during multi-table joins, ",{"type":41,"tag":76,"props":715,"children":716},{},[717],{"type":47,"value":718},"every column reference in a facet MUST be qualified with its table name",{"type":47,"value":720}," (e.g., ",{"type":41,"tag":94,"props":722,"children":724},{"className":723},[],[725],{"type":47,"value":726},"table_name.column_name",{"type":47,"value":728},").",{"type":41,"tag":72,"props":730,"children":731},{},[732,736],{"type":41,"tag":76,"props":733,"children":734},{},[735],{"type":47,"value":332},{"type":47,"value":334},{"type":41,"tag":336,"props":738,"children":740},{"className":338,"code":739,"language":340,"meta":341,"style":341},"{\n  \"facets\": [\n    {\n      \"sql_snippet\": \"products.rating > 4.5\",\n      \"intent\": \"highly rated products (above 4.5)\",\n      \"manifest\": \"highly rated products (above a given number)\",\n      \"parameterized\": {\n        \"parameterized_sql_snippet\": \"products.rating > $1\",\n        \"parameterized_intent\": \"highly rated products (above $1)\"\n      }\n    }\n  ]\n}\n",[741],{"type":41,"tag":94,"props":742,"children":743},{"__ignoreMap":341},[744,751,774,781,818,854,890,913,950,982,989,996,1003],{"type":41,"tag":347,"props":745,"children":746},{"class":349,"line":350},[747],{"type":41,"tag":347,"props":748,"children":749},{"style":354},[750],{"type":47,"value":357},{"type":41,"tag":347,"props":752,"children":753},{"class":349,"line":360},[754,758,762,766,770],{"type":41,"tag":347,"props":755,"children":756},{"style":354},[757],{"type":47,"value":366},{"type":41,"tag":347,"props":759,"children":760},{"style":369},[761],{"type":47,"value":689},{"type":41,"tag":347,"props":763,"children":764},{"style":354},[765],{"type":47,"value":376},{"type":41,"tag":347,"props":767,"children":768},{"style":354},[769],{"type":47,"value":334},{"type":41,"tag":347,"props":771,"children":772},{"style":354},[773],{"type":47,"value":385},{"type":41,"tag":347,"props":775,"children":776},{"class":349,"line":388},[777],{"type":41,"tag":347,"props":778,"children":779},{"style":354},[780],{"type":47,"value":394},{"type":41,"tag":347,"props":782,"children":783},{"class":349,"line":397},[784,788,793,797,801,805,810,814],{"type":41,"tag":347,"props":785,"children":786},{"style":354},[787],{"type":47,"value":403},{"type":41,"tag":347,"props":789,"children":790},{"style":406},[791],{"type":47,"value":792},"sql_snippet",{"type":41,"tag":347,"props":794,"children":795},{"style":354},[796],{"type":47,"value":376},{"type":41,"tag":347,"props":798,"children":799},{"style":354},[800],{"type":47,"value":334},{"type":41,"tag":347,"props":802,"children":803},{"style":354},[804],{"type":47,"value":422},{"type":41,"tag":347,"props":806,"children":807},{"style":425},[808],{"type":47,"value":809},"products.rating > 4.5",{"type":41,"tag":347,"props":811,"children":812},{"style":354},[813],{"type":47,"value":376},{"type":41,"tag":347,"props":815,"children":816},{"style":354},[817],{"type":47,"value":437},{"type":41,"tag":347,"props":819,"children":820},{"class":349,"line":440},[821,825,829,833,837,841,846,850],{"type":41,"tag":347,"props":822,"children":823},{"style":354},[824],{"type":47,"value":403},{"type":41,"tag":347,"props":826,"children":827},{"style":406},[828],{"type":47,"value":488},{"type":41,"tag":347,"props":830,"children":831},{"style":354},[832],{"type":47,"value":376},{"type":41,"tag":347,"props":834,"children":835},{"style":354},[836],{"type":47,"value":334},{"type":41,"tag":347,"props":838,"children":839},{"style":354},[840],{"type":47,"value":422},{"type":41,"tag":347,"props":842,"children":843},{"style":425},[844],{"type":47,"value":845},"highly rated products (above 4.5)",{"type":41,"tag":347,"props":847,"children":848},{"style":354},[849],{"type":47,"value":376},{"type":41,"tag":347,"props":851,"children":852},{"style":354},[853],{"type":47,"value":437},{"type":41,"tag":347,"props":855,"children":856},{"class":349,"line":478},[857,861,865,869,873,877,882,886],{"type":41,"tag":347,"props":858,"children":859},{"style":354},[860],{"type":47,"value":403},{"type":41,"tag":347,"props":862,"children":863},{"style":406},[864],{"type":47,"value":525},{"type":41,"tag":347,"props":866,"children":867},{"style":354},[868],{"type":47,"value":376},{"type":41,"tag":347,"props":870,"children":871},{"style":354},[872],{"type":47,"value":334},{"type":41,"tag":347,"props":874,"children":875},{"style":354},[876],{"type":47,"value":422},{"type":41,"tag":347,"props":878,"children":879},{"style":425},[880],{"type":47,"value":881},"highly rated products (above a given number)",{"type":41,"tag":347,"props":883,"children":884},{"style":354},[885],{"type":47,"value":376},{"type":41,"tag":347,"props":887,"children":888},{"style":354},[889],{"type":47,"value":437},{"type":41,"tag":347,"props":891,"children":892},{"class":349,"line":515},[893,897,901,905,909],{"type":41,"tag":347,"props":894,"children":895},{"style":354},[896],{"type":47,"value":403},{"type":41,"tag":347,"props":898,"children":899},{"style":406},[900],{"type":47,"value":563},{"type":41,"tag":347,"props":902,"children":903},{"style":354},[904],{"type":47,"value":376},{"type":41,"tag":347,"props":906,"children":907},{"style":354},[908],{"type":47,"value":334},{"type":41,"tag":347,"props":910,"children":911},{"style":354},[912],{"type":47,"value":576},{"type":41,"tag":347,"props":914,"children":915},{"class":349,"line":553},[916,920,925,929,933,937,942,946],{"type":41,"tag":347,"props":917,"children":918},{"style":354},[919],{"type":47,"value":585},{"type":41,"tag":347,"props":921,"children":922},{"style":588},[923],{"type":47,"value":924},"parameterized_sql_snippet",{"type":41,"tag":347,"props":926,"children":927},{"style":354},[928],{"type":47,"value":376},{"type":41,"tag":347,"props":930,"children":931},{"style":354},[932],{"type":47,"value":334},{"type":41,"tag":347,"props":934,"children":935},{"style":354},[936],{"type":47,"value":422},{"type":41,"tag":347,"props":938,"children":939},{"style":425},[940],{"type":47,"value":941},"products.rating > $1",{"type":41,"tag":347,"props":943,"children":944},{"style":354},[945],{"type":47,"value":376},{"type":41,"tag":347,"props":947,"children":948},{"style":354},[949],{"type":47,"value":437},{"type":41,"tag":347,"props":951,"children":952},{"class":349,"line":579},[953,957,961,965,969,973,978],{"type":41,"tag":347,"props":954,"children":955},{"style":354},[956],{"type":47,"value":585},{"type":41,"tag":347,"props":958,"children":959},{"style":588},[960],{"type":47,"value":629},{"type":41,"tag":347,"props":962,"children":963},{"style":354},[964],{"type":47,"value":376},{"type":41,"tag":347,"props":966,"children":967},{"style":354},[968],{"type":47,"value":334},{"type":41,"tag":347,"props":970,"children":971},{"style":354},[972],{"type":47,"value":422},{"type":41,"tag":347,"props":974,"children":975},{"style":425},[976],{"type":47,"value":977},"highly rated products (above $1)",{"type":41,"tag":347,"props":979,"children":980},{"style":354},[981],{"type":47,"value":651},{"type":41,"tag":347,"props":983,"children":984},{"class":349,"line":619},[985],{"type":41,"tag":347,"props":986,"children":987},{"style":354},[988],{"type":47,"value":659},{"type":41,"tag":347,"props":990,"children":991},{"class":349,"line":28},[992],{"type":41,"tag":347,"props":993,"children":994},{"style":354},[995],{"type":47,"value":668},{"type":41,"tag":347,"props":997,"children":998},{"class":349,"line":662},[999],{"type":41,"tag":347,"props":1000,"children":1001},{"style":354},[1002],{"type":47,"value":677},{"type":41,"tag":347,"props":1004,"children":1005},{"class":349,"line":671},[1006],{"type":41,"tag":347,"props":1007,"children":1008},{"style":354},[1009],{"type":47,"value":686},{"type":41,"tag":248,"props":1011,"children":1012},{},[],{"type":41,"tag":56,"props":1014,"children":1016},{"id":1015},"_2-resolving-the-value-linking-problem-value-search-queries",[1017],{"type":47,"value":1018},"2. Resolving the Value Linking Problem: Value Search Queries",{"type":41,"tag":50,"props":1020,"children":1021},{},[1022,1024,1029],{"type":47,"value":1023},"When executing blueprint-driven SQL generation, the model inevitably runs into the ",{"type":41,"tag":76,"props":1025,"children":1026},{},[1027],{"type":47,"value":1028},"value linking problem",{"type":47,"value":1030},"—where values in a user's natural language query (e.g., \"Heathrow\", \"Lndn\", \"active\") do not match the exact spelling, case, or formatting of stored records in the database (e.g., \"London Heathrow\", \"London\", \"ACTIVE_STATUS\").",{"type":41,"tag":50,"props":1032,"children":1033},{},[1034,1039],{"type":41,"tag":76,"props":1035,"children":1036},{},[1037],{"type":47,"value":1038},"Value Search Queries",{"type":47,"value":1040}," are the developer-defined mechanism used to resolve the value linking problem, mapping user-supplied terms to their precise schema locations and database records using exact, trigram, or semantic match functions.",{"type":41,"tag":286,"props":1042,"children":1043},{},[1044],{"type":41,"tag":72,"props":1045,"children":1046},{},[1047,1051],{"type":41,"tag":76,"props":1048,"children":1049},{},[1050],{"type":47,"value":332},{"type":47,"value":334},{"type":41,"tag":336,"props":1053,"children":1055},{"className":338,"code":1054,"language":340,"meta":341,"style":341},"{\n  \"value_searches\": [\n    {\n      \"query\": \"SELECT T.\\\"name\\\" AS value, 'airports.name' AS columns, 'Airport Name' AS concept_type, (T.\\\"name\\\" \u003C-> $value::text) AS distance, '{}'::text AS context FROM \\\"airports\\\" T WHERE T.\\\"name\\\" % $value::text\",\n      \"concept_type\": \"Airport Name\",\n      \"description\": \"Fuzzy match using standard trigram for partial airport names\"\n    }\n  ]\n}\n",[1056],{"type":41,"tag":94,"props":1057,"children":1058},{"__ignoreMap":341},[1059,1066,1090,1097,1206,1243,1276,1283,1290],{"type":41,"tag":347,"props":1060,"children":1061},{"class":349,"line":350},[1062],{"type":41,"tag":347,"props":1063,"children":1064},{"style":354},[1065],{"type":47,"value":357},{"type":41,"tag":347,"props":1067,"children":1068},{"class":349,"line":360},[1069,1073,1078,1082,1086],{"type":41,"tag":347,"props":1070,"children":1071},{"style":354},[1072],{"type":47,"value":366},{"type":41,"tag":347,"props":1074,"children":1075},{"style":369},[1076],{"type":47,"value":1077},"value_searches",{"type":41,"tag":347,"props":1079,"children":1080},{"style":354},[1081],{"type":47,"value":376},{"type":41,"tag":347,"props":1083,"children":1084},{"style":354},[1085],{"type":47,"value":334},{"type":41,"tag":347,"props":1087,"children":1088},{"style":354},[1089],{"type":47,"value":385},{"type":41,"tag":347,"props":1091,"children":1092},{"class":349,"line":388},[1093],{"type":41,"tag":347,"props":1094,"children":1095},{"style":354},[1096],{"type":47,"value":394},{"type":41,"tag":347,"props":1098,"children":1099},{"class":349,"line":397},[1100,1104,1109,1113,1117,1121,1126,1132,1137,1141,1146,1150,1154,1158,1163,1167,1172,1176,1181,1185,1189,1193,1198,1202],{"type":41,"tag":347,"props":1101,"children":1102},{"style":354},[1103],{"type":47,"value":403},{"type":41,"tag":347,"props":1105,"children":1106},{"style":406},[1107],{"type":47,"value":1108},"query",{"type":41,"tag":347,"props":1110,"children":1111},{"style":354},[1112],{"type":47,"value":376},{"type":41,"tag":347,"props":1114,"children":1115},{"style":354},[1116],{"type":47,"value":334},{"type":41,"tag":347,"props":1118,"children":1119},{"style":354},[1120],{"type":47,"value":422},{"type":41,"tag":347,"props":1122,"children":1123},{"style":425},[1124],{"type":47,"value":1125},"SELECT T.",{"type":41,"tag":347,"props":1127,"children":1129},{"style":1128},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[1130],{"type":47,"value":1131},"\\\"",{"type":41,"tag":347,"props":1133,"children":1134},{"style":425},[1135],{"type":47,"value":1136},"name",{"type":41,"tag":347,"props":1138,"children":1139},{"style":1128},[1140],{"type":47,"value":1131},{"type":41,"tag":347,"props":1142,"children":1143},{"style":425},[1144],{"type":47,"value":1145}," AS value, 'airports.name' AS columns, 'Airport Name' AS concept_type, (T.",{"type":41,"tag":347,"props":1147,"children":1148},{"style":1128},[1149],{"type":47,"value":1131},{"type":41,"tag":347,"props":1151,"children":1152},{"style":425},[1153],{"type":47,"value":1136},{"type":41,"tag":347,"props":1155,"children":1156},{"style":1128},[1157],{"type":47,"value":1131},{"type":41,"tag":347,"props":1159,"children":1160},{"style":425},[1161],{"type":47,"value":1162}," \u003C-> $value::text) AS distance, '{}'::text AS context FROM ",{"type":41,"tag":347,"props":1164,"children":1165},{"style":1128},[1166],{"type":47,"value":1131},{"type":41,"tag":347,"props":1168,"children":1169},{"style":425},[1170],{"type":47,"value":1171},"airports",{"type":41,"tag":347,"props":1173,"children":1174},{"style":1128},[1175],{"type":47,"value":1131},{"type":41,"tag":347,"props":1177,"children":1178},{"style":425},[1179],{"type":47,"value":1180}," T WHERE T.",{"type":41,"tag":347,"props":1182,"children":1183},{"style":1128},[1184],{"type":47,"value":1131},{"type":41,"tag":347,"props":1186,"children":1187},{"style":425},[1188],{"type":47,"value":1136},{"type":41,"tag":347,"props":1190,"children":1191},{"style":1128},[1192],{"type":47,"value":1131},{"type":41,"tag":347,"props":1194,"children":1195},{"style":425},[1196],{"type":47,"value":1197}," % $value::text",{"type":41,"tag":347,"props":1199,"children":1200},{"style":354},[1201],{"type":47,"value":376},{"type":41,"tag":347,"props":1203,"children":1204},{"style":354},[1205],{"type":47,"value":437},{"type":41,"tag":347,"props":1207,"children":1208},{"class":349,"line":440},[1209,1213,1218,1222,1226,1230,1235,1239],{"type":41,"tag":347,"props":1210,"children":1211},{"style":354},[1212],{"type":47,"value":403},{"type":41,"tag":347,"props":1214,"children":1215},{"style":406},[1216],{"type":47,"value":1217},"concept_type",{"type":41,"tag":347,"props":1219,"children":1220},{"style":354},[1221],{"type":47,"value":376},{"type":41,"tag":347,"props":1223,"children":1224},{"style":354},[1225],{"type":47,"value":334},{"type":41,"tag":347,"props":1227,"children":1228},{"style":354},[1229],{"type":47,"value":422},{"type":41,"tag":347,"props":1231,"children":1232},{"style":425},[1233],{"type":47,"value":1234},"Airport Name",{"type":41,"tag":347,"props":1236,"children":1237},{"style":354},[1238],{"type":47,"value":376},{"type":41,"tag":347,"props":1240,"children":1241},{"style":354},[1242],{"type":47,"value":437},{"type":41,"tag":347,"props":1244,"children":1245},{"class":349,"line":478},[1246,1250,1255,1259,1263,1267,1272],{"type":41,"tag":347,"props":1247,"children":1248},{"style":354},[1249],{"type":47,"value":403},{"type":41,"tag":347,"props":1251,"children":1252},{"style":406},[1253],{"type":47,"value":1254},"description",{"type":41,"tag":347,"props":1256,"children":1257},{"style":354},[1258],{"type":47,"value":376},{"type":41,"tag":347,"props":1260,"children":1261},{"style":354},[1262],{"type":47,"value":334},{"type":41,"tag":347,"props":1264,"children":1265},{"style":354},[1266],{"type":47,"value":422},{"type":41,"tag":347,"props":1268,"children":1269},{"style":425},[1270],{"type":47,"value":1271},"Fuzzy match using standard trigram for partial airport names",{"type":41,"tag":347,"props":1273,"children":1274},{"style":354},[1275],{"type":47,"value":651},{"type":41,"tag":347,"props":1277,"children":1278},{"class":349,"line":515},[1279],{"type":41,"tag":347,"props":1280,"children":1281},{"style":354},[1282],{"type":47,"value":668},{"type":41,"tag":347,"props":1284,"children":1285},{"class":349,"line":553},[1286],{"type":41,"tag":347,"props":1287,"children":1288},{"style":354},[1289],{"type":47,"value":677},{"type":41,"tag":347,"props":1291,"children":1292},{"class":349,"line":579},[1293],{"type":41,"tag":347,"props":1294,"children":1295},{"style":354},[1296],{"type":47,"value":686},{"type":41,"tag":56,"props":1298,"children":1300},{"id":1299},"best-practices",[1301],{"type":47,"value":1302},"Best Practices",{"type":41,"tag":280,"props":1304,"children":1306},{"id":1305},"general",[1307],{"type":47,"value":1308},"General",{"type":41,"tag":286,"props":1310,"children":1311},{},[1312,1322],{"type":41,"tag":72,"props":1313,"children":1314},{},[1315,1320],{"type":41,"tag":76,"props":1316,"children":1317},{},[1318],{"type":47,"value":1319},"Focus on Quality",{"type":47,"value":1321},": Provide accurate and representative examples.",{"type":41,"tag":72,"props":1323,"children":1324},{},[1325,1330],{"type":41,"tag":76,"props":1326,"children":1327},{},[1328],{"type":47,"value":1329},"Avoid Redundancy",{"type":47,"value":1331},": Don't create duplicate templates or facets for the same logic.",{"type":41,"tag":280,"props":1333,"children":1335},{"id":1334},"templates-facets",[1336],{"type":47,"value":1337},"Templates & Facets",{"type":41,"tag":286,"props":1339,"children":1340},{},[1341,1346,1351],{"type":41,"tag":72,"props":1342,"children":1343},{},[1344],{"type":47,"value":1345},"Ensure SQL is valid for the target dialect.",{"type":41,"tag":72,"props":1347,"children":1348},{},[1349],{"type":47,"value":1350},"Intents should be clear and descriptive.",{"type":41,"tag":72,"props":1352,"children":1353},{},[1354,1359,1361,1365],{"type":41,"tag":76,"props":1355,"children":1356},{},[1357],{"type":47,"value":1358},"Use Parameters",{"type":47,"value":1360},": parameterize values in the SQL and intent according to the ",{"type":41,"tag":175,"props":1362,"children":1363},{"href":177},[1364],{"type":47,"value":180},{"type":47,"value":1366},". This is necessary to generalize the context items so they can match variations of user queries.",{"type":41,"tag":280,"props":1368,"children":1370},{"id":1369},"facets-1",[1371],{"type":47,"value":90},{"type":41,"tag":286,"props":1373,"children":1374},{},[1375],{"type":41,"tag":72,"props":1376,"children":1377},{},[1378,1383,1385,1391],{"type":41,"tag":76,"props":1379,"children":1380},{},[1381],{"type":47,"value":1382},"Always qualify every column reference with its table name",{"type":47,"value":1384}," (",{"type":41,"tag":94,"props":1386,"children":1388},{"className":1387},[],[1389],{"type":47,"value":1390},"table.column",{"type":47,"value":1392},") in both the literal and parameterized SQL snippets. A facet is injected into a larger query that may join multiple tables, so unqualified column names risk ambiguity errors or silently binding to the wrong column. Do not use aliases — the surrounding query controls them.",{"type":41,"tag":280,"props":1394,"children":1396},{"id":1395},"value-searches",[1397],{"type":47,"value":109},{"type":41,"tag":286,"props":1399,"children":1400},{},[1401,1406],{"type":41,"tag":72,"props":1402,"children":1403},{},[1404],{"type":47,"value":1405},"Choose the appropriate match function based on the column content and performance requirements.",{"type":41,"tag":72,"props":1407,"children":1408},{},[1409],{"type":47,"value":1410},"Refer to dialect-specific references for performance optimizations (e.g., indices).",{"type":41,"tag":56,"props":1412,"children":1414},{"id":1413},"shared-guidelines",[1415],{"type":47,"value":1416},"Shared Guidelines",{"type":41,"tag":286,"props":1418,"children":1419},{},[1420],{"type":41,"tag":72,"props":1421,"children":1422},{},[1423,1428],{"type":41,"tag":175,"props":1424,"children":1425},{"href":177},[1426],{"type":47,"value":1427},"Phrase Extraction and Parameterization",{"type":47,"value":1429},": Instructions for extracting value phrases and replacing them with placeholders.",{"type":41,"tag":56,"props":1431,"children":1433},{"id":1432},"dialect-references",[1434],{"type":47,"value":1435},"Dialect References",{"type":41,"tag":50,"props":1437,"children":1438},{},[1439,1441,1446],{"type":47,"value":1440},"For specific SQL templates, examples, and performance recommendations, refer to the subdirectories in ",{"type":41,"tag":94,"props":1442,"children":1444},{"className":1443},[],[1445],{"type":47,"value":161},{"type":47,"value":334},{"type":41,"tag":286,"props":1448,"children":1449},{},[1450,1489,1524],{"type":41,"tag":72,"props":1451,"children":1452},{},[1453,1457,1459],{"type":41,"tag":76,"props":1454,"children":1455},{},[1456],{"type":47,"value":80},{"type":47,"value":1458},":\n",{"type":41,"tag":286,"props":1460,"children":1461},{},[1462,1471,1480],{"type":41,"tag":72,"props":1463,"children":1464},{},[1465],{"type":41,"tag":175,"props":1466,"children":1468},{"href":1467},"references\u002Ftemplate\u002Fpostgresql.md",[1469],{"type":47,"value":1470},"PostgreSQL",{"type":41,"tag":72,"props":1472,"children":1473},{},[1474],{"type":41,"tag":175,"props":1475,"children":1477},{"href":1476},"references\u002Ftemplate\u002Fgooglesql.md",[1478],{"type":47,"value":1479},"Spanner (GoogleSQL)",{"type":41,"tag":72,"props":1481,"children":1482},{},[1483],{"type":41,"tag":175,"props":1484,"children":1486},{"href":1485},"references\u002Ftemplate\u002Fmysql.md",[1487],{"type":47,"value":1488},"MySQL",{"type":41,"tag":72,"props":1490,"children":1491},{},[1492,1496,1497],{"type":41,"tag":76,"props":1493,"children":1494},{},[1495],{"type":47,"value":90},{"type":47,"value":1458},{"type":41,"tag":286,"props":1498,"children":1499},{},[1500,1508,1516],{"type":41,"tag":72,"props":1501,"children":1502},{},[1503],{"type":41,"tag":175,"props":1504,"children":1506},{"href":1505},"references\u002Ffacet\u002Fpostgresql.md",[1507],{"type":47,"value":1470},{"type":41,"tag":72,"props":1509,"children":1510},{},[1511],{"type":41,"tag":175,"props":1512,"children":1514},{"href":1513},"references\u002Ffacet\u002Fgooglesql.md",[1515],{"type":47,"value":1479},{"type":41,"tag":72,"props":1517,"children":1518},{},[1519],{"type":41,"tag":175,"props":1520,"children":1522},{"href":1521},"references\u002Ffacet\u002Fmysql.md",[1523],{"type":47,"value":1488},{"type":41,"tag":72,"props":1525,"children":1526},{},[1527,1531,1532],{"type":41,"tag":76,"props":1528,"children":1529},{},[1530],{"type":47,"value":109},{"type":47,"value":1458},{"type":41,"tag":286,"props":1533,"children":1534},{},[1535,1543,1551],{"type":41,"tag":72,"props":1536,"children":1537},{},[1538],{"type":41,"tag":175,"props":1539,"children":1541},{"href":1540},"references\u002Fvalue_search\u002Fpostgresql.md",[1542],{"type":47,"value":1470},{"type":41,"tag":72,"props":1544,"children":1545},{},[1546],{"type":41,"tag":175,"props":1547,"children":1549},{"href":1548},"references\u002Fvalue_search\u002Fgooglesql.md",[1550],{"type":47,"value":1479},{"type":41,"tag":72,"props":1552,"children":1553},{},[1554],{"type":41,"tag":175,"props":1555,"children":1557},{"href":1556},"references\u002Fvalue_search\u002Fmysql.md",[1558],{"type":47,"value":1488},{"type":41,"tag":1560,"props":1561,"children":1562},"style",{},[1563],{"type":47,"value":1564},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1566,"total":515},[1567,1582,1598,1609,1622,1637,1650],{"slug":1568,"name":1568,"fn":1569,"description":1570,"org":1571,"tags":1572,"stars":24,"repoUrl":25,"updatedAt":1581},"context-engineering-bootstrap","bootstrap initial ContextSet for database enrichment","Guides the agent to bootstrap an initial ContextSet (templates, facets, and value searches) by deducing key information from the database schema and generating a ContextSet file.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1573,1576,1579,1580],{"name":1574,"slug":1575,"type":16},"Context","context",{"name":1577,"slug":1578,"type":16},"Data Modeling","data-modeling",{"name":21,"slug":22,"type":16},{"name":9,"slug":8,"type":16},"2026-07-18T05:47:56.797107",{"slug":1583,"name":1583,"fn":1584,"description":1585,"org":1586,"tags":1587,"stars":24,"repoUrl":25,"updatedAt":1597},"context-engineering-dataset-generation","generate golden SQL evaluation datasets","Generate or expand a golden evaluation dataset of SQL\u002FQuestion (NLQ+SQL) pairs for evaluating NL-to-SQL translation accuracy on a target database.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1588,1591,1594,1595],{"name":1589,"slug":1590,"type":16},"Data Analysis","data-analysis",{"name":1592,"slug":1593,"type":16},"Evals","evals",{"name":9,"slug":8,"type":16},{"name":1596,"slug":450,"type":16},"SQL","2026-07-18T05:47:55.878915",{"slug":1599,"name":1599,"fn":1600,"description":1601,"org":1602,"tags":1603,"stars":24,"repoUrl":25,"updatedAt":1608},"context-engineering-evaluate","evaluate ContextSet against golden datasets","Guides the agent to execute an evaluation of a ContextSet against a golden NLQ+SQL dataset using the Evalbench framework.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1604,1605,1606,1607],{"name":1589,"slug":1590,"type":16},{"name":1592,"slug":1593,"type":16},{"name":9,"slug":8,"type":16},{"name":1596,"slug":450,"type":16},"2026-07-18T05:47:52.594607",{"slug":1610,"name":1610,"fn":1611,"description":1612,"org":1613,"tags":1614,"stars":24,"repoUrl":25,"updatedAt":1621},"context-engineering-hillclimb","improve ContextSet via hill-climbing iterations","Guides the agent to perform hill-climbing iterations to improve a ContextSet based on Evalbench evaluation results.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1615,1616,1617,1618],{"name":1589,"slug":1590,"type":16},{"name":1592,"slug":1593,"type":16},{"name":9,"slug":8,"type":16},{"name":1619,"slug":1620,"type":16},"Optimization","optimization","2026-07-18T05:47:54.951176",{"slug":1623,"name":1623,"fn":1624,"description":1625,"org":1626,"tags":1627,"stars":24,"repoUrl":25,"updatedAt":1636},"context-engineering-init","initialize context engineering and database connections","Orchestrates the initialization workflow for context engineering, and provides helper workflow for setting up database connections by creating or updating tools.yaml configurations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1628,1631,1632,1635],{"name":1629,"slug":1630,"type":16},"Configuration","configuration",{"name":21,"slug":22,"type":16},{"name":1633,"slug":1634,"type":16},"Engineering","engineering",{"name":9,"slug":8,"type":16},"2026-07-18T05:47:59.493278",{"slug":1638,"name":1638,"fn":1639,"description":1640,"org":1641,"tags":1642,"stars":24,"repoUrl":25,"updatedAt":1649},"context-engineering-workflow","optimize context sets for Gemini data agents","Context engineering for Gemini Data Analytics API's data agent developer platform tools. Generates, evaluates, and iteratively optimizes a ContextSet (Templates, Facets, Value Searches) to maximize Natural-Language-to-SQL translation accuracy. Use this skill to run the automated setup, NL-SQL pair evaluation dataset generation and expansion, bootstrapping, scoring, and optimization pipeline. For manual authoring standards and schema syntax rules, see the context-generation-guide skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1643,1644,1645,1648],{"name":14,"slug":15,"type":16},{"name":1589,"slug":1590,"type":16},{"name":1646,"slug":1647,"type":16},"Gemini","gemini",{"name":9,"slug":8,"type":16},"2026-07-18T05:13:44.430929",{"slug":4,"name":4,"fn":5,"description":6,"org":1651,"tags":1652,"stars":24,"repoUrl":25,"updatedAt":26},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1653,1654,1655,1656],{"name":14,"slug":15,"type":16},{"name":21,"slug":22,"type":16},{"name":18,"slug":19,"type":16},{"name":9,"slug":8,"type":16},{"items":1658,"total":1837},[1659,1675,1689,1709,1723,1734,1748,1765,1782,1795,1811,1821],{"slug":1660,"name":1660,"fn":1661,"description":1662,"org":1663,"tags":1664,"stars":1672,"repoUrl":1673,"updatedAt":1674},"kb-search","search and extract local knowledge base documents","Allows listing, searching and extracting information from local knowledge base documents for information about tables\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1665,1666,1669],{"name":18,"slug":19,"type":16},{"name":1667,"slug":1668,"type":16},"Knowledge Base","knowledge-base",{"name":1670,"slug":1671,"type":16},"Search","search",6749,"https:\u002F\u002Fgithub.com\u002FGoogleCloudPlatform\u002Fknowledge-catalog","2026-07-12T07:38:52.157375",{"slug":1676,"name":1677,"fn":1678,"description":1679,"org":1680,"tags":1681,"stars":1672,"repoUrl":1673,"updatedAt":1688},"knowledgecatalogdiscoveryagent","knowledge_catalog_discovery_agent","search and rank Knowledge Catalog data entries","Analyzes user queries, extracts relevant predicates, and utilizes Knowledge Catalog Search to find and rank the most relevant data entries. Engages with the user throughout the process.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1682,1683,1684,1687],{"name":1589,"slug":1590,"type":16},{"name":9,"slug":8,"type":16},{"name":1685,"slug":1686,"type":16},"Knowledge Management","knowledge-management",{"name":1670,"slug":1671,"type":16},"2026-07-12T07:38:22.196851",{"slug":1690,"name":1690,"fn":1691,"description":1692,"org":1693,"tags":1694,"stars":1706,"repoUrl":1707,"updatedAt":1708},"contributing","contribute to Cloud Foundation Fabric","End-to-end workflow for contributing to Cloud Foundation Fabric: triaging GitHub issues, proactive feature development, validating with tests and Policy Troubleshooter, and submitting sanitized Pull Requests. Use when addressing a Fabric GitHub issue, developing a module or FAST stage change, or preparing a branch for a pull request.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1695,1698,1699,1702,1703],{"name":1696,"slug":1697,"type":16},"Automation","automation",{"name":1633,"slug":1634,"type":16},{"name":1700,"slug":1701,"type":16},"GitHub","github",{"name":9,"slug":8,"type":16},{"name":1704,"slug":1705,"type":16},"Pull Requests","pull-requests",2062,"https:\u002F\u002Fgithub.com\u002FGoogleCloudPlatform\u002Fcloud-foundation-fabric","2026-07-31T06:23:36.935005",{"slug":1710,"name":1710,"fn":1711,"description":1712,"org":1713,"tags":1714,"stars":1706,"repoUrl":1707,"updatedAt":1722},"fabric-builder","generate Terraform code for Google Cloud","Generates idiomatic Cloud Foundation Fabric (CFF) Terraform code using CFF modules. Use when users ask to create GCP resources, use Fabric modules, or generate Terraform code for Google Cloud.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1715,1716,1719],{"name":9,"slug":8,"type":16},{"name":1717,"slug":1718,"type":16},"Infrastructure as Code","infrastructure-as-code",{"name":1720,"slug":1721,"type":16},"Terraform","terraform","2026-07-12T07:38:23.514555",{"slug":1724,"name":1724,"fn":1725,"description":1726,"org":1727,"tags":1728,"stars":1706,"repoUrl":1707,"updatedAt":1733},"fast-0-org-setup-prereqs","prepare prerequisites for FAST 0-org-setup","Guides the user step-by-step through the prerequisites for the FAST 0-org-setup stage, supporting both Standard GCP and Google Cloud Dedicated (GCD) environments. Use when a user asks to prepare or run prerequisites for 0-org-setup or bootstrap the FAST landing zone.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1729,1730],{"name":9,"slug":8,"type":16},{"name":1731,"slug":1732,"type":16},"Operations","operations","2026-07-12T07:38:28.127148",{"slug":1735,"name":1735,"fn":1736,"description":1737,"org":1738,"tags":1739,"stars":1745,"repoUrl":1746,"updatedAt":1747},"agent-aware-cli","design agent-aware command-line interfaces","Guide for designing and implementing command-line interfaces (CLIs) that are equally usable by human developers and automated coding agents. Use when the user wants to build a CLI, apply CLI best practices, or use Go with Cobra and Viper.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1740,1743,1744],{"name":1741,"slug":1742,"type":16},"CLI","cli",{"name":1633,"slug":1634,"type":16},{"name":9,"slug":8,"type":16},1150,"https:\u002F\u002Fgithub.com\u002FGoogleCloudPlatform\u002Fvertex-ai-creative-studio","2026-07-12T07:39:08.41406",{"slug":1749,"name":1749,"fn":1750,"description":1751,"org":1752,"tags":1753,"stars":1745,"repoUrl":1746,"updatedAt":1764},"build-mcp-genmedia","build and configure GenAI MCP servers","Builds the mcp-genmedia Go MCP servers (nanobanana, veo, lyria, gemini-multimodal, chirp3-hd, avtool) from source and wires them into settings.json. Use this skill whenever the MCP tools are missing or broken — typically at the start of a new session, after a container restart, or when \u002Ftmp has been wiped. The prebuilt binaries in \u002Fworkspace\u002F.local\u002Fbin\u002F have no exec bit and live on a noexec mount; this skill compiles fresh executables into \u002Ftmp\u002Fbin\u002F where execution is allowed.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1754,1757,1758,1761],{"name":1755,"slug":1756,"type":16},"API Development","api-development",{"name":9,"slug":8,"type":16},{"name":1759,"slug":1760,"type":16},"LLM","llm",{"name":1762,"slug":1763,"type":16},"MCP","mcp","2026-07-12T07:39:10.911302",{"slug":1766,"name":1766,"fn":1767,"description":1768,"org":1769,"tags":1770,"stars":1745,"repoUrl":1746,"updatedAt":1781},"genmedia-audio-engineer","synthesize and mix audio content","Expert in audio synthesis, music generation, and mixing. Use when creating podcasts, background scores, or multi-track audio layering using mcp-chirp3-go, mcp-lyria-go, mcp-gemini-go, mcp-nanobanana-go, and mcp-avtool-go.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1771,1774,1777,1778],{"name":1772,"slug":1773,"type":16},"Audio","audio",{"name":1775,"slug":1776,"type":16},"Creative","creative",{"name":9,"slug":8,"type":16},{"name":1779,"slug":1780,"type":16},"Vertex AI","vertex-ai","2026-07-12T07:39:16.623879",{"slug":1783,"name":1783,"fn":1784,"description":1785,"org":1786,"tags":1787,"stars":1745,"repoUrl":1746,"updatedAt":1794},"genmedia-image-artist","generate and edit AI images","Expert in AI image generation and editing. Use when the user needs high-quality textures, character-consistent visuals, or image-to-image editing using mcp-nanobanana-go.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1788,1789,1790,1793],{"name":1775,"slug":1776,"type":16},{"name":9,"slug":8,"type":16},{"name":1791,"slug":1792,"type":16},"Image Generation","image-generation",{"name":1779,"slug":1780,"type":16},"2026-07-12T07:39:15.372822",{"slug":1796,"name":1796,"fn":1797,"description":1798,"org":1799,"tags":1800,"stars":1745,"repoUrl":1746,"updatedAt":1810},"genmedia-producer","produce multi-step media content","Expert media production assistant. Use when requested to help with storyboarding, podcast creation, audio assembly, or complex multi-step media workflows using the GenMedia MCP servers (Veo, Lyria, Gemini TTS, NanoBanana).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1801,1802,1803,1804,1807],{"name":1772,"slug":1773,"type":16},{"name":1775,"slug":1776,"type":16},{"name":9,"slug":8,"type":16},{"name":1805,"slug":1806,"type":16},"Media","media",{"name":1808,"slug":1809,"type":16},"Video","video","2026-07-12T07:39:09.672849",{"slug":1812,"name":1812,"fn":1813,"description":1814,"org":1815,"tags":1816,"stars":1745,"repoUrl":1746,"updatedAt":1820},"genmedia-video-editor","edit and compose video content","Expert in video composition, editing, and format conversion. Use when the user wants to generate high-quality video, overlay images on video, concatenate clips, create GIFs, or sync audio to video using mcp-avtool-go and mcp-veo-go.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1817,1818,1819],{"name":1775,"slug":1776,"type":16},{"name":9,"slug":8,"type":16},{"name":1808,"slug":1809,"type":16},"2026-07-12T07:39:13.749081",{"slug":1822,"name":1822,"fn":1823,"description":1824,"org":1825,"tags":1826,"stars":1745,"repoUrl":1746,"updatedAt":1836},"genmedia-voice-director","generate expressive text-to-speech with Gemini","Expert in casting, directing, and generating expressive text-to-speech using Gemini TTS. Use this when the user needs virtual voice actor personas, expressive speech generation, or multiple variations of a voiceover (like \"take 3 on the bounce\").",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1827,1828,1829,1830,1833],{"name":1772,"slug":1773,"type":16},{"name":1775,"slug":1776,"type":16},{"name":1646,"slug":1647,"type":16},{"name":1831,"slug":1832,"type":16},"Speech","speech",{"name":1834,"slug":1835,"type":16},"Text-to-Speech","text-to-speech","2026-07-12T07:39:17.86673",80]