The Commonplace
Home Papers Evidence Explore Trends Syntheses Digests References Docs 🎲 Workforce Futures
← Papers
Direction, evidence grade, and study type are AI-generated labels (gpt-5-mini), not human-verified. Syntheses are LLM-written. "Tensions" are machine-detected candidates, not confirmed contradictions. A research-acceleration tool, not peer review. How this is built →

An expectation-aware summarizer, ExpSum, substantially improves code-documentation quality for an industrial OS: on HarmonyOS it boosts BLEU-4 by up to 26.7% and ROUGE-L by 20.1% versus prior models, and human and LLM-based evaluations show its summaries align better with developers' documentation needs.

Precision in Practice: Knowledge Guided Code Summarizing Grounded in Industrial Expectations
Jintai Li, Songqiang Chen, Shuo Jin, Xiaoyuan Xie · February 03, 2026
arxiv other medium evidence 7/10 relevance Full text usable extracted full text Source PDF

Structured author observations

Linked only from stored provider relations; the raw author line above is never matched by name.

Arxiv

Latest observation:

  1. Jintai Li unresolved corpus identity
  2. Songqiang Chen unresolved corpus identity
  3. Shuo Jin unresolved corpus identity
  4. Xiaoyuan Xie unresolved corpus identity

Semantic Scholar

Latest observation:

  1. Jintai Li provider ID
  2. Songqiang Chen provider ID
  3. Shuo Jin provider ID
  4. Xiaoyuan Xie provider ID
ExpSum, an expectation-aware code summarization approach that integrates metadata abstraction, filtered metadata, domain retrieval, and constraint-driven prompting, produces summaries that better match developer expectations and outperforms prior methods on HarmonyOS and public benchmarks by sizable BLEU-4 and ROUGE-L margins.

Citation observations

Cumulative provider counts captured on specific dates; providers are never combined.

Code summaries are essential for helping developers understand code functionality and reducing maintenance and collaboration costs. Although recent advances in large language models (LLMs) have significantly improved automatic code summarization, the practical usefulness of generated summaries in industrial settings remains insufficiently explored. In collaboration with documentation experts from the industrial HarmonyOS project, we conducted a questionnaire study showing that over 57.4% of code summaries produced by state-of-the-art approaches were rejected due to violations of developers' expectations for industrial documentation. Beyond semantic similarity to reference summaries, developers emphasize additional requirements, including the use of appropriate domain terminology, explicit function categorization, and the avoidance of redundant implementation details. To address these expectations, we propose ExpSum, an expectation-aware code summarization approach that integrates function metadata abstraction, informative metadata filtering, context-aware domain knowledge retrieval, and constraint-driven prompting to guide LLMs in generating structured, expectation-aligned summaries. We evaluate ExpSum on the HarmonyOS project and widely used code summarization benchmarks. Experimental results show that ExpSum consistently outperforms all baselines, achieving improvements of up to 26.71% in BLEU-4 and 20.10% in ROUGE-L on HarmonyOS. Furthermore, LLM-based evaluations indicate that ExpSum-generated summaries better align with developer expectations across other projects, demonstrating its effectiveness for industrial code documentation.

Summary

Main Finding

Existing state-of-the-art code summarization methods (including GPT-4.5 and research SOTA) frequently produce summaries that industrial developers reject—not mainly because of incorrect functionality descriptions but because generated summaries violate practical documentation expectations (57.4% rejection rate in a HarmonyOS expert study). The paper proposes ExpSum, an expectation-aware pipeline (function modeling, metadata checking, context-aware cascaded domain-term retrieval, and constraint-driven prompting) that substantially improves alignment with industrial documentation expectations and achieves large gains on HarmonyOS benchmarks (HMSum-12/13) and community datasets.

