SShortSingh.
Back to feed

Developer tests 13 RAG techniques on 46,000 chunks; only four meaningfully improved retrieval

0
·3 views

A software developer built a retrieval-augmented generation (RAG) system over 62 ancient-history books, totalling roughly 46,000 chunks, and evaluated 13 popular retrieval techniques against a fixed 161-question test set. Starting from a baseline recall@5 of 35.2%, the experiment found that upgrading the embedding model and adding contextual chunk notes each delivered gains of around 18 points, while most other widely recommended techniques showed little or no improvement. Hybrid BM25 search produced zero gains over dense retrieval alone, and HyDE actually hurt performance by nearly 10 points. The author argues that techniques operating at the same pipeline stage tend to compete rather than compound, making careful measurement on one's own corpus essential. A key practical finding was that ingest-time improvements offer better long-term value than query-time techniques, which add latency and token costs on every request.

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 ·

How an LLM API Gateway in Node.js Can Tame Runaway AI Spending

Without a centralized LLM API gateway, engineering teams often hardcode API keys and retry logic across multiple services, making cost tracking and provider switching difficult. A gateway acts as a single chokepoint for all model requests, enabling centralized routing, rate limiting, and spend visibility. Enterprise model API spending has surpassed $8.4 billion and continues to grow, largely without centralized oversight. Three leading gateway options — LiteLLM, Portkey, and Cloudflare AI Gateway — each suit different team needs, from self-hosted control to prebuilt guardrails and edge-network integration. Developers are advised to implement a gateway from the start of a project, as retrofitting one later becomes significantly more complex once services have their own calling conventions in place.

0
ProgrammingDEV Community ·

Developer Pauses Project Building in Week 7 to Deepen Spring Framework Knowledge

A developer participating in the #100DaysOfCode challenge used Week 7 to step back from building new projects and focus on core Spring Framework concepts. Topics studied included Dependency Injection, Spring AOP, Spring Security, OAuth2, logging in Spring Boot, and the SOLID and Gang of Four design principles. The week also included CV updates, job applications for backend roles, and an AI-powered mock interview that highlighted areas for improvement in technical interviewing. With upcoming exams approaching, the developer shifted priorities toward strengthening conceptual understanding rather than shipping new features. The developer emphasized that grasping the theory behind a framework is just as valuable as writing code with it.

0
ProgrammingDEV Community ·

Cost dashboard flagged its own launch as 26.5x overspend, exposing a CodeBurn bug

A developer team's internal dashboard for tracking Claude Code token spend incorrectly flagged its own founding session as a 26.5x cost outlier. The alert was a category error: the tool compared the expensive initial build session — which consumed over one million tokens — against quieter maintenance sessions that followed, skewing the average. Rather than ignoring the false alarm, the team traced the issue to a function called detectSessionOutliers in CodeBurn's open-source codebase and filed bug report #664 with a proposed fix. The project's maintainer refined the patch, implementing a smarter exclusion that gives new projects the benefit of the doubt only until they accumulate six costed sessions, rather than granting a permanent exemption. The fix was merged within three days of the bug report being filed.

0
ProgrammingDEV Community ·

JLScript: New Programming Language Targets Beginners and Portuguese Speakers

JLScript is a new programming language currently under development, aimed at making coding more accessible to beginners and Portuguese-speaking developers. The language features a clear, readable syntax while supporting modern programming concepts such as variables, functions, loops, arrays, and API integration. Planned features include a package manager, cross-platform compiler, VS Code extension, object-oriented programming support, and JSON handling. The project is open to community feedback and contributions as development continues. Source code and documentation are available on GitHub and the official JLScript website.