SShortSingh.
Back to feed

Context Rot: vì sao nhồi cả repo vào prompt khiến Coding Agent kém chính xác hơn

0
·5 views

Nhiều lập trình viên đưa toàn bộ repository cùng log lỗi vào prompt với kỳ vọng AI sẽ hiểu dự án sâu hơn, nhưng kết quả thường ngược lại: agent sửa nhầm file cũ, gọi hàm không tồn tại và quên các ràng buộc đã được dặn. Hiện tượng này được gọi là Context Rot, tức là khả năng suy luận của LLM giảm dần khi lượng đầu vào tăng, dù chưa chạm giới hạn cửa sổ ngữ cảnh. Nghiên cứu của Chroma Research công bố tháng 7/2025 thử nghiệm 18 mô hình hàng đầu và ghi nhận mọi mô hình đều suy giảm độ chính xác khi prompt dài hơn. Điểm đáng lo là lỗi diễn ra âm thầm, không báo lỗi như khi tràn token, mà mô hình vẫn trả về kết quả sai với giọng điệu tự tin. Nguyên nhân được lý giải từ cơ chế Self-Attention của kiến trúc Transformer, khi trọng số chú ý bị phân tán vào lượng lớn thông tin nhiễu.

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 ·

Un chatbot sobre Couchbase: por qué un campo inexistente no genera error

Un desarrollador describe cómo conectó un modelo de lenguaje a una colección de Couchbase Capella con esquema flexible. El problema identificado es que una consulta sobre un campo inexistente no falla, sino que devuelve un resultado vacío que puede parecer una respuesta válida. Para evitarlo, el sistema inventaría los campos reales por categoría y los inyecta en el prompt del modelo. Además, un guardia de lista blanca contrasta cada ruta de la consulta generada con ese inventario antes de ejecutarla. Las operaciones de escritura pasan por una simulación previa y requieren confirmación del usuario.

0
ProgrammingDEV Community ·

Malicious GGUF Language Models on Hugging Face Reportedly Affected About 2,400 Users

Security reports indicate that some GGUF-format large language models hosted on Hugging Face contained hidden malware. The infected models reportedly reached roughly 2,400 people who downloaded them. The article uses the incident to argue that developers should vet third-party AI models and dependencies before use. It also calls on model hosting platforms to strengthen their screening processes. The piece is largely reflective, drawing on the author's own experience with dependency risks and code review practices.

0
ProgrammingDEV Community ·

Shadow DNS: How Devices Bypass Your DNS Filtering and How to Find Them

DNS filtering only protects devices that actually send their queries to the filtering resolver, which many do not. Smart TVs, IoT gadgets and some phones hard-code external resolvers, while browsers and operating systems increasingly tunnel DNS over HTTPS or DoT, hiding it from network-level blocklists. This creates 'shadow DNS' that leaves SOC teams blind and silently defeats threat-intel blocking and compliance policies. The author open-sourced shell tools, dns-leak-check.sh and arp-dns-watch.sh, to audit which hosts can reach external DNS on networks the user owns. The article also advises redirecting or blocking outbound port 53 at the gateway to close the gap.

0
ProgrammingDEV Community ·

FEFO vs FIFO: Allocating Stock by Expiry Date in Code

A common stock-picking approach selects inventory batches by arrival date, which is problematic for goods with expiry dates. The batch received first may not be the one that expires first, so this method can leave stock to spoil. The article presents a short JavaScript function that sorts batches either by earliest expiry (FEFO) or earliest arrival (FIFO) and allocates the requested quantity accordingly. Using ISO date strings allows direct string comparison without date parsing, and an example shows FEFO picking from a later-arriving batch that expires sooner. The author also outlines extra safeguards such as tie-breaking rules, minimum remaining shelf life per customer, skipping blocked batches, and recording allocations for traceability during recalls.