<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Alex</title>
    <description>The latest articles on DEV Community by Alex (@alexander_abakah_205cc567).</description>
    <link>https://dev.to/alexander_abakah_205cc567</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3976962%2F1a3730c3-8f25-4dba-8be4-bbd5a54a0c1d.png</url>
      <title>DEV Community: Alex</title>
      <link>https://dev.to/alexander_abakah_205cc567</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alexander_abakah_205cc567"/>
    <language>en</language>
    <item>
      <title>GroundedQL: a semantic compiler for natural-language Postgres analytics</title>
      <dc:creator>Alex</dc:creator>
      <pubDate>Wed, 10 Jun 2026 05:30:44 +0000</pubDate>
      <link>https://dev.to/alexander_abakah_205cc567/intentql-a-semantic-compiler-for-natural-language-postgres-analytics-184f</link>
      <guid>https://dev.to/alexander_abakah_205cc567/intentql-a-semantic-compiler-for-natural-language-postgres-analytics-184f</guid>
      <description>&lt;p&gt;I just released &lt;strong&gt;GroundedQL 0.3.0&lt;/strong&gt;, an open-source semantic compiler for reliable natural-language analytics over Postgres.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;Most text-to-SQL systems allow a language model to generate executable SQL directly. When a query fails, it can be difficult to determine whether the problem came from language interpretation, schema selection, joins, SQL generation, or safety.&lt;/p&gt;

&lt;h2&gt;
  
  
  The approach
&lt;/h2&gt;

&lt;p&gt;GroundedQL separates interpretation from execution:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Model&lt;/strong&gt; → proposes lightweight semantic hints such as datasets, filters, dimensions, and metrics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compiler&lt;/strong&gt; → resolves those hints against an allowlisted &lt;code&gt;schema.yaml&lt;/code&gt;, builds and validates a typed &lt;code&gt;QueryPlan&lt;/code&gt;, then compiles parameterized SQL&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The model interprets language. The compiler owns execution.&lt;/p&gt;

&lt;p&gt;Filter values become bind parameters rather than string-concatenated SQL.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick start
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;groundedql
groundedql init &lt;span class="nt"&gt;--db&lt;/span&gt; &lt;span class="s2"&gt;"postgresql://user:pass@host/db"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;sqlalchemy&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;create_engine&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;groundedql.agent&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;QueryAgent&lt;/span&gt;

&lt;span class="n"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;QueryAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;engine&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;create_engine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;postgresql+psycopg2://user:pass@host/db&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;schema_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;config/schema.yaml&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;llm&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;mistral&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Which customers placed the most orders last year?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;rows&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sql&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Optional extras:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="s2"&gt;"groundedql[memory]"&lt;/span&gt;
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="s2"&gt;"groundedql[openai]"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What GroundedQL provides
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Schema allowlisting through &lt;code&gt;schema.yaml&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;A typed intermediate representation called &lt;code&gt;QueryPlan&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Deterministic validation and SQL compilation&lt;/li&gt;
&lt;li&gt;Parameterized Postgres SQL through SQLAlchemy&lt;/li&gt;
&lt;li&gt;Support for Mistral, Ollama, and OpenAI-compatible providers&lt;/li&gt;
&lt;li&gt;Inspectable plans that can be tested independently of the model&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GroundedQL is licensed under &lt;strong&gt;Apache License 2.0&lt;/strong&gt;. Contributions, feedback, and real-world testing are welcome.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Documentation:&lt;/strong&gt; &lt;a href="https://certifore.github.io/groundedql_docs/" rel="noopener noreferrer"&gt;https://certifore.github.io/groundedql_docs/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/Certifore/groundedql" rel="noopener noreferrer"&gt;https://github.com/Certifore/groundedql&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PyPI:&lt;/strong&gt; &lt;a href="https://pypi.org/project/groundedql/" rel="noopener noreferrer"&gt;https://pypi.org/project/groundedql/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Release:&lt;/strong&gt; &lt;a href="https://github.com/Certifore/groundedql/releases/tag/v0.3.0" rel="noopener noreferrer"&gt;https://github.com/Certifore/groundedql/releases/tag/v0.3.0&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Discussions:&lt;/strong&gt; &lt;a href="https://github.com/Certifore/groundedql/discussions" rel="noopener noreferrer"&gt;https://github.com/Certifore/groundedql/discussions&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are building natural-language analytics over Postgres and want the model out of the SQL driver's seat, I would love your feedback.&lt;/p&gt;

</description>
      <category>python</category>
      <category>postgres</category>
      <category>opensource</category>
      <category>llm</category>
    </item>
  </channel>
</rss>
