<?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: Alexander Abakah</title>
    <description>The latest articles on DEV Community by Alexander Abakah (@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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3976962%2Fd180b8d3-6cc3-4476-8d89-6f3a9420e49b.jpg</url>
      <title>DEV Community: Alexander Abakah</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>IntentQL: a semantic compiler for natural-language Postgres analytics</title>
      <dc:creator>Alexander Abakah</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;IntentQL 0.2.4&lt;/strong&gt; - an open-source semantic compiler for natural-language analytics over Postgres.&lt;/p&gt;

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

&lt;p&gt;Most text-to-SQL systems let the model generate executable SQL directly. When something breaks, it's hard to tell whether the failure was language understanding, schema selection, joins, or safety.&lt;/p&gt;

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

&lt;p&gt;IntentQL splits the problem:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Model&lt;/strong&gt; -&amp;gt; lightweight semantic hints (dataset, filters, metrics, etc.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compiler&lt;/strong&gt; -&amp;gt; resolves hints against an allowlisted &lt;code&gt;schema.yaml&lt;/code&gt;, builds a typed &lt;strong&gt;QueryPlan&lt;/strong&gt;, validates it, compiles &lt;strong&gt;parameterized SQL&lt;/strong&gt;
&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 - not 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;intentql
intentql 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;intentql.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;"intentql[memory]"&lt;/span&gt;
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="s2"&gt;"intentql[openai]"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What you get
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Schema allowlisting (&lt;code&gt;schema.yaml&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Typed intermediate representation (QueryPlan)&lt;/li&gt;
&lt;li&gt;Deterministic validation and compilation&lt;/li&gt;
&lt;li&gt;Parameterized Postgres SQL via SQLAlchemy&lt;/li&gt;
&lt;li&gt;Mistral, Ollama, and OpenAI-compatible providers&lt;/li&gt;
&lt;/ul&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/intentql_docs" rel="noopener noreferrer"&gt;https://certifore.github.io/intentql_docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/Certifore/intentql" rel="noopener noreferrer"&gt;https://github.com/Certifore/intentql&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PyPI:&lt;/strong&gt; &lt;a href="https://pypi.org/project/intentql/" rel="noopener noreferrer"&gt;https://pypi.org/project/intentql/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Release:&lt;/strong&gt; &lt;a href="https://github.com/Certifore/intentql/releases/tag/v0.2.4" rel="noopener noreferrer"&gt;https://github.com/Certifore/intentql/releases/tag/v0.2.4&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Licensed under &lt;strong&gt;Apache 2.0&lt;/strong&gt;. Feedback welcome on &lt;a href="https://github.com/Certifore/intentql/discussions" rel="noopener noreferrer"&gt;GitHub Discussions&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you're building NL analytics on Postgres and want the model out of the SQL driver's seat, I'd love your feedback.&lt;/em&gt;&lt;/p&gt;

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