Tag: llm

  • Team Dynamics

    While we’ve explored agent functions in these posts, Sentienta is, at its core, a multi-agent system where cooperation and debate enhance reasoning.

    Multi-agent Debate (MAD) and Multi-agent Cooperative Decision Making (CDM) have recently become intense areas of research, with numerous survey papers exploring both classical (non-LLM) and fully LLM-based approaches ([1], [2], [3]). While these reviews typically provide a high-level overview of the domains in which MAD/CDM systems operate and their general structure, they offer limited detail on enabling effective interaction among LLMs through cooperative and critical dialogue. In this post, we aim to bridge this gap, focusing specifically on techniques for enhancing LLM-based systems.

    We’ll begin by reviewing the characteristics of effective team dynamics, human or otherwise. Teams are most productive when they display these behaviors:

    • Balanced Participation – Ensure all members contribute and have the opportunity to share their insights.
    • Critical Thinking – Evaluate ideas objectively, considering their strengths and weaknesses. Encourage discussion and rebuttals where needed.
    • Well-define Expertise and Responsibilities – Each team member should bring something special to the discussion and be responsible for exercising that expertise.
    • Continuous Learning – Team members should reflect on past discussions and recall earlier decisions to refine the current dialog.
    • Defined Decision-Making Criteria – Teams should have a clear idea of how and when a problem is solved. This may or may not include a team-lead concluding the discussion.

    How might we get a team of LLM-based agents to exhibit these dynamics? LLMs are stateless, and this means that whenever we want an agent to participate, it needs to be provided with both the query, the context of the query, and any instructions on how best to answer the query.

    As discussed here, the context for the query is provided as a transcript of the current and past dialogs. The system prompt is where the agent is given instructions for team dynamics and the persona that defines the agent’s expertise.

    Here are some key points in the system prompt that address the team dynamics we’re looking for, stated in second-person instructions:

    Balanced Participation:

    **Brevity**: Keep answers short (1-2 sentences) to allow others to participate.

    **Avoid Repetition**: Do not repeat what others have or you have said. Only add new insights or alternative viewpoints.

    **Contribute**: Add new, relevant insights if your response is unique.

    Critical Thinking:

    **Critique**: Think critically about others’ comments and ask probing questions.

    **Listen Engage**: Focus on understanding your teammates and ask questions that dig into their ideas. Listen for gaps in understanding and use questions to address these gaps.

    **Avoid Repetition**: Do not repeat what others have or you have said. Only add new insights or alternative viewpoints.

    **Prioritize Questions**: Lead with questions that advance the discussion, ensuring clarification or elaboration on points made by others before providing your own insights.

    Well-define Expertise and Responsibilities:

    This is provided by the agent persona. In addition, there are these team instructions:

    **Engage**: Provide analysis, ask clarifying questions, or offer new ideas based on your expertise.

    Learning:

    **Read the Transcript**: Review past and current discussions. If neither have content, then simply answer the user’s question.

    **Reference**: Answer questions from past dialogs when relevant.

    Defined Decision-Making Criteria:

    **Prioritize High-Value Contributions**: Respond to topics that have not yet been adequately covered or address any gaps in the discussion. If multiple agents are addressing the same point, seek consensus before contributing.

    **Silence**: If you find no specific question to answer or insight to add, do not respond.

    **Completion**: If you have nothing more to add to the discussion and the user’s query has been answered, simply state you have nothing to add.

    These instructions direct each agent to contribute based on their expertise, responding to both user queries and peer inputs. They emphasize brevity and silence when no meaningful input is available, ensuring discussions remain concise, non-redundant, and goal-oriented.

    Conclusion

    The team dialog will evolve dynamically with each agent addressing the user’s query through these dynamics. The dialog will continue until each agent has participated fully, typically several times responding to ideas offered by teammates. Once each agent decides there is nothing more to add, the discussion comes to an end.

    References:

    [1] Jin, Weiqiang and Du, Hongyang and Zhao, Biao and Tian, Xingwu and Shi, Bohang and Yang, Guan, A Comprehensive Survey on Multi-Agent Cooperative Decision-Making: Scenarios, Approaches, Challenges and Perspectives. Available at SSRN.

    [2] Li, X., Wang, S., Zeng, S. et al. A survey on LLM-based multi-agent systems: workflow, infrastructure, and challenges. Vicinagearth 1, 9 (2024). Available at DOI.

    [3] Y. Rizk, M. Awad and E. W. Tunstel, “Decision Making in Multiagent Systems: A Survey,” in IEEE Transactions on Cognitive and Developmental Systems, vol. 10, no. 3, pp. 514-529, Sept. 2018, doi: 10.1109/TCDS.2018.2840971. keywords: {Decision making;Robot sensing systems;Task analysis;Robot kinematics;Particle swarm optimization;Multi-agent systems;Cooperation;decision making models;game theory;Markov decision process (MDP);multiagent systems (MASs);swarm intelligence}, Available at IEEE.

  • Tips and Tricks for Creating an Effective Agent

    Creating an agent in Sentienta is straightforward, but a few key strategies can help ensure your agent works optimally. Below, we’ll walk through the setup process and offer insights on defining an agent’s role effectively.

    Step 1: Create a Team

    Before creating an agent, you must first establish a team. To do this:

    1. Navigate to the Your Agents and Teams page using the Manage Teams button on the homepage.
    2. Click Create a Team. You’ll see three fields:
      • Name: Enter a name, such as “HR Team”
      • Type: Categorize the team (e.g., “Human Resources”).
      • Description: This defines the team’s purpose. A simple example: “This team manages Human Resources for the company.”
    3. Click Submit to create the team.

    Step 2: Create an Agent

    Once you’ve created a team, it will appear in the Teams section along with the Sentienta Support Team. Follow these steps to add an agent:

    1. Select your team (e.g., HR Team).
    2. Click Create an Agent in the left menu.
    3. Assign a name. Let’s call this agent Bob.
    4. Define Bob’s title—e.g., Benefits Specialist.
    5. Define Bob’s Persona, which outlines expertise and interactions.

    Step 3: Crafting an Effective Persona

    The Persona field defines the agent’s expertise and shapes its interactions. As discussed in our earlier post on Agent Interaction, the agent uses an LLM to communicate with both users and other agents. Since the persona is part of the LLM system prompt, it plays a crucial role in guiding the agent’s responses.

    The persona should clearly define what the agent is able to do and how the agent will interact with the other members on the team. (To see examples of effective personas, browse some of the agents in the Agent Marketplace).

    A well-crafted persona for Bob might look like this:

    “You are an expert in employee benefits administration, ensuring company programs run smoothly and efficiently. You manage health insurance, retirement plans, and other employee perks while staying up to date with legal compliance and industry best practices through your Research Assistant. You provide guidance to employees on their benefits options and collaborate with the HR Generalist and Recruiter to explain benefits to new hires.”

    Key persona components:

    • Expertise: Clearly defines Bob’s role in benefits administration.
    • User Interaction: Specifies that Bob provides guidance to employees.
    • Team Collaboration: Mentions interactions with other agents, such as the HR Generalist and Recruiter.
    • Delegation: Optionally, defines which agents Bob may delegate to—for example, a Research Assistant agent that retrieves compliance updates.

    If additional agents (like the HR Generalist or Research Assistant) don’t yet exist, their roles can be updated in Bob’s persona as the team expands.

    Once the persona is complete, click Submit to add Bob to the team. (We won’t discuss the URL optional field today, but will save for a future post.)

    Step 4: Testing Your Agent

    Now that Bob is created, you can test the agent’s expertise:

    1. Navigate to the home page and select the HR Team below Your Teams
    2. Make sure Bob’s checkbox is checked and enter a query, such as “What is your expertise?”
    3. Bob will respond with something like:

    “I am a Benefits Specialist, responsible for employee benefits administration, including health insurance, retirement plans, and other perks. I ensure compliance with regulations and provide guidance to employees on their benefits options.”

    If asked an unrelated question, such as “What is today’s weather?” Bob will remain silent. This behavior ensures that agents only respond within their expertise, promoting efficient team collaboration.

    Next Steps

    Once your agent is set up, you can explore additional customization options, such as adding company-specific benefits documentation to Bob’s knowledge base. Stay tuned for a future post on enhancing an agent’s expertise with internal documents.

  • A Deep-dive into Agents: Agent Interaction

    In previous posts, I introduced the capabilities of individual agents, including their unique memory architecture and tool access. But what sets Sentienta apart is its multi-agent platform, where agents work together to solve problems. Today, we’ll explore how these agents interact as a team.

    How Agents Work Together

    Let’s consider an example: imagine you’ve formed a team to design a new electric scooter. We’ll call this the Scooter Team, and it’s type is Product Design.

    The team consists of key specialists: a VP of Product Design as team lead, a mechanical engineer with expertise in two-wheeled vehicles, an electrical engineer for the scooter’s power system, and a legal representative to ensure compliance with regulations. In future posts, we’ll discuss how to create specialist agents in Sentienta, but for now, imagine they’re in place and ready to collaborate.

    Once the team is set up, you initiate a discussion—say, “Let’s consider all the elements needed in the scooter design.” Each agent processes the request from its area of expertise and contributes insights. As they respond, their inputs become part of an ongoing team dialogue, which, as discussed in this post, is stored in each agent’s memory and informs subsequent responses.

    Iterative Problem-Solving

    Agents interact much like human working groups: they listen to teammates before responding, integrating their insights into their own reasoning. This iterative exchange continues until the original question is thoroughly addressed.

    What does that mean for the scooter design team? Suppose that the first response comes from the mechanical engineer: she tells the team about the basic components in the design, and in particular suggests the power that is needed to drive the scooter. The electrical engineer will consider this power specification when developing his response. The agent representing legal may note that regulations cap the scooter’s speed at 25 mph.

    And this is what is interesting: the input from legal may cause the mechanical and electrical engineers to reconsider their answers and respond again. This iterative answering will continue until each agent has contributed sufficiently to fully address the query. Reasoning about the user’s question derives from this agent interaction.

    The Role of LLMs in Agent Interaction

    How does this happen? The engine that drives each agent is an LLM. The LLM system prompt includes several key instructions and information that foster team interaction: the team definition along with teammate personas are included in the prompt enabling the LLM to consider who on the team is best able to address aspects of the query.

    In addition, each agent is instructed to critically think about input from teammates when developing a response. This makes team dialogs interactive and not just isolated LLM responses. Agents are instructed to consider whether the query has been answered by other agents already. This helps to drive the dialog to conclusion.

    Looking Ahead

    This dynamic interaction forms the foundation of Sentienta’s multi-agent problem-solving. In future posts, we’ll explore concepts like delegation and agent autonomy, further uncovering the depth and efficiency of these collaborations.

  • A Deep-dive into Agents: Tool Access

    An important feature of agents is their ability to utilize tools. Of course there are many examples of software components that use tools as part of their function, but what distinguishes agents is their ability to reason about when to use a tool, which tool to use and how to utilize the results.

    In this context, a ‘tool’ refers to a software component designed to execute specific functions upon an agent’s request. This broad definition includes utilities such as file content readers, web search engines, and text-to-image generators, each offering capabilities that agents can utilize in responding to queries from users or other agents.

    Sentienta agents can access tools through several mechanisms. The first is when an agent has been pre-configured with a specific set of tools. Several agents in the Agent Marketplace utilize special tools in their roles. For example, the Document Specialist agent (‘Ed’) which you can find in the Document and Content Access section, utilizes Amazon’s S3 to store and read files, tailoring its knowledge to the content you provide.

    Angie, another agent in the Document and Content Access category, enhances team discussions by using a search engine to fetch the latest web results. This is valuable for incorporating the most current data into a team dialog, addressing the typical limitation of LLMs, which lack up-to-the-minute information in their training sets.

    You have the flexibility to go beyond pre-built tools. Another option allows you to create custom tools or integrate third-party ones. If the tool you want to use exposes a REST API that processes structured queries, you can create an agent to call the API (see the FAQ page for more information). Agent ‘Ed’, mentioned earlier, employs such an API for managing files.

    Finally, Sentienta supports completely custom agents that embody their own tool use. You might utilize a popular agent framework such as LangChain, to orchestrate more complex functions and workflows. Exposing an API in the form we just discussed will let you integrate this more complex tool-use into your team. Check out the Developers page to see how you can build a basic agent in AWS Lambda. This agent doesn’t do much, but you can see how you might add specialized functions to augment your team’s capabilities.

    In each case, the power of agent tool-use comes from the agent deciding how to use the tool and how to integrate the tool’s results into the team’s dialog. Agents may be instructed by their team to use these tools, or they may decide alone when or if to use a tool.

    This too is a large subject, and much has been written by others on this topic (see for example here and here). We’ve touched on three mechanisms you can use in Sentienta to augment the power of your agents and teams.

    In a future post we’ll discuss how agents interact in teams and how you can control their interactions through tailored personas.