SShortSingh.
Back to feed

Engineering Team Cuts RAG Pipeline Latency 40% Using Bayesian Search and Hybrid Retrieval

0
·1 views

A development team overhauled their Retrieval-Augmented Generation (RAG) pipeline after standard production deployments revealed significant performance gaps across legal, API, and support document types. The team replaced fixed 512-token chunking with document-specific strategies — including recursive, semantic, and agentic chunking — tailored to content structure and achieving up to 97% recall@10. They combined vector search with BM25 keyword search using Reciprocal Rank Fusion, then applied a cross-encoder reranker to narrow 50 candidates down to 5, improving relevance correlation from 0.75 to 0.92. A query transformation layer was also added to handle poorly formed user queries before retrieval. The cumulative changes resulted in a 40% reduction in end-to-end latency and a measured recall@10 of 95% across the production pipeline.

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 ·

CVE-2023-48795: Terrapin Attack Silently Downgrades SSH Security via Packet Deletion

Researchers at Ruhr University Bochum disclosed the Terrapin attack in December 2023, registered as CVE-2023-48795, revealing a flaw in the SSH transport layer. The attack allows a network-positioned attacker to manipulate SSH's sequence numbers by injecting and deleting packets during the unencrypted handshake phase, without breaking any encryption. Because the sequence counter begins before authentication is active, both sides can be made to believe their message counts are aligned even though a packet has been silently removed. The most damaging deletion target is the SSH_MSG_EXT_INFO message, whose removal strips extension negotiation and can force a downgrade of security features both sides would otherwise have enabled. The attack does not expose passwords or plaintext data, but exploits the boundary between SSH's unauthenticated and authenticated phases — a reminder that cryptographic protocols often fail at the seams rather than at the cipher level.

0
ProgrammingDEV Community ·

Kimi K3's 1M-Token Context Window Poses Latency and Cost Challenges for Mobile Apps

Moonshot AI's Kimi K3 model supports a one-million-token context window, but this capability introduces significant challenges for mobile application developers. Processing large contexts can take anywhere from one minute to five minutes, far exceeding the sub-three-second response times mobile users typically expect. Mobile operating systems can also terminate apps mid-request, requiring developers to implement resumable request patterns with unique request IDs and stream recovery. Beyond latency, bandwidth and API costs are a concern, as K3 is priced at 20 CNY per million input tokens, making large-context requests expensive for users on mobile data plans. Developers are advised to cap mobile context sizes, enable response streaming, and display token costs to users before large requests are submitted.

0
ProgrammingDEV Community ·

Developer launches free AQI API with strong India coverage and global reach

A developer has built Antrolope, a free air quality index API designed to address gaps in coverage for Indian cities, which dominate the list of the world's most polluted urban areas. The API aggregates data from four sources — WAQI, OpenAQ, Open-Meteo, and OpenWeatherMap — and averages the readings to improve accuracy over single-source alternatives. Existing AQI APIs either lack adequate India coverage or cost upwards of $99 per month, making Antrolope a cost-free alternative. The platform also offers a /pattern endpoint that analyzes hourly AQI trends to suggest the best time to go outdoors, currently optimized for Indian cities. Free API keys are available at antrolope.com, and the service supports cities worldwide.

0
ProgrammingDEV Community ·

Moonshot AI Suspends Kimi K3 Subscriptions After Demand Overwhelms Cluster in 48 Hours

Moonshot AI launched its Kimi K3 model on July 16, 2025, but within 48 hours user demand had exceeded the cluster's capacity. By July 19, the company suspended all new consumer subscriptions to prevent service degradation for existing users. The surge was partly attributed to K3 reaching the top coding rank on Arena on July 17, a demand driver that appears to have been underestimated in capacity forecasts. Rather than letting service quality collapse across the board, Moonshot AI halted new sign-ups, communicated the reason publicly, and split subscriptions into separate tiers to allocate compute more precisely. The incident highlights the difficulty of forecasting demand spikes tied to benchmark rankings in the competitive AI services market.

Engineering Team Cuts RAG Pipeline Latency 40% Using Bayesian Search and Hybrid Retrieval · ShortSingh