Skip to main content
Open

Make Software Factory metadata available to AI so I can generate SQL templates from my IDE

Related products:Software Factory
  • December 10, 2025
  • 2 replies
  • 85 views

Robert Jan de Nie
Thinkwise blogger
Forum|alt.badge.img+6

I want to use generative AI to draft the bulk of my SQL templates, directly from my own IDE (e.g., VS Code) together with tools like GitHub Copilot. For this to work reliably, the AI needs first-class context from the Thinkwise Software Factory (SF): the application’s model metadata and relevant UI information. The SF already maintains a rich, structured model of tables, columns, and references; exposing that to the AI is the missing piece.

Why this metadata is essential for AI-assisted SQL When the AI understands my model, its output stops being generic and becomes project-specific:

  • Tables, columns, PK/FKs – enable correct JOINs, WHERE clauses, and integrity-awareness. The SF’s data model explicitly defines these entities and relations, which the AI can use to pick the right join keys, respect cardinalities, and avoid hallucinated columns.
  • Domains (user-defined data types) – domains act as abstract data types that drive constraints and UI defaults. Sharing domains helps the AI choose correct data types, casts, default values, and validation logic in generated SQL.
  • UI semantics – properties like control type or visibility can guide the AI to prefer filtered queries (e.g., hide inactive rows by default) or to shape parameter prompts and WHERE clauses that match what end-users actually see.
  • Template description & intent – short, descriptive text per template (purpose, invariants, edge cases) gives the AI the business intent it needs to generate more accurate and consistent code.

How I propose to make this work 

  • Expose a compact model export for use in VS Code
    • MVP scope: tables, columns (incl. nullability), primary keys, foreign keys, domains (name, base type, constraints).
    • Optional scope: UI hints (visibility, control), default filters, and template descriptions.
    • Delivery options (any of these would work):
      • Indicium OData endpoint that surfaces a read-only view of the SF model (Indicium already provides an open API and can expose SF branches when configured).
      • CLI/export task that writes JSON files into a repository (consumed by VS Code).
      • VS Code extension that authenticates to the endpoint and injects the model as inline context for Copilot prompts.
  • Use the model export as AI context in the IDE
    • In VS Code, I want to select a template and have the AI read the JSON/endpoint to generate the initial SQL ready for review and refinement.

Expected results

  • Speed: AI drafts 70–90% of the SQL, I focus on edge cases.
  • Quality: Consistent use of keys, domains, and defaults; fewer “missing join” or “wrong column” errors.
  • Discoverability: As Thinkwise continues to add AI-powered features (e.g., model enrichments and support for storing LLM embeddings), a model-aware export aligns with that trajectory.
  • Future fit: Community use cases already show value in combining Thinkwise models with LLMs (e.g., natural-language search using embeddings), reinforcing the need for structured model access.

 

2 replies

Arie V
Community Manager
Forum|alt.badge.img+12
  • Community Manager
  • December 12, 2025
NewOpen

Arie V
Community Manager
Forum|alt.badge.img+12
  • Community Manager
  • February 19, 2026

The following idea has been merged into this idea:

All the votes have been transferred into this idea. Some context from the merged Idea:

Interesting feature! I do see the potential added value and indeed most likely the relevant information is (or could already be) available from the Software Factory. 

One disadvantage of this approach is that it’s Database technology-specific, while we support multiple Database technologies.

Note that we’re experimenting with MCP server support, so I can imagine that to be the direction we’re more likely to go when it comes to implementation of that Idea.