A Large Language Model-based Framework for Semi-Structured Tender Document Retrieval-Augmented Generation

Yilong Zhao, Daifeng LiarXiv 2024 · DOI

Abstract

The preparation of complex procurement documents, such as tender documents, is traditionally a manual and error-prone process that demands high domain expertise and strict adherence to legal and technical formatting. This paper introduces a framework that combines Large Language Models (LLMs) with Retrieval-Augmented Generation (RAG) and knowledge graphs to automate the production of semi-structured tender documents. By transitioning from direct text generation to a retrieve-verify-modify workflow, the proposed system significantly outperforms standard LLM prompting in both content accuracy and structural compliance.

Introduction

In government and corporate procurement, tender documents serve as the definitive guidelines for purchasing goods and services. These documents are characterized by high structural complexity and legal sensitivity. While Large Language Models (LLMs) have demonstrated proficiency in general-purpose writing, they often fall short in high-rigor professional contexts due to two primary factors:

  1. Domain Knowledge Gap: LLMs frequently lack access to specific, localized procurement policies and technical commodity data.
  2. Structural Rigidity: Maintaining the strict formatting and internal consistency required for legal compliance is challenging for models designed for fluid text generation.

To address these challenges, this research proposes a framework that treats the LLM as an orchestrator within a multi-stage retrieval and modification pipeline.

Methodology

The framework utilizes a three-stage pipeline designed to ensure both the relevance and the structural integrity of the generated documents.

1. Template Retrieval & Re-ranking

The system first identifies the most relevant historical document templates using a hybrid search strategy. This combines "dense" retrieval (BERT-based embeddings for semantic meaning) with "sparse" retrieval (keyword-based indexing). To further refine the selection, a specialized re-ranking module evaluates the similarity between the user's "purchase list" and historical lists using n-gram analysis, edit distance, and cosine similarity.

2. Template Filling with Smart Tags

Rather than generating raw text, the framework operates on Word templates embedded with "smart tags." An LLM-based Information Retrieval Agent interacts with the user to identify and populate missing parameters—such as project dates, entity names, and specific quantities—until the template is complete. This approach ensures that the final document adheres to professional formatting standards.

3. Modification via Knowledge Base (GraphRAG)

To enhance the technical precision of the document, the framework incorporates a knowledge graph built with Neo4j and GraphRAG. This graph contains thousands of entities and relationships specific to the procurement domain.

Knowledge graph clusters representing relationships between medical commodities and technical specifications.

When a user provides vague requirements, the system queries the graph via Cypher to retrieve related technical specifications and related entities. This allows the system to "amend" the document with professional, domain-specific content that an LLM might otherwise hallucinate or omit.

Experimental Evaluation

The framework was evaluated using a dataset of 1,406 tender documents from the medical sector, focusing on complex technical nomenclature. Performance was measured using embedding similarity scores against "gold standard" documents curated by procurement experts.

Method Paragraph Score Table Score Overall Score
ChatGLM-4 (Baseline) 12.55 0 12.55
ChatGLM-4 + Retrieval 38.27 15.23 29.42
Proposed Framework 78.31 76.15 77.74

The results indicate that the proposed framework achieves a massive performance leap, particularly in generating structured tables, where the baseline model failed entirely.

Conclusion

The integration of template-based generation with domain-specific knowledge graphs provides a robust solution for automating high-stakes document drafting. By prioritizing structure and utilizing LLMs as interactive agents rather than simple text generators, the framework ensures legal compliance and technical accuracy. Future work will focus on expanding the system's capabilities to handle multi-dimensional nested tables and extending the corpus to other technical domains.

Summary updated

BibTeX
@misc{zhao2024large,
  author = {Yilong Zhao and Daifeng Li},
  title = {{A Large Language Model-based Framework for Semi-Structured Tender Document Retrieval-Augmented Generation}},
  year = {2024},
  eprint = {2410.09077},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.09077},
}
Figure