Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

iQUEST: An Iterative Question-Guided Framework for Knowledge-Base Question Answering

iQUEST (Iterative Question-Guided Framework) is a novel approach for Knowledge-Base Question Answering (KBQA). It continuously decomposes complex queries into simpler sub-questions, ensuring a clear and focused reasoning trajectory. The framework also integrates a Graph Neural Network (GNN) to incorporate 2-hop neighbor information at each reasoning hop. By combining iterative decomposition with GNN-based relational insights, iQUEST effectively explores and refines plausible paths, thereby enhancing answer accuracy.

Package Directory Structure

.
├── Question-KG
│   ├── config.py
│   ├── freebase_func.py
│   ├── gnn_base_train.py
│   ├── main_subquesgen_with_gnn.py
│   ├── prompt_list.py
│   ├── run.sh
│   └── utils.py
├── README.md
├── data
│   ├── WebQSP.json
│   ├── WebQuestions.json
│   ├── cwq.json
│   └── grailqa.json
└── requirements.txt

File Descriptions

1. Question-KG Folder

This folder contains all core source files for running the iQUEST framework.

  • run.sh
    A shell script that provides an example of how to execute the main program and train the GNN model with predefined configurations.

  • main_subquesgen_with_gnn.py
    The main driver script for the iQUEST framework. It orchestrates the iterative question decomposition process and invokes the GNN components for multi-hop reasoning.

  • freebase_func.py
    A set of utility functions to interact with the Freebase (or other) Knowledge Base. It handles low-level database operations, such as querying entity relationships and filtering results.

  • utils.py
    Contains helper methods for Large Language Model (LLM) calls and basic data processing. This includes methods for tokenization, text cleaning, or any LLM-specific functionality used throughout the project.

  • gnn_base_train.py
    Source code for the GNN model. This file covers model definition, training loops, and any relevant data structures or functions necessary for GNN-based reasoning.

  • config.py
    Central configuration file, defining parameters for the LLMs, GNN, and database connections. Adjust these settings to customize environment details such as model hyperparameters or database endpoints.

  • prompt_list.py
    Contains all the prompts used during the iterative questioning flow. Each prompt is strategically designed to guide sub-question generation and knowledge retrieval.

2. data Folder

Stores four benchmark datasets used for evaluation:

  • WebQSP.json
  • WebQuestions.json
  • cwq.json
  • grailqa.json

These files include questions and corresponding answers, which serve as testbeds for the iQUEST framework.

3. requirements.txt

Lists all Python dependencies needed to run the project. Ensure these dependencies are installed before executing any scripts.


Requirements

  • Python 3.x
  • Install the required libraries:
    pip install -r requirements.txt

Usage

  1. Enter the Question-KG folder:
    cd Question-KG
  2. Run the main script using the provided shell script:
    sh run.sh

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages