itrummer
Try AI Operators on PostgreSQL
In general, when using LLMs, there are no formal guarantees on output quality anymore (but the same applies when using, e.g., human crowd workers for comparable tasks like image classification etc.).
Having said that, we did some experiments evaluating output accuracy for a prior version of ThalamusDB and the results are here: https://dl.acm.org/doi/pdf/10.1145/3654989 We will actually publish more results with the new version within the next few months as well. But, again, no formal guarantees.
It's less applicable if the answer cannot be extracted from a small data subset. E.g., you want to count the number of pictures showing red cars in your database (rather than retrieving a few pictures of red cars). Or, let's say you want to tag beach holiday pictures with all the people who appear in them. That's another scenario where you cannot easily work with RAG. ThalamusDB supports such scenarios, e.g., you could use the query below in ThalamusDB:
SELECT H.pic FROM HolidayPictures H, ProfilePictures P as Tag WHERE NLFILTER(H.pic, 'this is a picture of the beach') AND NLJOIN(H.pic, P.pic, 'the same person appears in both pictures');
ThalamusDB handles scenarios where the LLM has to look at large data sets and uses a few techniques to make that more efficient. E.g., see here (https://arxiv.org/abs/2510.08489) for the implementation of the semantic join algorithm.
A few other things to consider:
1) ThalamusDB supports SQL with semantic operators. Lay users may prefer the natural language query interfaces offered by other frameworks. But people who are familiar with SQL might prefer writing SQL-style queries for maximum precision.
2) ThalamusDB offers various ways to restrict the per-query processing overheads, e.g., time and token limits. If the limit is reached, it actually returns a partial result (e.g., lower and upper bounds for query aggregates, subsets of result rows ...). Other frameworks do not return anything useful if query processing is interrupted before it's complete.
Show HN: SQL with AI Operators on Text, Images, and Sound Files
https://github.com/itrummer/thalamusdb
ThalamusDB is a semantic query processing engine that processes SQL queries with AI operators, e.g.:SELECT COUNT(*) FROM Cars WHERE NLfilter(Cars.pic, 'this is a red car');SELECT H.pic FROM HolidayPictures H, ProfilePictures P WHERE P.name in ('Alice', 'Bob') AND NLFILTER(H.pic, 'a picture of the beach') AND NLJOIN(H.pic, P.pic, 'the same person appears in both pictures');Simply store paths of...
ThalamusDB: Query text, tables, images, and audio
From Data to Reports – Instantly with AI
SQL processing over images, text, and audio
I think the problem is the following: until you buy the book, you'll only see every fourth page or so in the chapter preview. Not my choice, that's the standard approach by the publisher. I assume that's why you see incomplete sentences at the beginning and end of each page ...
It's a gentle introduction to analyzing various data types (e.g., text, video, audio, and tables) using LLMs and Python. Most of the code samples use OpenAI's GPT-4 Omni model but other providers are discussed as well. Also broaches issues like fine-tuning, cost optimization, LLM-based agents, and the LangChain framework.
Feedback is welcome. Thank you all!