Key Points

  • Empirical gap: In a questionnaire study with four HarmonyOS documentation experts, 57.4% of automatically generated summaries were rejected. Fleiss’ Kappa for expert annotations was high (≈0.86–0.87), indicating strong agreement.
  • Developer expectations identified (three primary expectations):
    • Exp-1: Use appropriate domain terms (project-specific names/operations), sensitive to package/path context.
    • Exp-2: Explicitly indicate function category (e.g., field vs. procedural functions).
    • Exp-3: Avoid redundant, fine-grained implementation details that are noisy or implied by context.
  • Limitations of prior systems: Global term embeddings (ignore path context), weak guidance for function-category inference, and overexposure of implementation details in prompts.
  • ExpSum components:
  • Function modeling: abstracts code into structured metadata to remove unnecessary implementation detail and focus on essential features (addresses Exp-3).
  • Information checking: filters out empty/uninformative metadata to avoid redundant summary content (further supports Exp-3).
  • Context-aware cascaded knowledge retrieval: retrieves domain terms from a term KB using dual-similarity (path/context + semantic) matching to disambiguate terms with identical lexemes in different contexts (addresses Exp-1).
  • Constraint-driven prompting: guides LLMs to infer function categories and generate summaries that follow a category-specific constraint/schema (addresses Exp-2).
  • Empirical gains:
    • On HarmonyOS (HMSum datasets), ExpSum outperforms baselines with >26.71% improvement in BLEU-4 and >20.10% in ROUGE-L versus official summaries.
    • Ablation studies show each component contributes positively.
    • Generalizability: ExpSum also improves performance and LLM-based alignment evaluations on community benchmarks (CodeSearchNet and a C/C++ benchmark).
  • Resources: Two industrial benchmarks released—HMSum-12 (22,138 functions) and HMSum-13 (23,003 functions)—with officially reviewed summaries reflecting industrial expectations; code and artifacts are made available.

Data & Methods

  • Datasets:
    • HMSum-12: 22,138 functions from HarmonyOS v12 with developer-reviewed summaries.
    • HMSum-13: 23,003 functions from HarmonyOS v13 with developer-reviewed summaries.
    • Additional community benchmarks: CodeSearchNet and a C/C++ dataset for cross-project evaluation.
  • Human study:
    • Questionnaire with four HarmonyOS documentation experts.
    • Random sampling: one function per package from HarmonyOS v12.
    • Compared GPT-4.5 and a SOTA research baseline (PRIME); collected 532 expert feedback entries; high inter-annotator agreement (Fleiss’ Kappa ≈0.86–0.87).
  • Method (ExpSum):
    • Metadata extraction: parse function into structured fields capturing core semantics (e.g., API calls, parameter roles, return semantics) while suppressing low-level details.
    • Metadata checking/filtering: remove empty/uninformative fields to reduce noise.
    • Cascaded retrieval from a term KB: dual-similarity matching that considers both path/package context and semantic embedding similarity to choose correct domain terms and forms.
    • Constraint-driven LLM prompting: feed metadata and retrieved terms plus a constraint schema that requires explicit function-category labeling and enforces summary patterns; includes self-refinement prompting.
  • Evaluation:
    • Automatic metrics: BLEU-4, ROUGE-L comparisons to official, developer-reviewed summaries.
    • LLM-based evaluation: alignment with developer expectations on community projects.
    • Ablations: component-wise removal to measure contribution.
    • Baselines: GPT-4.5 and PRIME (and other SOTA models on community benchmarks).

Implications for AI Economics

  • Productivity and cost impact:
    • Reducing documentation rejection rates (from >50%) can materially cut reviewer/editor time and rework in large industrial codebases, raising developer productivity and lowering maintenance costs.
    • Tools like ExpSum that improve practical acceptability increase the realized ROI of LLM-based code assistants in enterprise settings.
  • Market and productization:
    • Demand for domain-aware, expectation-aligned LLM integrations (e.g., documentation automation tailored to firm-specific terminology and styles) is likely high for large software vendors and regulated industries.
    • Firms may pay premiums for systems that include domain KB construction and path/context-aware retrieval, not just generic LLM access.
  • Data and infrastructure economics:
    • Industrial-quality datasets (like HMSum-12/13) are costly to curate but unlock higher-value automation; this motivates investment in proprietary labeled corpora and knowledge bases.
    • Maintaining a domain term KB and path-aware indices introduces ongoing data-maintenance costs but yields better disambiguation and lower error rates than purely model-based solutions.
  • Evaluation and incentives:
    • Standard community metrics (BLEU/ROUGE) and benchmarks can misrepresent utility for industry; there is an economic incentive to adopt evaluation criteria that reflect acceptance by end-users (e.g., human-review acceptance rates, domain-term correctness).
    • Firms buying/using summarization tools should request domain-specific validation (human-in-the-loop acceptance metrics) to avoid overpaying for models that perform well on open benchmarks but fail in production.
  • Labor and organizational effects:
    • Improved automation of high-quality summaries may shift reviewer work from writing to higher-level auditing, potentially reducing headcount for routine documentation but increasing demand for specialists who curate domain KBs and set standards.
    • Productivity gains could accelerate development velocity, affecting software release cycles and competition dynamics.
  • Risks and compliance:
    • Misuse of domain terms or incorrect functional categorization in automated summaries can create legal/compliance risks (liability for incorrect documentation in regulated contexts); firms will value systems that minimize such errors.
    • Investment in guardrails (constraint schemas, metadata checks) is economically justified where documentation errors have outsized costs.
  • Wider ecosystem effects:
    • A demonstrated improvement from expectation-aware systems encourages a market for complementary services: KB construction, path/context indexing, and documentation-review workflows that integrate LLM outputs.
    • Opens opportunities for specialized vendors offering turnkey industrial documentation LLM stacks with measurable acceptance-rate SLAs.

