SShortSingh.
Back to feed

Lessons From Building a Small RAG Chatbot That Answers From Your Own Documents

0
·13 views

A developer built a Retrieval-Augmented Generation system during an internship at Valentius Kryptix to test whether a language model improves when it reads user documents first. The system retrieves relevant passages from two documents of about 9,000 words, split into roughly 2,000-character overlapping chunks stored in a local Chroma database, and passes them to Gemini with the question. In a single test about a prompt engineering report, the plain model said it had no access to the file, while the RAG version retrieved the correct passage and gave the right answer. The author highlights three lessons: chunking involves trade-offs between noise and lost context, retrieval quality should be checked before blaming the model, and clear instructions to answer only from context improve trust. The author notes the project is small and tested only once per question, with plans to explore re-ranking and chunk sizes next.

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 ·

Independent test finds 8 of 16 USB Coding Expert demo snippets run, the other 8 fail

A developer ran all 16 code snippets produced by the demo generator for USB Coding Expert, a WorkflowAlpha product. Eight snippets, covering the reverse, file and HTTP presets in Python, JavaScript and Bash, executed and returned the expected output. The remaining eight failed in three ways: the Python token preset returned Solidity syntax, the JavaScript token preset needed an uninstalled web3 dependency, and the Bash token preset required solc and geth, which were absent on a standard host. The four Solidity snippets could not be verified because no Solidity runtime was tested. The author notes the demo is a real, runnable code table, but says its marketing overstates what it does and omits the required toolchains.

0
ProgrammingDEV Community ·

Developer builds in-browser GIF upscaler, fixing halo artifacts and pixel art issues

A developer who runs a video tools site extended their WebGPU video upscaler into a browser-based animated GIF upscaler. They wrote a custom GIF decoder in TypeScript instead of relying on ImageDecoder, which lacks broad browser support and clamps short frame delays. Transparent pixels in GIFs store dark RGB values that caused dark halos when upscaled, so the developer fills those pixels with colors from opaque neighbors before processing. Alpha is handled separately with bilinear sampling and a 50% threshold to keep edges smooth. For pixel art, a nearest-neighbor mode at whole-number scales from 2x to 8x preserves hard edges and exact colors.

0
ProgrammingDEV Community ·

Three Years of Self-Hosting: What Worked and What Wasted Time

A developer shares a candid three-year account of self-hosting, drawing on personal experience rather than offering a tutorial. They favor free-tier services like Cloudflare Pages, Workers, and D1 for small projects, noting a subrequest limit that tripped up an early health checker. The author found a larger VPS unnecessary and suggests upgrading only once utilization stays above 70 percent. Kubernetes was judged too costly to learn for a small homelab, with Docker Compose, backups, and Uptime Kuma delivering most of the benefit. The piece also covers outsourcing email deliverability and buying domains only after a live page exists.

0
ProgrammingDEV Community ·

Node Core OS byLAEV Proposes Verifiable, Person-First Digital Identity

Developer Lerry Alexander Elizondo Villalobos outlines Node Core OS byLAEV, a project whose foundation is personal human identity. He argues that cryptographic keys, identity documents, and institutional statements should not be equated with the person or treated as infallible. The proposed method starts from first principles and turns ideas into verifiable rules and reproducible tests. A peer-to-peer network would let nodes cross-check evidence rather than defer to institutional authority or majority opinion. An initial stage would focus on demonstrating the identity core's functionality and transparency, with zero-knowledge proofs considered later for privacy-preserving verification.