Thread: A Logic-Based Data Organization Paradigm for How-To Question Answering with Retrieval Augmented Generation

Kaikai An, Fangkai Yang, Liqun Li, Junting Lu, Sitao Cheng, Lu Wang, Pu Zhao, Lele Cao, Qingwei Lin, Saravan Rajmohan, Dongmei Zhang, Qi Zhang · DOI

Introduction: The "How-To" Challenge

Standard Retrieval-Augmented Generation (RAG) systems are primarily designed to answer "5W" questions (Who, What, Where, When, Why) by retrieving relevant factoids from document chunks. However, these systems frequently fail when addressing "1H" (How-to) questions. Procedural tasks, such as troubleshooting a server error or navigating a complex website, require a dynamic, step-by-step decision-making process where each action depends on the outcome of the previous one.

Traditional RAG relies on fixed-size semantic chunking, which often severs the logical connections between instructions. When a troubleshooting guide is sliced into arbitrary 500-token blocks, the "if-then" relationships that guide a user through a task are lost. This results in fragmented, out-of-order, or incomplete instructions that fail to resolve the user's actual problem.

The THREAD Paradigm: From Chunks to Logic Units

To address these limitations, we introduce THREAD, a data organization paradigm that replaces arbitrary text chunks with Logic Units (LUs). An LU is a structured knowledge atom designed to preserve procedural integrity. Each LU contains a Header (the intent), a Prerequisite (contextual constraints), the Body (actual instructions), and a Linker. The Linker is the critical component; it explicitly models "if-then" logic to generate subsequent queries based on the outcome of the current step.

The THREAD pipeline: (a) Reformulating unstructured documents into structured formats, (b) Extracting and merging Logic Units (LUs) into a logical thread, and (c) The RAG system interacting with these threads.

As shown in the pipeline above, the system first reformulates unstructured documents into structured Markdown using an LLM. It then extracts LUs and merges redundant nodes to form a navigable decision graph. During inference, the system retrieves the initial LU, executes the instruction (manually or automatically), and uses the Linker to dynamically navigate the next logical step in the "thread."

Experimental Evaluation

THREAD was evaluated across three diverse environments requiring procedural reasoning:

  • Mind2Web: A dataset for complex web navigation tasks.
  • WikiHow: A collection of linear, step-by-step procedural guides.
  • Incident Mitigation (IcM): A high-stakes industrial dataset of Troubleshooting Guides (TSGs) used by engineers to manage cloud service failures.

Key Results and Performance

THREAD consistently outperformed traditional chunk-based and document-based RAG paradigms across all benchmarks. The most significant gains were observed in high-complexity scenarios like incident mitigation.

Performance comparison on the Incident Mitigation dataset, showing THREAD significantly outperforming Chunk and Document-based RAG across Success Rate (SR) and Step Success Rate.

In the Incident Mitigation scenario, THREAD improved the success rate (SR) of automated troubleshooting by approximately 21% to 33% compared to existing paradigms. On the Mind2Web dataset, it surpassed specialized agents like MINDACT, achieving superior element accuracy and overall success rates. Furthermore, THREAD demonstrated a 75% reduction in the volume of information sent to the model during inference by retrieving precise LUs rather than bloated, irrelevant chunks.

Insights and Future Directions

The success of THREAD highlights that for procedural knowledge, logic is more important than semantic similarity. By explicitly modeling prerequisites and linkers, the system can filter out irrelevant paths and maintain a coherent reasoning chain. While the upfront cost of structuring data with an LLM is higher than simple chunking, the resulting efficiency and accuracy at inference time provide a substantial return on investment.

Future work will explore hybrid systems where logic-based and chunk-based knowledge bases coexist, using automated routing to select the best paradigm based on the nature of the user's query.

Summary updated

BibTeX
@misc{an2024thread,
  author = {Kaikai An and Fangkai Yang and Liqun Li and Junting Lu and Sitao Cheng and Lu Wang and Pu Zhao and Lele Cao and Qingwei Lin and Saravan Rajmohan and Dongmei Zhang and Qi Zhang},
  title = {{Thread: A Logic-Based Data Organization Paradigm for How-To Question Answering with Retrieval Augmented Generation}},
  year = {2024},
  eprint = {2406.13372},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.13372},
}
Figure