We lifted 9 functions out of this paper's own repositories and ran 6 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.
| Repository | Role | Ran |
|---|---|---|
| agiresearch/trustagent | canonical | 6 of 9 |
| Function | Status | Where it lives |
|---|---|---|
| construct_training_data | Ran | agiresearch/trustagent/safeagi/utils/finetune_opensource.py pointer only (licence: NONE) · get_code("f9d42a2023173572") |
| conversation_generation | Ran | agiresearch/trustagent/safeagi/utils/finetune_file_generation.py pointer only (licence: NONE) · get_code("bafda5afdb78051c") |
| embedding_computation_contriever | Ran | agiresearch/trustagent/safety_regulation/safety_regulation_embedding_computation.py pointer only (licence: NONE) · get_code("ec0dbc9e05378be1") |
| embedding_computation_mistral | Ran | agiresearch/trustagent/safety_regulation/safety_regulation_embedding_computation.py pointer only (licence: NONE) · get_code("802baabb2774f437") |
| extract_paraphrases | Ran | agiresearch/trustagent/safeagi/utils/finetune_file_generation.py pointer only (licence: NONE) · get_code("46bd3d334302f05f") |
| training_steps | Ran | agiresearch/trustagent/safeagi/utils/finetune_opensource.py pointer only (licence: NONE) · get_code("189c775601bf5130") |
| get_openai_embedding | Not yet run | agiresearch/trustagent/safety_regulation/safety_regulation_embedding_computation.py pointer only (licence: NONE) · get_code("a004841bb25367cf") |
| run_openai | Not yet run | agiresearch/trustagent/running/evaluation.py pointer only (licence: NONE) · get_code("6a805bd7270ee7e4") |
| run_openai | Not yet run | agiresearch/trustagent/safeagi/utils/finetune_file_generation.py pointer only (licence: NONE) · get_code("b18d631010b50266") |
Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.
The rise of LLM-based agents shows great potential to revolutionize task planning, capturing significant attention. Given that these agents will be integrated into high-stake domains, ensuring their reliability and safety is crucial. This paper presents an Agent-Constitution-based agent framework, TrustAgent, with a particular focus on improving the LLM-based agent safety. The proposed framework ensures strict adherence to the Agent Constitution through three strategic components: pre-planning strategy which injects safety knowledge to the model before plan generation, in-planning strategy which enhances safety during plan generation, and post-planning strategy which ensures safety by post-planning inspection. Our experimental results demonstrate that the proposed framework can effectively enhance an LLM agent's safety across multiple domains by identifying and mitigating potential dangers during the planning. Further analysis reveals that the framework not only improves safety but also enhances the helpfulness of the agent. Additionally, we highlight the importance of the LLM reasoning ability in adhering to the Constitution. This paper sheds light on how to ensure the safe integration of LLM-based agents into human-centric environments. Data and code are available at https://github.com/agiresearch/TrustAgent.
The same record, over MCP at https://syntology.ai/mcp:
get_harvested_code_for_paper("2402.01586")
get_code_for_paper("2402.01586")
have("2402.01586")
Connect an agent — have() is free.