SShortSingh.
Back to feed

RAG With Only Postgres: Vectors, Keyword Search and Fusion in One Database

0
·2 views

A former Oracle DBA describes building a retrieval-augmented generation system using only Azure Database for PostgreSQL Flexible Server, avoiding a separate vector database. The author argues that a second database adds copies of data, sync jobs, extra permissions, and inconsistent backups. The schema stores text, embeddings, a generated full-text column, and metadata in one table, so ingestion and point-in-time restore keep everything consistent. Because vector search handles meaning while keyword search handles exact tokens, the approach combines both using Reciprocal Rank Fusion, implemented as a single SQL function. The author verified the SQL output against a plain Python version with an integration test.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

One QR Code Routes Visitors to Google Play or the App Store

A website owner who offered an "Install with QR" button for apps originally used a Google Play code, but needed a solution once apps launched on iPhone. Rather than presenting users with multiple codes, they chose a single QR code pointing to a short redirect page that detects the visitor's device. The page sends iOS users to the App Store and Android users to Google Play, preserving the referrer parameter so install sources can still be tracked. Visitors who open the page on a computer or without JavaScript see both official store badges instead. The page is marked noindex, and Android-only apps keep a direct Google Play code.

0
ProgrammingDEV Community ·

BeeBuzz: A Student Project Classifying Bee Species by Their Buzz

A developer building BeeBuzz for the ML Zoomcamp 2026 course is creating a classifier that identifies bee species from their buzzing sounds. The project aims to eventually detect when a species disappears from an area, giving beekeepers early warning to move hives before flowers go unpollinated. The current model is trained on 200 lab recordings covering five species and reaches about 80% accuracy on a 40-recording holdout set, with one species performing notably weaker. The author cautions that confidence scores are overconfident and that a perfect score on buzz-type classification stems from a recording artifact rather than biology. Field testing in real-world noisy conditions is planned as the next step.

0
ProgrammingDEV Community ·

Developer Generates App Store Screenshots With Robolectric and Headless Browser, No Phone Needed

A developer building iPhone apps written in Compose needed App Store screenshots at 1206x2622 pixels but had no iPhone and limited cloud build minutes, so they used unit tests instead. Robolectric renders Compose to a bitmap on the desktop JVM, and Roborazzi saves it as a PNG, with a qualifier setting a 402 by 874 dp screen at xxhdpi. To mimic the iPhone safe area, the test adds top padding for the Dynamic Island and bottom padding for the home indicator, and the Coil FakeImageLoaderEngine supplies real images and frozen feed data in place of network content. Because Robolectric does not draw WebViews, the article pages are rendered separately in headless Edge inside a 402-pixel iframe and composited beneath the Compose app bar by a Python script. The approach required a small preview parameter in the app code to avoid a polling loop that would block the test framework from going idle.

0
ProgrammingDEV Community ·

Debugging an iPhone from Windows over USB with Python and Apple's driver

A developer describes how to take screenshots and read logs from an iPhone running iOS 15.8 on Windows, using Apple's Devices app driver and the open source pymobiledevice3 Python tool. The setup required opening the Apple Devices app with the phone unlocked and trusted, and invoking Python through the py launcher to avoid an outdated Python 2.7 install. The method helped diagnose a missing ad banner in a game, where a log line revealed the ad server had no ad to fill. The author advises filtering logs by process name and writing them to a file for searching, since unfiltered output is very large. Users are reminded to accept the Trust prompt only on machines they own.