If you want, I can: - Extract example summaries (good vs. rejected) from the paper and annotate how ExpSum would change them. - Produce a short checklist for product teams evaluating code-summary tools for industrial adoption.

Assessment

Paper Typeother Evidence Strengthmedium — The paper reports consistent automatic-metric gains (BLEU-4, ROUGE-L) on an industrial codebase (HarmonyOS) and standard benchmarks, plus questionnaire and LLM-based human-alignment evaluations; however, there is no causal identification, limited information about human-eval sample sizes or randomization, and potential evaluation biases from LLM-based assessments and a single-company case study. Methods Rigormedium — Methodologically sound engineering: proposes clear components (metadata abstraction, filtering, retrieval, constraint prompting) and evaluates on both an industrial dataset and public benchmarks with automatic and human/LLM evaluations; but the paper likely lacks pre-registered protocols, randomized user studies, detailed ablation/statistical significance reporting for all claims, and broader replication across diverse codebases. SampleEvaluation uses the industrial HarmonyOS codebase (documentation experts from the HarmonyOS project participated in a questionnaire), plus widely used public code summarization benchmarks (unspecified in the abstract, likely CodeSearchNet-style datasets); metrics reported include BLEU-4 and ROUGE-L, and additional assessments used LLM-based evaluators and developer judgments from HarmonyOS documentation experts. Themesproductivity human_ai_collab GeneralizabilitySingle industrial case study (HarmonyOS) — results may not transfer to other domains, languages, or types of software, Performance depends on the particular LLMs and retrieval resources used; different models or prompt costs could change results, Benchmarks used may not cover all programming languages, code styles, or repository structures, LLM-based evaluations and possibly small or non-random developer samples risk assessment bias, Improvements on automatic metrics do not necessarily translate to measurable productivity or economic outcomes

Claims (9)

ClaimDirectionOutcomeConfidence & EvidenceDetails
Code summaries are essential for helping developers understand code functionality and reducing maintenance and collaboration costs. Developer Productivity positive usefulness of code summaries for developer understanding and maintenance
Reading fidelity high
Study strength speculative
not reported
0.02
In a questionnaire study with documentation experts from the industrial HarmonyOS project, over 57.4% of code summaries produced by state-of-the-art approaches were rejected due to violations of developers' expectations for industrial documentation. Output Quality negative rejection rate of generated code summaries
Reading fidelity high
Study strength medium
over 57.4% rejected
0.12
Developers emphasize requirements beyond semantic similarity to reference summaries, specifically: use of appropriate domain terminology, explicit function categorization, and avoidance of redundant implementation details. Output Quality positive developer-stated requirements/preferences for code summaries (domain terminology, function categorization, non-redundancy)
Reading fidelity high
Study strength medium
not reported
0.12
ExpSum is an expectation-aware code summarization approach that integrates function metadata abstraction, informative metadata filtering, context-aware domain knowledge retrieval, and constraint-driven prompting to guide LLMs to generate structured, expectation-aligned summaries. Output Quality positive generation of structured, expectation-aligned summaries by the proposed system
Reading fidelity high
Study strength medium
not reported
0.12
ExpSum achieves up to a 26.71% improvement in BLEU-4 on the HarmonyOS project compared to baselines. Output Quality positive BLEU-4 score
Reading fidelity high
Study strength high
26.71% improvement in BLEU-4
0.2
ExpSum achieves up to a 20.10% improvement in ROUGE-L on the HarmonyOS project compared to baselines. Output Quality positive ROUGE-L score
Reading fidelity high
Study strength high
20.10% improvement in ROUGE-L
0.2
ExpSum consistently outperforms all baselines on HarmonyOS and on widely used code summarization benchmarks. Output Quality positive automated summarization metrics (BLEU, ROUGE, etc.) and comparative performance vs. baselines
Reading fidelity high
Study strength medium
not reported
0.12
LLM-based evaluations indicate that ExpSum-generated summaries better align with developer expectations across other projects, demonstrating its effectiveness for industrial code documentation. Output Quality positive alignment of generated summaries with developer expectations (as judged by LLM-based evaluation)
Reading fidelity high
Study strength medium
not reported
0.12
The practical usefulness of generated code summaries in industrial settings remains insufficiently explored. Other null_result degree of practical exploration/study of generated summaries in industrial settings
Reading fidelity high
Study strength speculative
not reported
0.02

Notes