id stringlengths 14 15 | text stringlengths 30 2.4k | source stringlengths 48 124 |
|---|---|---|
9781410b5431-21 | array([1, 1, 1, 1, 1], dtype=int8)} Reward: 0 Termination: False Truncation: False Return: 0 Action: 2 Observation: {'observation': array([0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., ... | https://python.langchain.com/docs/use_cases/agent_simulations/petting_zoo |
9781410b5431-22 | 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 1., 0., 0., 0., 0., 0., 1., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 6., 20.], dtype=float32), 'action_mask':... | https://python.langchain.com/docs/use_cases/agent_simulations/petting_zoo |
9781410b5431-23 | 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 1., 1., 0., 0., 1., 0., 0., 0., 0., 0., 8., 100.], dtype=fl... | https://python.langchain.com/docs/use_cases/agent_simulations/petting_zoo |
9781410b5431-24 | Observation: {'observation': array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., ... | https://python.langchain.com/docs/use_cases/agent_simulations/petting_zoo |
9781410b5431-25 | True Return: -1.0 Action: None Observation: {'observation': array([ 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., ... | https://python.langchain.com/docs/use_cases/agent_simulations/petting_zoo |
9781410b5431-26 | dtype=int8)} Reward: 0 Termination: True Truncation: True Return: 0 Action: None Observation: {'observation': array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0.,... | https://python.langchain.com/docs/use_cases/agent_simulations/petting_zoo |
9781410b5431-27 | dtype=float32), 'action_mask': array([1, 1, 0, 0, 0], dtype=int8)} Reward: 0 Termination: True Truncation: True Return: 0 Action: None Observation: {'observation': array([ 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0... | https://python.langchain.com/docs/use_cases/agent_simulations/petting_zoo |
9781410b5431-28 | 0., 0., 2., 100.], dtype=float32), 'action_mask': array([1, 1, 0, 0, 0], dtype=int8)} Reward: 0 Termination: True Truncation: True Return: 0 Action: NonePreviousMulti-agent decentralized speaker selectionNextAgent Debates with ToolsInstall pettingzoo and other dependenciesImport ... | https://python.langchain.com/docs/use_cases/agent_simulations/petting_zoo |
52929562b46f-0 | Page Not Found | 🦜�🔗 Langchain
Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKPage Not FoundWe could not find what you were looking for.Please contact the owner of the site that linked you to the original URL and let them know their link is broken.CommunityDisc... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools.html |
0a174eeca8d5-0 | Page Not Found | 🦜�🔗 Langchain
Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKPage Not FoundWe could not find what you were looking for.Please contact the owner of the site that linked you to the original URL and let them know their link is broken.CommunityDisc... | https://python.langchain.com/docs/use_cases/agent_simulations/petting_zoo.html |
ab087b06af17-0 | Multi-Player Dungeons & Dragons | 🦜�🔗 Langchain | https://python.langchain.com/docs/use_cases/agent_simulations/multi_player_dnd |
ab087b06af17-1 | Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKUse casesQA and Chat over DocumentsAnalyzing structured dataExtractionInteracting with APIsChatbotsSummarizationCode UnderstandingAgent simulationsCAMEL Role-Playing Autonomous Cooperative AgentsGenerative Agents in LangChainSi... | https://python.langchain.com/docs/use_cases/agent_simulations/multi_player_dnd |
ab087b06af17-2 | def __init__( self, name: str, system_message: SystemMessage, model: ChatOpenAI, ) -> None: self.name = name self.system_message = system_message self.model = model self.prefix = f"{self.name}: " self.reset() def reset(self): self.message_histo... | https://python.langchain.com/docs/use_cases/agent_simulations/multi_player_dnd |
ab087b06af17-3 | DialogueSimulator class takes a list of agents. At each step, it performs the following:Select the next speakerCalls the next speaker to send a message Broadcasts the message to all other agentsUpdate the step counter. | https://python.langchain.com/docs/use_cases/agent_simulations/multi_player_dnd |
ab087b06af17-4 | The selection of the next speaker can be implemented as any function, but in this case we simply loop through the agents.class DialogueSimulator: def __init__( self, agents: List[DialogueAgent], selection_function: Callable[[int, List[DialogueAgent]], int], ) -> None: self.agents = age... | https://python.langchain.com/docs/use_cases/agent_simulations/multi_player_dnd |
ab087b06af17-5 | for receiver in self.agents: receiver.receive(speaker.name, message) # 4. increment time self._step += 1 return speaker.name, messageDefine roles and quest​character_names = ["Harry Potter", "Ron Weasley", "Hermione Granger", "Argus Filch"]storyteller_name = "Dungeon Master"quest = "Fi... | https://python.langchain.com/docs/use_cases/agent_simulations/multi_player_dnd |
ab087b06af17-6 | character_description = ChatOpenAI(temperature=1.0)( character_specifier_prompt ).content return character_descriptiondef generate_character_system_message(character_name, character_description): return SystemMessage( content=( f"""{game_description} Your name is {character_name}. ... | https://python.langchain.com/docs/use_cases/agent_simulations/multi_player_dnd |
ab087b06af17-7 | in {word_limit} words or less. Speak directly to {storyteller_name}. Do not add anything else.""" ),]storyteller_description = ChatOpenAI(temperature=1.0)( storyteller_specifier_prompt).contentstoryteller_system_message = SystemMessage( content=( f"""{game_description}You are the storytel... | https://python.langchain.com/docs/use_cases/agent_simulations/multi_player_dnd |
ab087b06af17-8 | Your destiny is not of your own choosing, but you must rise to the occasion and destroy the evil horcruxes. The wizarding world is counting on you." Ron Weasley Description: Ron Weasley, you are Harry's loyal friend and a talented wizard. You have a good heart but can be quick to anger. Keep your emotions in chec... | https://python.langchain.com/docs/use_cases/agent_simulations/multi_player_dnd |
ab087b06af17-9 | Do not add anything else.""" ),]specified_quest = ChatOpenAI(temperature=1.0)(quest_specifier_prompt).contentprint(f"Original quest:\n{quest}\n")print(f"Detailed quest:\n{specified_quest}\n") Original quest: Find all of Lord Voldemort's seven horcruxes. Detailed quest: Harry Potter and his companions... | https://python.langchain.com/docs/use_cases/agent_simulations/multi_player_dnd |
ab087b06af17-10 | indices: 1 2 3 The storyteller is index 0. Then the selected index will be as follows: step: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 idx: 0 1 0 2 0 3 0 1 0 2 0 3 0 1 0 2 0 """ if step % 2 == 0: idx = 0 else: idx = (step // 2) % (len(agents) - 1) + 1 retur... | https://python.langchain.com/docs/use_cases/agent_simulations/multi_player_dnd |
ab087b06af17-11 | (Harry Potter): I suggest we sneak into the Forbidden Forest under the cover of darkness. Ron, Hermione, and I can use our wands to create a Disillusionment Charm to make us invisible. Filch, you can keep watch for any signs of danger. Let's move quickly and quietly. (Dungeon Master): As you make your way th... | https://python.langchain.com/docs/use_cases/agent_simulations/multi_player_dnd |
ab087b06af17-12 | need to be careful not to let the flames get out of control. Ron, can you help me create a protective barrier around us while Harry uses the sword? (Dungeon Master): Harry retrieves the Sword of Gryffindor from his bag and holds it tightly. Hermione and Ron cast a protective barrier around the group as H... | https://python.langchain.com/docs/use_cases/agent_simulations/multi_player_dnd |
ab087b06af17-13 | let us know if there are any more approaching. (Dungeon Master): Harry's shield protects the group from the Death Eaters' spells as Ron and Hermione launch their own attacks. The Death Eaters are no match for the combined power of the trio and are quickly defeated. You continue on your journey, knowing that ... | https://python.langchain.com/docs/use_cases/agent_simulations/multi_player_dnd |
ab087b06af17-14 | leads Hermione to a hidden passageway that leads to Harry and Ron's location. Hermione's spell repels the dementors, and the group is reunited. They continue their search, knowing that every moment counts. The fate of the wizarding world rests on their success. (Argus Filch): *I keep watch as the group searc... | https://python.langchain.com/docs/use_cases/agent_simulations/multi_player_dnd |
ab087b06af17-15 | Voldemort's soul. Harry uses the Sword of Gryffindor to destroy it, and the group feels a sense of relief knowing that they are one step closer to defeating the Dark Lord. But there are still four more horcruxes to find and destroy. The hunt continues. (Dungeon Master): As the group continues their quest, th... | https://python.langchain.com/docs/use_cases/agent_simulations/multi_player_dnd |
ae7f4273a85e-0 | CAMEL Role-Playing Autonomous Cooperative Agents | 🦜�🔗 Langchain | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing |
ae7f4273a85e-1 | Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKUse casesQA and Chat over DocumentsAnalyzing structured dataExtractionInteracting with APIsChatbotsSummarizationCode UnderstandingAgent simulationsCAMEL Role-Playing Autonomous Cooperative AgentsGenerative Agents in LangChainSi... | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing |
ae7f4273a85e-2 | agents and beyond.The original implementation: https://github.com/lightaime/camelProject website: https://www.camel-ai.org/Arxiv paper: https://arxiv.org/abs/2303.17760Import LangChain related modules​from typing import Listfrom langchain.chat_models import ChatOpenAIfrom langchain.prompts.chat import ( SystemMess... | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing |
ae7f4273a85e-3 | output_message = self.model(messages) self.update_messages(output_message) return output_messageSetup OpenAI API key and roles and task for role-playing​import osos.environ["OPENAI_API_KEY"] = ""assistant_role_name = "Python Programmer"user_role_name = "Stock Trader"task = "Develop a trading bot for the... | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing |
ae7f4273a85e-4 | for AI assistant and AI user for role-playing​assistant_inception_prompt = """Never forget you are a {assistant_role_name} and I am a {user_role_name}. Never flip roles! Never instruct me!We share a common interest in collaborating to successfully complete a task.You must help me to complete the task.Here is the task... | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing |
ae7f4273a85e-5 | or question. The paired "Input" provides further context or information for the requested "Instruction".You must give me one instruction at a time.I must write a response that appropriately completes the requested instruction.I must decline your instruction honestly if I cannot perform the instruction due to physical, ... | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing |
ae7f4273a85e-6 | return assistant_sys_msg, user_sys_msgCreate AI assistant agent and AI user agent from obtained system messages​assistant_sys_msg, user_sys_msg = get_sys_msgs( assistant_role_name, user_role_name, specified_task)assistant_agent = CAMELAgent(assistant_sys_msg, ChatOpenAI(temperature=0.2))user_agent = CAMELAgent(use... | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing |
ae7f4273a85e-7 | break Original task prompt: Develop a trading bot for the stock market Specified task prompt: Develop a Python-based swing trading bot that scans market trends, monitors stocks, and generates trading signals to help a stock trader to place optimal buy and sell orders with defined stop losses and profit ... | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing |
ae7f4273a85e-8 | Next request. AI User (Stock Trader): Instruction: Load historical stock data into a pandas DataFrame. Input: The path to the CSV file containing the historical stock data. AI Assistant (Python Programmer): Solution: We can load historical stock data into a pandas DataFrame using ... | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing |
ae7f4273a85e-9 | the DataFrame in ascending order by date. Next request. AI User (Stock Trader): Instruction: Calculate the short-term and long-term moving averages for the stock data using the `ta.SMA()` function from ta-lib. Input: The period for the short-term moving average and the period for the long-term movi... | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing |
ae7f4273a85e-10 | function from pandas. We need to pass the historical stock data, the short-term moving average, and the long-term moving average as arguments to this function. We can use the following code to create the new DataFrame: ``` new_df = pd.concat([df, short_ma, long_ma], axis=1) new_df.columns = ['open', 'high'... | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing |
ae7f4273a85e-11 | on the crossover of the short-term and long-term moving averages. If the short-term moving average is greater than the long-term moving average, the signal is 1 (buy), otherwise the signal is -1 (sell). Next request. AI User (Stock Trader): Instruction: Create a new column in the DataFrame that indica... | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing |
ae7f4273a85e-12 | sell_price = new_df['close'][i] if sell_price <= buy_price * (1 - stop_loss): new_df['pnl'][i] = -stop_loss elif sell_price >= buy_price * (1 + profit_target): new_df['pnl'][i] = profit_target else: new_df['pnl'][i] = (sell_price - buy_price)... | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing |
ae7f4273a85e-13 | Solution: We can calculate the total profit or loss for all trades by summing the values in the 'pnl' column of the DataFrame. We can use the following code to calculate the total profit or loss: ``` total_pnl = new_df['pnl'].sum() ``` This will calculate the total profit or loss for all trades and ... | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing |
ae7f4273a85e-14 | average. The x-axis represents the date and the y-axis represents the price. The chart also includes a legend that labels each line. Next request. AI User (Stock Trader): Instruction: Visualize the buy and sell signals using a scatter plot. Input: None. AI Assistant (Python Programmer): ... | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing |
ae7f4273a85e-15 | Print the total profit or loss for all trades. Input: None. AI Assistant (Python Programmer): Solution: We can print the total profit or loss for all trades using the `print()` function. We can use the following code to print the total profit or loss: ``` print('Total Profit/Loss: {:.2%}'... | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing |
ae7f4273a85e-16 | = ta.SMA(df['close'], timeperiod=short_period) long_ma = ta.SMA(df['close'], timeperiod=long_period) # Create a new DataFrame that combines the historical stock data with the short-term and long-term moving averages new_df = pd.concat([df, short_ma, long_ma], axis=1) new_df.columns = ['open', 'high', 'l... | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing |
ae7f4273a85e-17 | == 1: sell_price = new_df['close'][i] if sell_price <= buy_price * (1 - stop_loss): new_df['pnl'][i] = -stop_loss elif sell_price >= buy_price * (1 + profit_target): new_df['pnl'][i] = profit_target else: new_df['pnl'][i] = (sell_p... | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing |
ae7f4273a85e-18 | sell_signals = new_df[new_df['signal'] == -1] plt.figure(figsize=(12,6)) plt.scatter(buy_signals.index, buy_signals['close'], label='Buy', marker='^', color='green') plt.scatter(sell_signals.index, sell_signals['close'], label='Sell', marker='v', color='red') plt.plot(new_df.index, new_df['close'], label='C... | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing |
ae7f4273a85e-19 | and AI user from role names and the taskCreate AI assistant agent and AI user agent from obtained system messagesStart role-playing session to solve the task!CommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright © 2023 LangChain, Inc. | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing |
f63363a199be-0 | Simulated Environment: Gymnasium | 🦜�🔗 Langchain | https://python.langchain.com/docs/use_cases/agent_simulations/gymnasium |
f63363a199be-1 | Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKUse casesQA and Chat over DocumentsAnalyzing structured dataExtractionInteracting with APIsChatbotsSummarizationCode UnderstandingAgent simulationsCAMEL Role-Playing Autonomous Cooperative AgentsGenerative Agents in LangChainSi... | https://python.langchain.com/docs/use_cases/agent_simulations/gymnasium |
f63363a199be-2 | """Your goal is to maximize your return, i.e. the sum of the rewards you receive.I will give you an observation, reward, terminiation flag, truncation flag, and the return so far, formatted as:Observation: <observation>Reward: <reward>Termination: <termination>Truncation: <truncation>Return: <sum_of_rewards>You will re... | https://python.langchain.com/docs/use_cases/agent_simulations/gymnasium |
f63363a199be-3 | return obs_message def _act(self): act_message = self.model(self.message_history) self.message_history.append(act_message) action = int(self.action_parser.parse(act_message.content)["action"]) return action def act(self): try: for attempt in tenacity.Retrying( ... | https://python.langchain.com/docs/use_cases/agent_simulations/gymnasium |
f63363a199be-4 | simulated environment and agent​env = gym.make("Blackjack-v1")agent = GymnasiumAgent(model=ChatOpenAI(temperature=0.2), env=env)Main loop​observation, info = env.reset()agent.reset()obs_message = agent.observe(observation)print(obs_message)while True: action = agent.act() observation, reward, termination, tru... | https://python.langchain.com/docs/use_cases/agent_simulations/gymnasium |
584f740e7503-0 | Agent Debates with Tools | 🦜�🔗 Langchain | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-1 | Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKUse casesQA and Chat over DocumentsAnalyzing structured dataExtractionInteracting with APIsChatbotsSummarizationCode UnderstandingAgent simulationsCAMEL Role-Playing Autonomous Cooperative AgentsGenerative Agents in LangChainSi... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-2 | ) -> None: self.name = name self.system_message = system_message self.model = model self.prefix = f"{self.name}: " self.reset() def reset(self): self.message_history = ["Here is the conversation so far."] def send(self) -> str: """ Applies the chatmodel to t... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-3 | ) -> None: self.agents = agents self._step = 0 self.select_next_speaker = selection_function def reset(self): for agent in self.agents: agent.reset() def inject(self, name: str, message: str): """ Initiates the conversation with a {message} from {name} "... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-4 | class that augments DialogueAgent to use tools.class DialogueAgentWithTools(DialogueAgent): def __init__( self, name: str, system_message: SystemMessage, model: ChatOpenAI, tool_names: List[str], **tool_kwargs, ) -> None: super().__init__(name, system_message, mode... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-5 | [self.system_message.content] + self.message_history + [self.prefix] ) ) ) return message.contentDefine roles and topic​names = { "AI accelerationist": ["arxiv", "ddg-search", "wikipedia"], "AI alarmist": ["arxiv", "ddg-search", "wikipedia"],}topic = "The current impact o... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-6 | else.""" ), ] agent_description = ChatOpenAI(temperature=1.0)(agent_specifier_prompt).content return agent_descriptionagent_descriptions = {name: generate_agent_description(name) for name in names}for name, description in agent_descriptions.items(): print(description) The AI accelerationist is a b... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-7 | name, system_message in agent_system_messages.items(): print(name) print(system_message) AI accelerationist Here is the topic of conversation: The current impact of automation and artificial intelligence on employment The participants are: AI accelerationist, AI alarmist Your name is AI accele... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-8 | is a threat to humanity. You see it as a looming danger, one that could take away jobs from millions of people. You believe it's only a matter of time before we're all replaced by machines, leaving us redundant and obsolete. Your goal is to persuade your conversation partner of your point of view. DO look... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-9 | advancements will specifically affect job growth and opportunities for individuals in the manufacturing industry? AI accelerationist and AI alarmist, we want to hear your insights. Main Loop​# we set `top_k_results`=2 as part of the `tool_kwargs` to prevent results from overflowing the context limitagents = [ D... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-10 | > Entering new AgentExecutor chain... ```json { "action": "DuckDuckGo Search", "action_input": "impact of automation and AI on employment in manufacturing industry" } ``` Observation: For the past three years, we have defined AI high performers as those organizations that respondents say ar... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-11 | AI and automation are causing significant concerns for the manufacturing industry. A recent report from Goldman Sachs estimates that around 300 million jobs could be affected by generative AI, meaning 18% of work globally could be automated, with more advanced economies being heavily impacted. While AI does offer benef... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-12 | 58 percent. McKinsey_Website_Accessibility@mckinsey.com Manufacturing (80%) and technology (64%) sectors have the highest AI usage among executives, whereas construction (52%) and finance (62%) have lower adoption rates. This suggests that AI's... Digital transformations in the manufacturing industry and beyond present... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-13 | more than doubled, with 50% of respondents reporting AI usage in at least one business area. Manufacturing and technology sectors have the highest AI usage among executives. AI and automation in the manufacturing industry present opportunities for workers to transition from repetitive tasks to more dynamic, rewarding r... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-14 | is, 20 percent or more of EBIT from AI use. The proportion of respondents falling into that group has remained steady at about 8 percent. The Impact of AI on Employment As often happens, the impact of AI on employment is a rather complex issue with both positive and negative aspects. Though it is still only a potential... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-15 | to job losses in some industries, but it's essential to consider the new jobs and opportunities that AI can create. We must focus on preparing the workforce for these new roles and ensuring that the benefits of AI are distributed fairly across society. > Entering new AgentExecutor chain... ```json... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-16 | 50% of respondents reporting AI usage in at least one business area. This transformation can assist businesses in accelerating their growth and profitability. While AI-enabled intelligent automation can take over many monotonous, process-driven jobs, it can also boost labor productivity growth and global GDP by as much... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-17 | "negative impact of AI and automation on employment" } ``` Observation: Some workforce experts say AI and other new technologies will hurt middle-level, white-collar jobs more than lower-paying, physically intensive jobs. McKinsey's Madgavkar said it will be hard... Some uses of AI are unlikely to impact human... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-18 | the rapidly changing job market. The potential job losses and workforce displacement caused by AI and automation cannot be ignored, and we must take action to ensure a fair and equitable transition for all." } ``` > Finished chain. (AI alarmist): Recent research indicates that AI and automation could le... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-19 | jobs have also been affected throughout modern history. Historical examples include artisan weavers reduced to poverty after the introduction of mechanized looms. During World War II, Alan Turing's Bombe machine compressed and decoded thousands of man-years worth of encrypted data in a matter of hours. A contemporary e... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-20 | second half of the 19th century, it became increasingly apparent that technological progress was benefiting all sections of society, including the working class. Concerns over the negative impact of innovation diminished. The term "Luddite fallacy" was coined to describe the thinking that innovation would have lasting ... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-21 | low-skilled, creative fields, and other "mental jobs". The World Bank's World Development Report 2019 argues that while automation displaces workers, technological innovation creates more new industries and jobs on balance. Page: Artificial intelligence Summary: Artificial intelligence (AI) is intelligence—... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-22 | highly successful, helping to solve many challenging problems throughout industry and academia.The various sub-fields of AI research are centered around particular goals and the use of particular tools. The traditional goals of AI research include reasoning, knowledge representation, planning, learning, natural languag... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
584f740e7503-23 | jobs are at risk of automation, but it's crucial to remember that their findings do not necessarily imply future technological unemployment. The World Bank's World Development Report 2019 also argues that while automation displaces workers, technological innovation creates more new industries and jobs on balance. By fo... | https://python.langchain.com/docs/use_cases/agent_simulations/two_agent_debate_tools |
95d84114cb53-0 | Page Not Found | 🦜�🔗 Langchain
Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKPage Not FoundWe could not find what you were looking for.Please contact the owner of the site that linked you to the original URL and let them know their link is broken.CommunityDisc... | https://python.langchain.com/docs/use_cases/agent_simulations/two_player_dnd.html |
25d4169934e7-0 | Page Not Found | 🦜�🔗 Langchain
Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKPage Not FoundWe could not find what you were looking for.Please contact the owner of the site that linked you to the original URL and let them know their link is broken.CommunityDisc... | https://python.langchain.com/docs/use_cases/agent_simulations/multi_player_dnd.html |
4a2bbb2a6d09-0 | Page Not Found | 🦜�🔗 Langchain
Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKPage Not FoundWe could not find what you were looking for.Please contact the owner of the site that linked you to the original URL and let them know their link is broken.CommunityDisc... | https://python.langchain.com/docs/use_cases/agent_simulations/multiagent_bidding.html |
dc1344e45694-0 | Page Not Found | 🦜�🔗 Langchain
Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKPage Not FoundWe could not find what you were looking for.Please contact the owner of the site that linked you to the original URL and let them know their link is broken.CommunityDisc... | https://python.langchain.com/docs/use_cases/agent_simulations/camel_role_playing.html |
5ecfdae7d1b3-0 | Page Not Found | 🦜�🔗 Langchain
Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKPage Not FoundWe could not find what you were looking for.Please contact the owner of the site that linked you to the original URL and let them know their link is broken.CommunityDisc... | https://python.langchain.com/docs/use_cases/agent_simulations/multiagent_authoritarian.html |
6470a491a701-0 | Two-Player Dungeons & Dragons | 🦜�🔗 Langchain | https://python.langchain.com/docs/use_cases/agent_simulations/two_player_dnd |
6470a491a701-1 | Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKUse casesQA and Chat over DocumentsAnalyzing structured dataExtractionInteracting with APIsChatbotsSummarizationCode UnderstandingAgent simulationsCAMEL Role-Playing Autonomous Cooperative AgentsGenerative Agents in LangChainSi... | https://python.langchain.com/docs/use_cases/agent_simulations/two_player_dnd |
6470a491a701-2 | None: self.name = name self.system_message = system_message self.model = model self.prefix = f"{self.name}: " self.reset() def reset(self): self.message_history = ["Here is the conversation so far."] def send(self) -> str: """ Applies the chatmodel to the me... | https://python.langchain.com/docs/use_cases/agent_simulations/two_player_dnd |
6470a491a701-3 | The selection of the next speaker can be implemented as any function, but in this case we simply loop through the agents.class DialogueSimulator: def __init__( self, agents: List[DialogueAgent], selection_function: Callable[[int, List[DialogueAgent]], int], ) -> None: self.agents = age... | https://python.langchain.com/docs/use_cases/agent_simulations/two_player_dnd |
6470a491a701-4 | for receiver in self.agents: receiver.receive(speaker.name, message) # 4. increment time self._step += 1 return speaker.name, messageDefine roles and quest​protagonist_name = "Harry Potter"storyteller_name = "Dungeon Master"quest = "Find all of Lord Voldemort's seven horcruxes."word_li... | https://python.langchain.com/docs/use_cases/agent_simulations/two_player_dnd |
6470a491a701-5 | content=f"""{game_description} Please reply with a creative description of the storyteller, {storyteller_name}, in {word_limit} words or less. Speak directly to {storyteller_name}. Do not add anything else.""" ),]storyteller_description = ChatOpenAI(temperature=1.0)( storyteller_specifier_pr... | https://python.langchain.com/docs/use_cases/agent_simulations/two_player_dnd |
6470a491a701-6 | actions.Speak in the first person from the perspective of {protagonist_name}.For describing your own body movements, wrap your description in '*'.Do not change roles!Do not speak from the perspective of {storyteller_name}.Do not forget to finish speaking by saying, 'It is your turn, {storyteller_name}.'Do not add anyth... | https://python.langchain.com/docs/use_cases/agent_simulations/two_player_dnd |
6470a491a701-7 | Please make the quest more specific. Be creative and imaginative. Please reply with the specified quest in {word_limit} words or less. Speak directly to the protagonist {protagonist_name}. Do not add anything else.""" ),]specified_quest = ChatOpenAI(temperature=1.0)(quest_specifier_prompt).cont... | https://python.langchain.com/docs/use_cases/agent_simulations/two_player_dnd |
6470a491a701-8 | specified_quest)print(f"({storyteller_name}): {specified_quest}")print("\n")while n < max_iters: name, message = simulator.step() print(f"({name}): {message}") print("\n") n += 1 (Dungeon Master): Harry, you must venture to the depths of the Forbidden Forest where you will find a hidden labyrinth. Within... | https://python.langchain.com/docs/use_cases/agent_simulations/two_player_dnd |
6470a491a701-9 | to create a wall of fire between myself and the acromantulas. I know that they are afraid of fire, so this should keep them at bay for a while. I use this opportunity to continue moving forward, keeping my wand at the ready in case any other creatures try to attack me. I know that I can't let anything stop me from find... | https://python.langchain.com/docs/use_cases/agent_simulations/two_player_dnd |
6470a491a701-10 | PreviousAgent Debates with ToolsNextAgentsImport LangChain related modulesDialogueAgent classDialogueSimulator classDefine roles and questAsk an LLM to add detail to the game descriptionProtagonist and dungeon master system messagesUse an LLM to create an elaborate quest descriptionMain LoopCommunityDiscordTwitterGitHu... | https://python.langchain.com/docs/use_cases/agent_simulations/two_player_dnd |
23934146c5c4-0 | Agents | 🦜�🔗 Langchain | https://python.langchain.com/docs/use_cases/agents/ |
23934146c5c4-1 | Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKUse casesQA and Chat over DocumentsAnalyzing structured dataExtractionInteracting with APIsChatbotsSummarizationCode UnderstandingAgent simulationsAgentsBabyAGI User GuideBabyAGI with ToolsCAMEL Role-Playing Autonomous Cooperat... | https://python.langchain.com/docs/use_cases/agents/ |
23934146c5c4-2 | But we also make it easy to define a custom tool, so if you need custom tools you should absolutely do that.(Optional) Step 2: Modify Agent​The built-in LangChain agent types are designed to work well in generic situations,
but you may be able to improve performance by modifying the agent implementation.
There are se... | https://python.langchain.com/docs/use_cases/agents/ |
1bd67e12c1f7-0 | BabyAGI User Guide | 🦜�🔗 Langchain | https://python.langchain.com/docs/use_cases/agents/baby_agi |
1bd67e12c1f7-1 | Skip to main content🦜�🔗 LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKUse casesQA and Chat over DocumentsAnalyzing structured dataExtractionInteracting with APIsChatbotsSummarizationCode UnderstandingAgent simulationsAgentsBabyAGI User GuideBabyAGI with ToolsCAMEL Role-Playing Autonomous Cooperat... | https://python.langchain.com/docs/use_cases/agents/baby_agi |
1bd67e12c1f7-2 | = OpenAIEmbeddings()# Initialize the vectorstore as emptyimport faissembedding_size = 1536index = faiss.IndexFlatL2(embedding_size)vectorstore = FAISS(embeddings_model.embed_query, index, InMemoryDocstore({}), {})Define the Chains​BabyAGI relies on three LLM chains:Task creation chain to select new tasks to add to th... | https://python.langchain.com/docs/use_cases/agents/baby_agi |
1bd67e12c1f7-3 | prompt = PromptTemplate( template=task_creation_template, input_variables=[ "result", "task_description", "incomplete_tasks", "objective", ], ) return cls(prompt=prompt, llm=llm, verbose=verbose)class TaskPrioriti... | https://python.langchain.com/docs/use_cases/agents/baby_agi |
1bd67e12c1f7-4 | " Start the task list with number {next_task_id}." ) prompt = PromptTemplate( template=task_prioritization_template, input_variables=["task_names", "next_task_id", "objective"], ) return cls(prompt=prompt, llm=llm, verbose=verbose)class ExecutionChain(LLMChain): """C... | https://python.langchain.com/docs/use_cases/agents/baby_agi |
1bd67e12c1f7-5 | chains defined above in a (potentially-)infinite loop.def get_next_task( task_creation_chain: LLMChain, result: Dict, task_description: str, task_list: List[str], objective: str,) -> List[Dict]: """Get the next task.""" incomplete_tasks = ", ".join(task_list) response = task_creation_chain.run( ... | https://python.langchain.com/docs/use_cases/agents/baby_agi |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.