LogoLogo
Github
  • 🚀Getting Started
    • About Jugalbandi Manager
  • Introduction
    • About OpenyAI
    • What is Jugalbandi?
    • Why dive in: How will this playbook help you?
    • Importance and Relevance of Jugalbandi
    • Key Principles powering Jugalbandi
    • Demystifying Jugalbandi: What Jugalbandi isn’t?
  • Breaking Down Jugalbandi's Anatomy
    • Jugalbandi Manager: Your companion for building and managing AI services
    • Jugalbandi’s Key Services
    • Key Features for Enhancing Security and Privacy
  • Building with Jugalbandi
    • Technical Guide
      • explanations
        • JB Manager Architecture
        • Explanations
      • how-tos
        • Local Development
        • Write Your Own Bot
        • How to Guides
      • references
        • Dependencies
        • FSMOutput
        • References
        • Speech and Translation
        • Azure Storage
        • Whatsapp
        • Telegram
        • example-grievance-bot
          • Example Grievance Bots
      • tutorials
        • Tutorials
        • Quickstart
    • Getting Started
    • Local Development / Writing your own bot
    • Dependencies
    • Configuring the FSM to modify flows
    • Cost of building with Jugalbandi
    • Tips and Best Practices / FAQs (Including best practices for creating a knowledge base)
  • Use cases of Jugalbandi
    • Jugalbandi for Access to Legal Information
    • Jugalbandi for Govt. Schemes
    • Accessing Legal Services
    • Jugalbandi for Grievance Redressal
    • Climate Action with Wildlife First
    • Affordable Housing with Bandhu
    • Paralegal Services with Nyaya Mitra
    • UNESCO X Jugalbandi
  • Is Jugalbandi Manager Applicable to your Use case?
    • The versatile applications of Jugalbandi
    • Some other example use cases
  • Possibilities and Future Directions
    • Potential Technological Advancements
    • Jugalbandi Studio: Building with AI has never been more accessible
  • Community and Collaboration
    • Understanding the community-led spirit of our mission
    • Our current collaborators and community
  • Get Involved
    • How can volunteers contribute?
    • How can maintenance of the stack be open-sourced?
    • Technical Support and Contact Information
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. Building with Jugalbandi

Configuring the FSM to modify flows

PreviousDependenciesNextCost of building with Jugalbandi

Last updated 9 months ago

Was this helpful?

As described previously, FSMs in Jugalbandi manager help define the conversation flow and manage state transitions. This component is vital in customising Jugalbandi for each use-case, and defines terms under which external plugins may be used, and controls the information to be fed into and interpreted from the LLMs. To achieve this, the FSM uses 3 concepts:

  • State: Represents a specific point in the conversation flow. (Eg: Initial state, greeting state, information retrieval state, end state etc.) Each state is typically associated with actions that the application is supposed to undertake, this can include asking the user questions, or processing the user-input or sending messages to a specified channel (such as whatsapp, telegram or any CMS or CRM system) The ‘send_message’ function allows the application to message the user within each state. A very simple FSM flow would include the following states:

  • Initial State: The bot waits for user input.(such as ‘Hi’)

  • Greeting State: The bot greets the user.

  • Info State: The bot provides the requested information.

  • End State: The bot ends the conversation.

Global Variables: Global variables are defined in the FSM to cover core fields such as complainant name, address, dispute details, etc. These variables facilitate transitions between states. Status Indicators: Used to indicate the flow manager's actions:

  • Wait for User Input

  • Move Forward

  • Wait for Callback (e.g., waiting for an API response in PULSE)

  • Transition: The switch from one state to another.

  • Condition: Determines whether a transition should occur, and specifies the logic to trigger said transition.

  • This refers to the prompts which give the LLMs context about their specific tasks in the application that’s utilising them.

  • Lookup changes in the how-to guide of the if any modifications are required in how the application would have to process the provided knowledge base.

When configured properly, the FSM allows any developer to manage how their application interacts with users, in order to provide a structured and predictable user experience. Detailed explanations on how the FSMs can be built can be found in the how-to section of the technical , along with a reference implementation of an

indexer
documentation
FSM.