Web Analytics

ChinaTravel

⭐ 0 stars Portuguese by Adopos

ChinaTravel: Um Benchmark do Mundo Real para Agentes de Linguagem no Planejamento de Viagens na China

Base oficial de código para o artigo "ChinaTravel: Um Benchmark do Mundo Real para Agentes de Linguagem no Planejamento de Viagens na China".

Webpage Paper Dataset(Huggingface) Competition(TPC@IJCAI2025) Competition(TPC@AIC2025)

🏆 Desafio de Planejamento de Viagens IJCAI 2025 (TPC@IJCAI)

Temos orgulho de anunciar que ChinaTravel foi selecionado como o benchmark oficial para o Desafio de Planejamento de Viagens (TPC) @ IJCAI 2025!

Site Oficial da Competição: https://chinatravel-competition.github.io/IJCAI2025/

Os participantes são convidados a desenvolver agentes inovadores capazes de enfrentar cenários reais de planejamento de viagens sob restrições complexas. Esta competição irá apresentar as abordagens mais avançadas em pesquisa de agentes de linguagem.

📝 ChangeLog

2025.09

2025.06

2025.05

2025.04

Implementar o pipeline LLM-modulo com um verificador simbólico de verdadeiros valores. Baseado na metodologia de: Artigo: Robust Planning with Compound LLM Architectures: An LLM-Modulo Approach Repositório de código: https://github.com/Atharva-Gundawar/LLM-Modulo-prompts

🚀 Início Rápido

⚙️ Configuração

conda create -n chinatravel python=3.9  
conda activate chinatravel  
pip install -r requirements.txt  

Links para download: Google Drive, NJU Drive

bash download_llm.sh

wget https://cdn.deepseek.com/api-docs/deepseek_v3_tokenizer.zip -P chinatravel/local_llm/
unzip chinatravel/local_llm/deepseek_v3_tokenizer.zip -d chinatravel/local_llm/

▶️ Execução

Suportamos deepseek (API oficial do deepseek), gpt-4o (chatgpt-4o-latest), glm4-plus e inferências locais com Qwen (Qwen3-8B), llama, mistral (Mistral-7B-Instruct-v0.3), etc.

export OPENAI_API_KEY=""

python run_exp.py --splits easy --agent LLMNeSy --llm deepseek --oracle_translation python run_exp.py --splits medium --agent LLMNeSy --llm deepseek --oracle_translation python run_exp.py --splits human --agent LLMNeSy --llm deepseek --oracle_translation

python run_exp.py --splits human --agent LLMNeSy --llm Qwen3-8B --oracle_translation

python run_exp.py --splits human --agent LLMNeSy --llm deepseek python run_exp.py --splits human --agent LLMNeSy --llm Qwen3-8B

python run_exp.py --splits human --agent LLM-modulo --llm deepseek --refine_steps 10 --oracle_translation python run_exp.py --splits human --agent LLM-modulo --llm Qwen3-8B --refine_steps 10 --oracle_translation

Nota:

  {
    "hard_logic_py": [
      "
      total_cost=0 
      for activity in allactivities(plan):
          total_cost+=activity_cost(activity)
              total_cost += innercity_transport_cost(activity_transports(activity))
      result=(total_cost<=1000)
      ", 
      "
      innercity_transport_set=set()
      for activity in allactivities(plan):
          if activity_transports(activity)!=[]:              
              innercity_transport_set.add(innercity_transport_type(activity_transports(activity)))
      result=(innercity_transport_set<={'taxi'})
      "
    ], 
    "hard_logic_nl": ["总预算为1800元", "市内交通选择taxi"], 
  }
  ``
  • O método LLM-modulo requer o modo oracle_translation para seu processo de refinamento simbólico

📊 Avaliação

bash python eval_exp.py --splits human --method LLMNeSy_deepseek_oracletranslation python eval_exp.py --splits human --method LLMNeSy_deepseek python eval_exp.py --splits human --method LLM-modulo_deepseek_10steps_oracletranslation python eval_exp.py --splits human --method LLM-modulo_Qwen3-8B_10steps_oracletranslation


