Thanks to visit codestin.com
Credit goes to github.com

Skip to content

landian60/IntPro

Repository files navigation

IntPro: A Proxy Agent for Context-Aware Intent Understanding via Retrieval-conditioned Inference

This repository is an open-source release of the IntPro training/evaluation pipeline. Paper (arXiv): https://arxiv.org/pdf/2603.03325

Abstract

Large language models (LLMs) have become integral to modern Human-AI collaboration workflows, where accurately understanding user intent serves as a crucial step for generating satisfactory responses. Context-aware intent understanding, which involves inferring user intentions from situational environments, is inherently challenging because it requires reasoning over both the immediate context and the user's underlying motivations that drive their behavior. Moreover, existing approaches often treat intent understanding as a static recognition task, overlooking users' accumulated intent patterns that could provide valuable references for more accurate and generalizable understanding. To address this gap, we propose IntPro, a proxy agent that learns to adapt to individual users via retrieval-conditioned intent inference. We design intent explanations that abstract how contextual signals connect to expressed intents, and store them in an individual intent history library for retrieval. We train IntPro through supervised fine-tuning on retrieval-conditioned trajectories and multi-turn Group Relative Policy Optimization (GRPO) with tool-aware reward functions, enabling the agent to learn when to leverage historical intent patterns and when to infer directly. Experiments across three diverse scenarios (Highlight-Intent, MIntRec2.0, and Weibo Post-Sync) demonstrate that IntPro achieves strong intent understanding performance with effective context-aware reasoning capabilities across different scenarios and model types.

Repository structure

  • sft_rollout_train/: SFT and rollout scripts.
  • grpo_agent_train/: GRPO training scripts and reward/tool logic.
  • agentic_evaluation/: direct agentic evaluation entry.
  • data/MIntRec2_sample/: sampled MIntRec TSV files.
  • data/mint_samples/: sampled SFT/GRPO JSON trajectories.
  • data/qwen30b_libraries/: sampled mint intent library for retrieval.
  • scripts/quick_start_check.sh: lightweight quick-start validation.

Quick start

  1. Create and activate a single environment (recommended):
conda env create -f environment.yml
conda activate intpro

Alternative (venv):

python -m venv .venv
source .venv/bin/activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Unified launcher (recommended):
bash run_task.sh sft  sft_stage1_mint_sample 0
bash run_task.sh grpo grpo_mint_sample 0
bash run_task.sh eval configs/eval_config_mint_sample_direct.yaml
  1. SFT sample run:
bash sft_rollout_train/train.sh sft_stage1_mint_sample 0
  1. GRPO sample run:
bash grpo_agent_train/train.sh grpo_mint_sample 0
  1. Direct evaluation (requires a local OpenAI-compatible server):
# terminal A: start server
vllm serve Qwen/Qwen3-4B --host 127.0.0.1 --port 8000 --tensor-parallel-size 1 --dtype bfloat16 --max-model-len 4096 --gpu-memory-utilization 0.7

# terminal B: run eval
bash agentic_evaluation/run_eval.sh configs/eval_config_mint_sample_direct.yaml

Quick Start Check (no heavy training)

bash scripts/quick_start_check.sh

Data format

  • data/MIntRec2_sample/{train,dev,test}.tsv: tab-separated data with columns Dialogue_id, Utterance_id, Text, Label, Start_timestamp, End_timestamp, Source, speakername.
  • data/mint_samples/mintrec_preference_sft.sample.json: list of SFT samples with keys unique_id, dataset_type, system, conversations.
  • data/mint_samples/mintrec_rollout_sft_fullGRPO.sample.json: GRPO-ready rollout samples with keys unique_id, dataset_type, system, conversations, used_tool_call.
  • data/qwen30b_libraries/mintrec_preference_library.sample.json: retrieval library with keys unique_id, intent, intent_explanation, context, target_utterance, dataset_type, speaker.

Hardware (validated)

  • GPU: 1-2 x NVIDIA A800 80GB PCIe
  • CPU: 2 x Intel Xeon Gold 6330 (112 logical CPUs total)
  • Memory: 503 GiB RAM

Notes

  • Default sample configs use Qwen/Qwen3-4B.
  • Unified environment is validated end-to-end with vLLM as the local eval backend.
  • Sample data is for reproducibility checks and pipeline wiring only.
  • For full experiments, replace sample paths in configs with your full datasets/libraries.
  • Please ensure you have legal rights before adding any extra data to this repo.

Citation

If you use this repository, please cite the IntPro paper.

@misc{liu_intpro,
  title        = {IntPro: A Proxy Agent for Context-Aware Intent Understanding via Retrieval-conditioned Inference},
  author       = {Guanming Liu and others},
  howpublished = {GitHub repository},
  url          = {https://github.com/landian60/IntPro}
}

About

No description, website, or topics provided.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors