frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: ShapedQL – A SQL engine for multi-stage ranking and RAG

https://playground.shaped.ai
29•tullie•2d ago
Hi HN,

I’m Tullie, founder of Shaped. Previously, I was a researcher at Meta AI, worked on ranking for Instagram Reels, and was a contributor to PyTorch Lightning.

We built ShapedQL because we noticed that while retrieval (finding 1,000 items) has been commoditized by vector DBs, ranking (finding the best 10 items) is still an infrastructure problem.

To build a decent for you feed or a RAG system with long-term memory, you usually have to put together a vector DB (Pinecone/Milvus), a feature store (Redis), an inference service, and thousands of lines of Python to handle business logic and reranking.

We built an engine that consolidates this into a single SQL dialect. It compiles declarative queries into high-performance, multi-stage ranking pipelines.

HOW IT WORKS:

Instead of just SELECT , ShapedQL operates in four stages native to recommendation systems:

RETRIEVE: Fetch candidates via Hybrid Search (Keywords + Vectors) or Collaborative Filtering. FILTER: Apply hard constraints (e.g., "inventory > 0"). SCORE: Rank results using real-time models (e.g., p(click) or p(relevance)). REORDER: Apply diversity logic so your Agent/User doesn’t see 10 nearly identical results.

THE SYNTAX: Here is what a RAG query looks like. This replaces about 500 lines of standard Python/LangChain code:

SELECT item_id, description, price

FROM

  -- Retrieval: Hybrid search across multiple indexes

  search_flights("$param.user_prompt", "$param.context"),

  search_hotels("$param.user_prompt", "$param.context")
WHERE

  -- Filtering: Hard business constraints

  price <= "$param.budget" AND is_available("$param.dates")
ORDER BY

  -- Scoring: Real-time reranking (Personalization + Relevance)

  0.5 * preference_score(user, item) +

  0.3 * relevance_score(item, "$param.user_prompt")
LIMIT 20

If you don’t like SQL, you can also use our Python and Typescript SDKs. I’d love to know what you think of the syntax and the abstraction layer!

Comments

thorax•1h ago
RE: syntax For casual use, I kinda always liked the whole MATCH/AGAINST syntax for old school Innodb, though obviously things have changed a lot since those days. But it felt less like calling embedded functions and more like extending SQL’s grammar.

Regarding the rest, it seems like a reasonable approach at first tinker.

refset•1h ago
Neat examples, and I agree that extending SQL like this has real potential. Another project along very similar lines is https://github.com/ryrobes/larsql
alexpadula•30m ago
Fairly easy to extend SQLite, Postgres and MariaDB/MySQL!

Curious what relational database do you @refset use? Is the code open source? Is the engine from scratch? What general dialect does it support?

Cheers!

refset•15m ago
I work on https://github.com/xtdb/xtdb which is broadly Postgres-compatible with a few key SQL extensions (SQL:2011 bitemporal tables + immutability, first-class nested data, pipeline syntax, etc). Built on Arrow and the JVM but is otherwise mostly from scratch.

XTDB is perhaps not directly relevant to the topic at hand, but I am a firm believer that ML workflows can benefit from robust temporal modelling.

jiwidi•36m ago
Great potential! Love the idea
hrimfaxi•31m ago
If I upload my own data, who exactly is it shared with? I can't find a list of subprocessors and this line in the privacy policy is alarming:

> We’ll whenever feasible ask for your consent before using your Personal information for a purpose that isn’t covered in this Privacy Policy.

mritchie712•31m ago
this is cool, but:

> This replaces about 500 lines of standard Python

isn't really a selling point when an LLM can do it in a few seconds. I think you'd be better off pitching simpler infra and better performance (if that's true).

i.e. why should I use this instead of turbopuffer? The answer of "write a little less code" is not compelling.

pickleballcourt•29m ago
Is there a major difference between pgvector and shapedql?
JacobiX•14m ago
>> Apply diversity logic so your Agent/User doesn’t see 10 nearly identical results

On Instagram this is a good thing, but here the example is hotel and flight search, where a more deterministic result is preferable.

In the retrieve → filter stage, using predicate pushdown may be more performant: first filter using hard constraints, then apply hybrid search ?

Show HN: ShapedQL – A SQL engine for multi-stage ranking and RAG

https://playground.shaped.ai
29•tullie•2d ago•9 comments

Show HN: GLinksWWW – A lightweight browser with 9 independent clipboards

2•RioBurhan•18m ago•1 comments

Show HN: A MitM proxy to see what your LLM tools are sending

https://github.com/jmuncor/sherlock
199•jmuncor•20h ago•102 comments

Show HN: I made a new compression algorithm

https://github.com/BrowserBox/LZW-X
3•keepamovin•2h ago•6 comments

Show HN: Externalized Properties, a modern Java configuration library

https://github.com/joel-jeremy/externalized-properties
9•jeyjeyemem•2d ago•3 comments

Show HN: LinuxWhisper – A native AI voice assistant for Linux (Groq/GTK)

https://github.com/Dianjeol/LinuxWhisper
2•LinuxWhisper•3h ago•0 comments

Show HN: Shelvy Books

https://shelvybooks.com
39•tekkie00•13h ago•15 comments

Show HN: Dwm.tmux – a dwm-inspired window manager for tmux

https://github.com/saysjonathan/dwm.tmux
96•saysjonathan•5d ago•17 comments

Show HN: SHDL – A minimal hardware description language built from logic gates

https://github.com/rafa-rrayes/SHDL
41•rafa_rrayes•1d ago•19 comments

Show HN: An Open Source Alternative to Vercel/Render/Netlify

https://www.shorlabs.com/
16•thirdavenue•4h ago•1 comments

Show HN: Pinecone Explorer – Desktop GUI for the Pinecone vector database

https://www.pinecone-explorer.com
18•arsentjev•1d ago•2 comments

Show HN: The HN Arcade

https://andrewgy8.github.io/hnarcade/
328•yuppiepuppie•1d ago•107 comments

Show HN: Build Web Automations via Demonstration

https://www.notte.cc/launch-week-i/demonstrate-mode
30•ogandreakiro•2d ago•20 comments

Show HN: I built a small browser engine from scratch in C++

https://github.com/beginner-jhj/mini_browser
139•crediblejhj•1d ago•44 comments

Show HN: Cursor for Userscripts

https://github.com/chebykinn/browser-code
54•mifydev•19h ago•15 comments

Show HN: LemonSlice – Upgrade your voice agents to real-time video

120•lcolucci•1d ago•125 comments

Show HN: Cua-Bench – a benchmark for AI agents in GUI environments

https://github.com/trycua/cua
36•someguy101010•2d ago•8 comments

Show HN: ZK Visualizer – I built this while learning zero-knowledge proofs

https://www.zkvisualizer.com/
4•zkenthusiast•6h ago•0 comments

Show HN: One Human + One Agent = One Browser From Scratch in 20K LOC

https://emsh.cat/one-human-one-agent-one-browser/
313•embedding-shape•2d ago•147 comments

Show HN: TheBaduk – A Go/Baduk Platform Built with Vanilla JavaScript

https://thebaduk.com
3•bugon•7h ago•0 comments

Show HN: Extracting React apps from Figma Make's undocumented binary format

https://albertsikkema.com/ai/development/tools/reverse-engineering/2026/01/23/reverse-engineering...
55•albertsikkema•6d ago•24 comments

Show HN: Config manager for Claude Code (and others) – rules, MCPs, permissions

https://github.com/regression-io/coder-config
18•jtr101•23h ago•0 comments

Show HN: We Built the 1. EU-Sovereignty Audit for Websites

https://lightwaves.io/en/eu-audit/
102•cmkr•2d ago•87 comments

Show HN: Fuzzy Studio – Apply live effects to videos/camera

https://fuzzy.ulyssepence.com/
53•ulyssepence•1d ago•20 comments

Show HN: I wrapped the Zorks with an LLM

https://infocom.tambo.co/
109•alecf•1d ago•57 comments

Show HN: Codex.nvim – Codex inside Neovim (no API key required)

https://github.com/ishiooon/codex.nvim
3•ishiooon•8h ago•0 comments

Show HN: Sandbox Agent SDK – unified API for automating coding agents

https://github.com/rivet-dev/sandbox-agent
20•NathanFlurry•1d ago•0 comments

Show HN: Lendy – Keep track of books you have lended

https://lendy.viraat.dev/
8•viraatdas•1d ago•6 comments

Show HN: WordRE, Wordle for Real Estate

https://reidsherman.com/wordre/
7•reidjs•1d ago•0 comments

Show HN: Record and share your coding sessions with CodeMic

https://codemic.io/#
12•seansh•1d ago•2 comments