Skip to content

DMIRLAB-Group/SERE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SERE

This repo contains the source code of paper: SERE: Structural Example Retrieval for Enhancing LLMs in Event Causality Identification, Findings of ACL 2026.

Environment Setup

  1. Run pip install -r requirements.txt to install the Python dependencies.
  2. Prepare your OpenAI API key and add it to the GPT_4O_MINI_KEY field in the env.env file.

Deploy ConceptNet

  1. Download the ConceptNet assertions from the ConceptNet official website.
  2. Run utils/conceptnet/to_neo4j.py to convert the assertions into a format suitable for importing into Neo4j, generating nodes.csv and edges.csv.
  3. Download Neo4j from the Neo4j official website, deploy it, and import nodes.csv and edges.csv to construct ConceptNet.
  4. Run utils/conceptnet/vecdb.py to generate embeddings for each node and build a vector database (make sure to set the relevant parameters and variables at the end of the Python script).

Preprocess Dataset

  1. Download the datasets:
  1. Preprocess the datasets by adding necessary fields required for subsequent steps. You can use CPATT_dataset_format.ipynb to preprocess the CPATT dataset by specifying the split and subset_type for each dataset. (Gao’s dataset can be processed similarly; just ensure the fields are consistent.)
  2. Run utils/dataset_preprocess.py to process the data (make sure to set the relevant parameters and variables at the beginning and end of the Python script).

Inference

Run sere.py to perform inference (make sure to set the relevant parameters and variables at the end of the script).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors