SShortSingh.
Back to feed

Developer builds open-source HTML-to-DOCX converter using AI self-improvement loops

0
·4 views

A developer frustrated with slow, error-prone backend Word document generation built a new open-source library called dom-docx to improve HTML-to-DOCX conversion fidelity. The project used 'Autoresearch loops,' an AI-driven technique where an agent autonomously iterates and self-improves against an objective scoring metric. The scoring system evaluated each conversion across 37 real-world HTML test cases, weighing visual layout fidelity at 50%, document editability at 35%, and compile speed at 15%. Benchmarked against established npm HTML-to-DOCX libraries, dom-docx achieved average layout-fidelity scores in the mid-90s percent compared to the mid-60s percent for competing tools. The library also produced schema-valid OOXML across all 37 test cases, with the largest performance gains seen in complex elements like nested lists, table backgrounds, and flex layouts.

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 ·

Developer builds multi-agent AI tool that converts GitHub issues into pull requests

A developer has created 'resolvo', an agentic AI pipeline that automatically converts GitHub issues into ready-to-merge pull requests without requiring any local setup. The tool accepts a GitHub issue and repository URL, then runs the code through a multi-agent workflow built on LangGraph that explores the codebase, plans changes, implements fixes, runs tests in a sandbox, and performs an adversarial review. It uses a confidence-based routing system to assign lightweight or deep processing depending on issue complexity, and integrates Google Gemini models of varying reasoning depth for different pipeline stages. Tests are executed inside an E2B sandbox against a real clone of the repository, ensuring fixes are validated before a pull request is opened. The developer claims the tool cuts issue turnaround time by 85%, aiming to free senior engineers from routine maintenance work.

0
ProgrammingDEV Community ·

Hidden Costs Can Triple Your LLM API Bill Beyond Published Pricing

Businesses using large language model APIs often face bills two to three times higher than initial estimates based on published per-token pricing. Five structural cost factors — including output-to-input token ratios, tokenizer variance across providers, and unconfigured prompt caching — stack up to create a 40–65% gap between projected and actual spend. Output tokens cost three to five times more than input tokens, and workload type alone can cause a 2.9x cost difference using the same model and request volume. Prompt caching discounts offered by Anthropic, OpenAI, and Google — ranging from 50% to 90% off cached input tokens — can save over 24% of total API costs but are rarely configured by engineering teams. Accurately forecasting LLM costs requires measuring real production token ratios, benchmarking tokenizer efficiency across providers, and actively enabling available caching features.

0
ProgrammingDEV Community ·

Why DNS Changes Can Take Seconds for Some Users and Hours for Others

When a DNS record is updated, the change does not instantly reach all users because DNS operates on a cache-expiry model, not a push-notification system. Each resolver — such as Google Public DNS, Cloudflare, or an ISP like Deutsche Telekom — independently caches records and only fetches a fresh copy once its cached version expires. Propagation time is therefore shaped by a record's TTL setting combined with each resolver's own minimum TTL policies, which vary widely: Google honors TTLs closely while Deutsche Telekom enforces a minimum of 3,600 seconds across a three-tier cache hierarchy. Geographic distribution adds further complexity, as Cloudflare's 330-plus edge locations may expire caches at slightly different times across cities. This means two users can simultaneously receive contradictory results — one seeing the updated record within minutes and another waiting up to 24 hours — and both experiences are technically accurate from their respective resolver's standpoint.

0
ProgrammingDEV Community ·

How the AI Revolution Triggered a Surprising PC Market Comeback

After nearly a decade of declining sales and lengthening upgrade cycles, the personal computer market is experiencing a significant resurgence driven by artificial intelligence. The rise of generative AI created demand for running complex models locally, prompting manufacturers to develop a new category called AI PCs, which feature dedicated Neural Processing Units (NPUs) alongside traditional CPUs and GPUs. Cloud-based AI processing, while initially dominant, raised concerns around cost, latency, and data privacy — particularly for enterprise users — making on-device AI a compelling alternative. Businesses are now investing heavily in upgrading corporate device fleets to handle local AI workloads securely, while consumers are finding that older machines cannot adequately support next-generation AI software. The shift has reaffirmed the PC's relevance at a time when smartphones and tablets were widely expected to render it obsolete.