SShortSingh.
Back to feed

Trimming AI agent tool schemas cut prompt size 47% and sped up local model turns

0
·1 views

A developer running self-hosted AI agents on a 6GB GPU found that most of each request was spent describing unused tools, not the model itself. Tool schemas made up roughly 74% of one captured 18,400-token prompt, and prefill was the main bottleneck. By checking real tool-call history in a local database, they disabled toolsets that were never or rarely used, cutting tool schemas by 47% across five specialist profiles. A duplicate YAML key initially made the change appear applied while disabling nothing, which cost considerable debugging time. The fix relied on the agent framework's disabled_toolsets setting, verified against a wire-capture rig before production use.

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 ·

Python Script Converts RSS and Atom Feeds into JSON and CSV

A DEV Community tutorial explains how to turn RSS and Atom feeds into structured data using Python. The formats vary in how they structure dates and descriptions, and descriptions are often wrapped in HTML, which complicates processing. The author provides a short script built on the standard library plus requests that discovers a site's feed, normalizes its items, and exports them to CSV. Feed discovery works by reading alternate link tags on a page or checking common feed paths, and a known feed URL can be fetched directly instead.

0
ProgrammingDEV Community ·

Canvas text draws in fallback font before custom web font loads

A developer found that the first fillText call on a canvas draws with the fallback system font even when a custom web font is declared with @font-face. Tests across Chromium, Chrome, Firefox and WebKit showed no errors, and the font request is only sent when the draw happens, so the text ignores the font still in transit. Redraws after 50 ms or more used the correct font, with the delay depending on network timing. A control test confirmed the font was not requested before the first draw, meaning canvas does not wait for it. The reported fix is to await document.fonts.load() with the font string and text before drawing, which worked in all four browsers.

0
ProgrammingDEV Community ·

Git rerere Can Reuse Your Merge Conflict Fix So You Resolve It Once

Developers running multiple AI coding agents on separate branches often hit the same merge conflict repeatedly when combining their work. The article demonstrates how Git's rerere feature, short for reuse recorded resolution, solves this by remembering how a conflict was resolved. Once enabled, Git automatically reapplies a saved resolution whenever the identical conflict reappears during later merges or rebases. The walkthrough sets up a demo repository with two worktrees simulating agents editing the same login function. It then shows how to enable rerere, inspect what will be recorded with status and diff, and commit the resolution once for reuse.

0
ProgrammingDEV Community ·

Discovery Phase AI vs ChatGPT: Which Fits Your Requirements Work

A comparison piece argues that general chat assistants like ChatGPT are useful for drafting discovery material such as problem statements, requirement lists and meeting summaries. The author notes that these tools struggle to keep a multi-stage discovery consistent across weeks of work and multiple people. The article lists strengths of chat assistants, including fast first drafts, rewording, brainstorming edge cases and flexible output formats. It identifies limits such as the lack of built-in structure, answers that do not connect across conversations, and manual copy-and-paste editing with no change history. The piece is written by the team behind the product it compares, a point the article itself discloses.