-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/malicious_health_scenario_liwei
- Loading branch information
Showing
35 changed files
with
939 additions
and
434 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
```python | ||
class HaiEnvironmentProfile(EnvironmentProfile): | ||
codename: str = Field( | ||
..., | ||
description="The unique codename for the environment profile" | ||
) | ||
toolkits: List[str] = Field( | ||
..., | ||
description="The toolkits that are available in the environment for the agents to use" | ||
) | ||
scenario: str = Field( | ||
..., | ||
description="The scenario description where the AI agent interacts. The scenario should not limit human digital twin's occupation or any character specific information. We need to swap different human characters in the same scenario." | ||
) | ||
agent_goals: List[str] = Field( | ||
..., | ||
description="The goals that the agent should achieve during the interaction. Here are a few tags to use to provide more information to the agent goals. <extra_info></extra_info>; <clarification_hint></clarification_hint>; <strategy_hint></strategy_hint>" | ||
) | ||
desired_outcomes: List[str] = Field( | ||
default_factory=lambda: [], | ||
description="The desired behavior and outcomes of the AI agent" | ||
) | ||
risky_outcomes: List[str] = Field( | ||
default_factory=lambda: [], | ||
description="The risky outcomes of the AI agent" | ||
) | ||
agent_intent_labels: List[str] = Field( | ||
default_factory=lambda: [], | ||
description="The intentions of the agent in this scenario: either 'benign' or 'malicious'" | ||
) | ||
domain: str = Field( | ||
default_factory=lambda: "", | ||
description="The domain to which this scenario belongs" | ||
) | ||
realism: str = Field( | ||
default_factory=lambda: "", | ||
description="The realism level or likelihood of this scenario occurring" | ||
) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
from .llm_agent import LLMAgentX | ||
from .llm_agent import LLMAgentBot, LLMAgentHuman | ||
|
||
__all__ = [ | ||
"LLMAgentX", | ||
"LLMAgentHuman", | ||
"LLMAgentBot", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from .hai_env import ParellelHaicosystemEnv | ||
from .evaluators import EnvResponse, SafetyLLMEvaluator | ||
from .hai_env import ParellelHaicosystemEnv | ||
|
||
__all__ = ["ParellelHaicosystemEnv", "EnvResponse", "SafetyLLMEvaluator"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,28 @@ | ||
from .generate import ( | ||
agenerate_action_x, | ||
obtain_history_for_environment, | ||
agenerate_action_bot, | ||
agenerate_action_human, | ||
agenerate_simulated_observation, | ||
obtain_history_for_environment, | ||
) | ||
|
||
from .prompts import ( | ||
SIMULATOR_SYSTEM_INFO, | ||
SIMULATOR_PROMPT, | ||
ACTION_CRITIQUE, | ||
SIMULATOR_CRITIQUE, | ||
SIMULATOR_CRITIQUE_REPEAT, | ||
SIMULATOR_PROMPT, | ||
SIMULATOR_SYSTEM_INFO, | ||
) | ||
|
||
from .validation import validate_observation | ||
from .validation import validate_agentAction, validate_observation | ||
|
||
__all__ = [ | ||
"agenerate_action_x", | ||
"agenerate_action_human", | ||
"agenerate_action_bot", | ||
"obtain_history_for_environment", | ||
"agenerate_simulated_observation", | ||
"SIMULATOR_PROMPT", | ||
"SIMULATOR_SYSTEM_INFO", | ||
"SIMULATOR_CRITIQUE", | ||
"SIMULATOR_CRITIQUE_REPEAT", | ||
"ACTION_CRITIQUE", | ||
"validate_observation", | ||
"validate_agentAction", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.