【ADVEI】Knots: A Large-Scale Multi-Agent Enhanced Expert-Annotated Dataset and LLM Prompt Optimization for NOTAM Semantic Parsing
Code for the Knots Dataset introduced in the Advanced Engineering Informatics paper 'Knots: A Knowledge-Guided Self-Evolving Optimization Framework with LLMs for NOTAM Interpretation'.
[](https://arxiv.org/abs/2511.12630)
[](https://github.com/Estrellajer/Knots/blob/main/LICENSE)
[](https://github.com/Estrellajer/Knots/issues?q=is%3Aopen+is%3Aissue)
Category and subcategory distribution of Q-codes within the NOTAM dataset
Great thanks to the Beijing Natural Science Foundation for funding the Qiyuan Research Program, and to the Aviation Data Communication Corporation for providing data, as well as to all the teachers and classmates who have offered their help.
If you find this paper useful, please consider staring 🌟 this repo and citing 📑 our paper:
@article{liu2025notam,
title={Knots: A Large-Scale Multi-Agent Enhanced Expert-Annotated Dataset and LLM Prompt Optimization for NOTAM Semantic Parsing},
author={Liu, Maoqi and Fang, Quan and Yang, Yang and Zhao, Can and Cai, Kaiquan},
journal={arXiv preprint arXiv:2511.12630},
year={2025}
}├── config/ # Configuration files
│ ├── prompts.py # Traditional prompt definitions
│ └── settings.py # System settings
├── src/ # Source code
│ ├── agents.py # Intelligent agents
│ ├── api_manager.py # API manager
│ ├── debate.py # Debate mechanism
│ ├── mining.py # Data mining
│ ├── models.py # Data models
│ ├── post_processor.py # Post processor
│ └── utils.py # Utility functions
├── config.yaml # Main configuration file
├── main.py # Main program entry
└── requirements.txt # Dependencies list
We recommend using uv to manage Python dependencies:
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create virtual environment and install dependencies
uv venv
source .venv/bin/activate # Linux/macOS
# or .venv\Scripts\activate # Windows
# Install project dependencies
uv pip install -r requirements.txtCreate a .env file to configure API keys:
# DMX API
DMXAPI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Other API keys...uv run main.py <input_file> <output_file> --prompt <prompt> [options]uv run main.py data/output/airport.json data/output/airport_icl_gpt-4.1-nano.json \
--prompt AIRPORT_PROMPT_ICL \
--provider dmxapi \
--api-key sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--model gpt-4.1-nano \
--base-url https://www.dmxapi.com/v1 \
--evaluateuv run main.py data/output/runway.json data/output/runway_processed.json \
--prompt RUNWAY_PROMPT_ICL \
--provider deepseek \
--api-key sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--model deepseek-chat \
--self-consistency \
--consistency-rounds 5 \
--consistency-strategy majority_vote \
--evaluateuv run main.py data/output/light.json data/output/light_processed.json \
--prompt LIGHT_PROMPT_A_COT \
--provider qwen \
--api-key sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--model qwen3-8b \
--temperature 0.2 \
--evaluateuv run main.py data/output/taxiway.json data/output/taxiway_processed.json \
--prompt TAXIWAY_PROMPT_ICL \
--provider qwen \
--api-key sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--model qwen3-8b \
--evaluateuv run main.py data/output/navigation.json data/output/navigation_processed.json \
--prompt NAVIGATION_PROMPT_COT \
--provider deepseek \
--api-key sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--model deepseek-chat \
--temperature 0.1 \
--evaluateuv run main.py data/output/airport.json data/output/airport_poml_processed.json \
--use-poml \
--poml-file config/Airport.poml \
--provider qwen \
--api-key sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--model qwen3-8b \
--evaluateuv run main.py data/output/runway.json data/output/runway_poml_processed.json \
--use-poml \
--poml-file config/Airport.poml \
--provider deepseek \
--api-key sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--model deepseek-chat \
--self-consistency \
--consistency-rounds 3 \
--consistency-strategy majority_vote \
--evaluateinput_file: Input JSON file pathoutput_file: Output JSON file path--prompt: Prompt content or predefined prompt name (required in traditional mode)
--use-poml: Enable POML (Prompt Optimization Markup Language) mode--poml-file: Path to POML file (required when --use-poml is set)
--provider: API provider (qwen/deepseek/dmxapi/openai)--api-key: API key--model: Model name to use--base-url: API base URL--temperature: Temperature parameter, controls output randomness (0.0-1.0)
--self-consistency: Enable self-consistency validation--consistency-rounds: Number of self-consistency rounds (default: 3)--consistency-strategy: Strategy selectionmajority_vote: Majority voting (default)first_success: First successmost_confident: Highest confidence
--evaluate: Show evaluation report after processing--evaluate_only FILE: Only evaluate specified file, no processing
The system provides various predefined prompts covering different data types and reasoning strategies:
AIRPORT_PROMPT_*: Airport-related dataRUNWAY_PROMPT_*: Runway-related dataLIGHT_PROMPT_*: Light-related dataTAXIWAY_PROMPT_*: Taxiway-related dataAIRWAY_PROMPT_*: Airway-related dataAREA_PROMPT_*: Area-related dataSTAND_PROMPT_*: Stand-related dataNAVIGATION_PROMPT_*: Navigation-related dataPROCEDURE_PROMPT_*: Procedure-related dataSTANDARD_PROMPT_*: Standard-related dataRVR_PROMPT_*: RVR-related data
*_Vanilla: Basic prompts*_ICL: In-context learning with examples*_COT: Chain-of-thought reasoning*_POML: POML (Prompt Optimization Markup Language) mode
For further optimization and validation of parsed data:
uv run src/post_processor.py input_file.json output_file.json \
--provider qwen \
--api-key sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--model qwen3-8b \
--evaluateMain configuration file containing API settings, path configurations, and processing parameters:
api:
default_provider: "deepseek"
providers:
deepseek:
api_key: "${DEEPSEEK_API_KEY}"
base_url: "https://api.deepseek.com/v1"
model: "deepseek-chat"
paths:
data_dir: "./data"
output_dir: "./data/output"
processing:
default_sample_size: 100
max_workers: 4- Log files located in
logs/directory - Real-time progress display and success rate statistics
- API call statistics and error tracking
- Automatic evaluation report generation after processing completion
{
"records": [
{
"raw_text": "NOTAM raw text...",
"category": "runway",
"telex": "A001/23"
}
]
}{
"metadata": {
"total_records": 100,
"success_count": 95,
"processing_time": "2023-01-01T12:00:00"
},
"records": [
{
"raw_text": "Raw text",
"parse_fields": {
"airport": "ZBAA",
"runway": "18L/36R",
"status": "closed"
}
}
],
"api_stats": {
"total_requests": 100,
"successful_requests": 95
}
}