SShortSingh.
0
ProgrammingDEV Community ·

Developer Guide: Building a RAG System from Scratch Using pgvector and Gemini

A new multi-part technical guide published on DEV Community walks developers through building a Retrieval-Augmented Generation (RAG) system from the ground up using pgvector and Google's Gemini API. RAG is a design pattern that retrieves relevant documents at runtime and injects them into an LLM's context, allowing the model to answer questions about data it was never trained on. The guide uses pgvector, a PostgreSQL extension, to store and search text embeddings via cosine similarity, enabling semantic rather than keyword-based document retrieval. Planned across six steps, the series will progress from core RAG implementation to tool use, AI agents, MCP server setup, and cloud deployment on Render and Supabase. The guide targets Python developers new to AI application development who want hands-on experience from local setup through production deployment.

0
ProgrammingDEV Community ·

Why a Slight Delay in Museum Exhibits Makes Visitors Stay Longer

Interactive museum exhibits that respond instantly often lose visitor attention quickly, because users immediately recognize them as mechanical systems. Design analysts and experience researchers suggest that a deliberate delay of 0.3 to 2 seconds between sensing a visitor and providing feedback creates a sense of the system 'deciding,' which triggers curiosity. This principle draws on game design theory, including observations about Super Mario's question blocks, where anticipated but uncertain rewards keep players engaged. A case study contrasts a touch wall that responded instantly and was abandoned within 15 minutes against an 'emotion wall' that paused before revealing a personalized color, with the latter holding visitors' attention far longer. The core design insight is that layered, unpredictable feedback — rather than immediate, uniform responses — makes people feel the space acknowledges them as individuals.

0
ProgrammingDEV Community ·

AI Agents Can Now Write and Reuse Their Own SKILL.md Instruction Files

A new open standard called Agent Skills, introduced by Anthropic in October 2025 and published at agentskills.io in December 2025, allows AI agents to learn tasks via simple Markdown files called SKILL.md stored in named folders. Each skill file requires only a name and a short description, making it compatible with over 30 agent tools including Claude Code, Cursor, and GitHub Copilot. To manage memory efficiently, full skill instructions are only loaded when a task matches, keeping context usage minimal even across large skill libraries. A developer demo showed that this staged loading approach reduced token usage by roughly 63 percent compared to loading all skills at once. Emerging 2026 research, including projects like MUSE-Autoskill and Memento-Skills, is pushing the concept further by enabling agents to automatically generate, refine, and store their own skills over time.

0
ProgrammingDEV Community ·

Tamper-Proof Receipts Could Be the Key to Auditing AI Agent Actions

As AI agents gain the ability to perform high-stakes tasks like issuing refunds or calling production APIs, relying on editable logs is no longer a sufficient safeguard. A developer has built a demo system where an AI agent generates a cryptographically signed, tamper-evident receipt after each task, proving it followed pre-approved rules. The approach chains each action step using hashing so that any alteration — whether to the rules, a step, or the signature — causes verification to fail. The technique draws on a broader research concept called verifiable agent behavior, or zkML, which aims to let third parties audit an agent's conduct without re-running it or exposing private data. The demo, built in roughly 120 lines of standard cryptography code, is publicly available on GitHub and requires no API key to run.

0
ProgrammingDEV Community ·

Developer builds self-validating Claude Code plugin that auto-discards ineffective memory rules

A developer has released token-warden, an open-source MIT-licensed plugin for Claude Code that only retains agent memory rules if they demonstrably save tokens. The tool monitors Claude Code sessions, extracts candidate efficiency rules from costly interactions, and benchmarks each rule against a frozen test suite to verify it saves at least twice the tokens it costs to store. Rules that fail the threshold are automatically discarded, including one case where an apparent 38,000-token saving was rejected because it stemmed from the agent abandoning its task rather than working efficiently. In a real-world test on a wasteful agent, a rule instructing the model to search for a symbol before reading an entire file reduced session token usage from roughly 67,000 to 56,000, a 16% cut worth about three cents per session. The project is available on GitHub and the developer is inviting public testing and scrutiny of the reported figures.

0
ProgrammingDEV Community ·

What Actually Makes an AI Agent Work: Planning, Memory, and Verification

AI agents are not magic — they are software workflows where a language model selects the next step and calls external tools, with their reliability depending entirely on the orchestration around the model. Every functional agent relies on five core components: planning, tool use, memory, constraints, and verification. A key insight is that models select tools based on their descriptions rather than their names, making precise, detailed tool documentation critical to avoiding incorrect or hallucinated tool calls. Strict input validation using JSON schemas helps catch and correct bad tool calls mid-loop before they cause downstream failures. Understanding these mechanics is essential for developers building agents that interact with real systems like databases or file systems.

0
ProgrammingHacker News ·

Dev builds procedurally generated constellation puzzle game inspired by Dragon Age

A hobbyist game developer created Starglyphs, a space-themed puzzle game inspired by the astraium minigame from Dragon Age: Inquisition. The game challenges players to trace star patterns based on Euler path logic, ensuring every puzzle is mathematically solvable. The developer built a procedural generation system so that puzzles are always completable, wrapping it in a colorful visual aesthetic. Starglyphs is currently available to play in a web browser, with Steam and mobile versions in development.

0
ProgrammingDEV Community ·

Go Terminal IDE Gains Playwright-Style Testing System to Let AI Agents Drive the UI

A developer building TTT, a terminal-based IDE written in Go, faced a core limitation: AI coding assistant Claude Code could run shell commands but had no way to interact with a live terminal UI session. To solve this, the developer extended TTT's existing Lua plugin system with functions for simulating clicks, capturing screenshots, and dumping internal editor state to files Claude could read. A CLI flag was also added to run scripted command sequences directly, enabling quick interaction tests without writing full Lua scripts. The approach mirrors how Playwright automates web browsers, but applied entirely within a terminal environment. The result is a built-in scripted interaction harness that allows both AI agents and human developers to drive and verify editor behavior in a reproducible way.

0
ProgrammingDEV Community ·

Developer Launches Softchic, a Premium Template Marketplace Built on Next.js 14

A developer known as Delight has begun building Softchic, a premium website template and ready-made site marketplace targeting developers and businesses. The platform is being built using Next.js 14, TypeScript, Tailwind CSS v4, and shadcn/ui components, with payments handled via Lemon Squeezy and Paystack. In its first week, the project has completed a waitlist page, responsive navbar, email capture form, brand identity, and payment architecture. The founder aims to attract 200 waitlist subscribers before officially opening the store, with a planned launch window of July 18–20, 2026. A product listing page, template preview system, and a first SaaS landing page template are among the next milestones planned.

0
ProgrammingHacker News ·

Michigan's $1.8B Economic Development Spend Yielded Only 602 Jobs

Michigan spent $1.8 billion in economic development funds but managed to create only 602 jobs, raising serious questions about the efficiency of the state's spending. The figures suggest a cost of roughly $3 million per job created, far exceeding typical benchmarks for public investment returns. The report has drawn attention to how the state allocates taxpayer money toward job creation initiatives. Critics are likely to scrutinize the programs responsible for the spending and demand greater accountability. The findings underscore a broader debate about the effectiveness of government-led economic development efforts.

0
ProgrammingDEV Community ·

Active Inference Technique Lets AI Agents Develop Curiosity Without Explicit Programming

A developer built a small AI agent using active inference, a brain-inspired approach where the agent tries to minimize surprise rather than simply chase rewards. Unlike conventional reward-seeking agents, this agent independently chooses to gather information before acting, because uncertainty itself carries a cost in its decision-making. In a simple door-choice task where a hint reveals the correct answer, the active inference agent achieved 100% success compared to 48% for a standard reward-chasing agent across 400 attempts. The agent was never instructed to check the hint — it did so because resolving uncertainty was inherently valuable to its goal. The developer notes this approach could address a longstanding AI challenge of getting agents to explore new situations without manually programming exploration incentives.

0
ProgrammingDEV Community ·

Developer Uses Classic Child Psychology Test to Show AI Agents Need Theory of Mind

Software engineer Shridhar Shah built two AI agents to demonstrate how 'theory of mind' — the ability to track what others believe versus what is actually true — affects agent performance. The experiment is based on the Sally-Anne false-belief test, a well-known child psychology benchmark in which children must distinguish their own knowledge from another person's mistaken belief. Shah's first agent, which only tracks objective reality, incorrectly predicts where Sally will look for a moved marble, mirroring the reasoning of a three-year-old. His second agent maintains separate belief states for each person, updating them only when that person is present to witness an event, allowing it to answer correctly. Shah argues this capability is foundational for AI agents working collaboratively with humans or other agents, enabling better task delegation, targeted explanations, and fewer faulty assumptions.

0
ProgrammingDEV Community ·

AI Agent With 'Sleep' Phase Achieves 100% Recall vs 75% Without It

A developer has built a 90-line demo showing that an AI agent programmed to undergo a sleep-like memory consolidation phase significantly outperforms one that does not. Inspired by 2026 research exploring offline processing for language models, the experiment simulates 30 days of noisy data input where roughly one in five facts is intentionally incorrect. The sleeping agent reviews and tallies each day's raw notes into a compact long-term summary before clearing the log, allowing it to outvote occasional bad data over time. In contrast, the no-sleep agent retains only the last ten messages, causing older information to be lost and making it vulnerable to recent misinformation. The project argues that tidier, consolidated memory is a more efficient solution to AI recall limitations than simply expanding context windows.

0
ProgrammingDEV Community ·

Developer Builds Tiny Self-Improving AI Agent in 150 Lines, No API Needed

A developer has built a miniature self-rewriting AI agent inspired by the 2025 Darwin Gödel Machine research, which replaces the need for mathematical proof of improvement with a simple test-and-keep loop. The program starts with a single skill and autonomously writes new functions to fix failing tasks, retaining changes only when test scores improve. Running entirely on a laptop in under a second without any API key, the agent progressed from solving 1 out of 8 tasks to a perfect 8 out of 8 on its own. The project is built around roughly 150 lines of code and three core components: a skill library, a verifiable test suite, and an iterative self-improvement loop. The original Darwin Gödel Machine paper demonstrated a similar approach that lifted an AI coding assistant's benchmark performance from 20% to 50% on real-world GitHub issues.

0
ProgrammingDEV Community ·

GitHub Repo Drops Undisclosed Zero-Days; OpenZL and Reddit Spam Defenses Spotlighted

A GitHub repository called 'exploitarium' has been mass-releasing undisclosed zero-day exploits with proof-of-concept code for vulnerabilities not yet patched by vendors, raising urgent concerns for the security community. Separately, an open-source project named OpenZL has launched to make Zero-Knowledge Proofs more accessible to developers building privacy-preserving and zero-trust applications. The library provides tools and primitives supporting use cases such as private authentication, confidential transactions, and verifiable computation. In a third development, a detailed blog post has revealed the inner workings of Reddit's anti-spam architecture, covering machine learning models, heuristics, rate limiting, and user behavior analysis. Together, these highlights reflect growing activity across offensive security disclosure, cryptographic privacy tooling, and large-scale platform defense engineering.

0
ProgrammingDEV Community ·

AI scheduler showed green status for days while producing zero output

A developer running a self-maintaining AI system discovered that a scheduled routine had been silently failing for days, despite the scheduler logging successful runs with timestamps. The job was terminating early after failing to read a memory file that did not yet exist, and never reaching the step where it would write any output. No errors or alerts were triggered, leaving dashboards showing a false green status throughout. The developer identified the issue only by checking the disk directly and reading the raw run transcript rather than the summarised log. The fix was straightforward: restructure the routine to write its output file first, before any step that could fail.

0
ProgrammingHacker News ·

GLP-1 drugs like Ozempic linked to weight loss and reduced depression in mice

A new study has found that GLP-1 receptor agonists, the class of drugs that includes Ozempic, produced weight loss and reversed depression-like behavior in mice. The research focuses on the gut-brain axis, the communication pathway between the digestive system and the brain. Scientists believe these drugs may influence mood and mental health by altering gut microbiome signals sent to the brain. The findings add to growing interest in GLP-1 medications beyond their established roles in treating obesity and type 2 diabetes. However, the results are currently limited to animal models, and further research is needed to confirm similar effects in humans.

0
WorldBBC World ·

Budapest Holds First Pride March After End of Orban's 16-Year Rule

Budapest hosted its first Pride march following the conclusion of Viktor Orban's 16-year tenure as prime minister. Thousands of people gathered in the Hungarian capital to take part in the celebrations. The event marked a symbolic moment for the LGBTQ+ community in Hungary after years under Orban's conservative government. The march was seen as a significant milestone given the political shift in the country.

← NewerPage 28 of 80Older →