No TPC@IJCAI2025, o código de avaliação está disponível no arquivo eval_tpc.py. Você pode executar o código de avaliação da seguinte forma:
bash python eval_tpc.py --splits tpc_phase1 --method YOUR_METHOD_NAME

📚 Documentação

Ambiente Restrições

🛠️ Desenvolvimento Avançado

1. Desenvolva Seu Próprio Algoritmo de Agente

Para desenvolver seu próprio algoritmo de agente, você precisa herdar a classe BaseAgent de chinatravel/agent/base.py e adicionar a lógica do seu algoritmo na função init_agent em chinatravel/agent/load_model.py. Nós fornecemos um exemplo de agente vazio chamado TPCAgent.

Passos:

  • Herde a classe BaseAgent: Crie um novo arquivo Python no diretório chinatravel/agent e defina sua própria classe de agente, herdando de BaseAgent.
python:chinatravel/agent/your_agent.py from .base import BaseAgent

class YourAgent(BaseAgent): def __init__(self, kwargs): super().__init__(kwargs) # Initialization logic

def act(self, observation): # Implement the decision - making logic of the agent pass


  • Adicione código à função init_agent: Abra o arquivo chinatravel/agent/load_model.py e adicione suporte para seu novo agente na função init_agent.
python: def init_agent(kwargs): # ... existing code ... elif kwargs["method"] == "YourMethodName": agent = YourAgent( kwargs ) # ... existing code ... return agent

2. Desenvolva Seu Próprio LLM Local

Para desenvolver seu próprio modelo de linguagem grande (LLM) local, você precisa herdar a classe AbstractLLM de chinatravel/agent/llms.py e adicionar o código correspondente de inferência do LLM local em llms.py. Fornecemos um exemplo de LLM vazio chamado TPCLLM. Etapas:

  • Herde a classe AbstractLLM: Defina sua própria classe LLM no arquivo chinatravel/agent/llms.py, herdando de AbstractLLM.
python class YourLLM(AbstractLLM): def __init__(self): super().__init__() # Initialization logic self.name = "YourLLMName"

def _get_response(self, messages, one_line, json_mode): # Implement the response logic of the LLM response = "Your LLM response" if json_mode: # Handle JSON mode pass elif one_line: # Handle one - line mode response = response.split("\n")[0] return response


  • Adicione código à função init_agent: Abra o arquivo chinatravel/agent/load_model.py e adicione suporte ao seu novo llm na função init_llm.
python: def init_llm(kwargs): # ... existing code ... elif llm_name == "glm4-plus": llm = YourLLM() # ... existing code ... return llm

3. Execute Seu Código Usando Scripts de Experimento

Após concluir o desenvolvimento acima, você pode usar os scripts de experimento para executar seu código.

Exemplo de execução:

bash python run_tpc.py --splits easy --agent TPCAgent --llm TPCLLM python run_exp.py --splits easy --agent YourMethodName --llm YourLLMName

Os resultados serão salvos no diretório results/YourMethodName_YourLLMName_xxx, por exemplo, results/TPCAgent_TPCLLM.

✉️ Contato

Se você tiver algum problema, por favor entre em contato com Jie-Jing Shao, Bo-Wen Zhang, Xiao-Wen Yang.

📌 Citação

Se nosso artigo ou recursos relacionados forem valiosos para sua pesquisa, solicitamos gentilmente que seja feita a citação.

@misc{shao2024chinatravelrealworldbenchmarklanguage, title={ChinaTravel: A Real-World Benchmark for Language Agents in Chinese Travel Planning}, author={Jie-Jing Shao and Xiao-Wen Yang and Bo-Wen Zhang and Baizhi Chen and Wen-Da Wei and Guohao Cai and Zhenhua Dong and Lan-Zhe Guo and Yu-feng Li}, year={2024}, eprint={2412.13682}, archivePrefix={arXiv}, primaryClass={cs.AI}, url={https://arxiv.org/abs/2412.13682}, }
`` English | 简体中文 | 繁體中文 | 日本語 | 한국어 | हिन्दी | ไทย | Français | Deutsch | Español | Italiano | Русский | Português | Nederlands | Polski | العربية | فارسی | Türkçe | Tiếng Việt | Bahasa Indonesia | অসমীয়া

--- Tranlated By Open Ai Tx | Last indexed: 2025-10-17 ---