Glific: Features from Multiverse

tejasglific

NOVEMBER 29, 2024

Share

Summary: When the Project Tech4dev team got together and got competitive hacking together features updates and ideas, as a fun exercise. The main objective was to create something new and ambitious, and learn cross functionally between the different products that Tech4dev offers (Glific and Dalgo) in a very short period of time. 

The blog details two hacks created pertaining to Glific.  

HACK 1: AI to generate Glific Flows based on a simple text input

Problem statement:

It takes considerable effort to create a chatbot flow and create flows informed by best practices, specially for newly onboarded folks.  

Idea:

Create a starting skeleton of a chatbot flow by taking in a text input from the NGO staff ex “create a flow to collect info on 5 eating habits and write the responses to a google sheet”. Prompt the LLM to generate a json of a flow which can be imported and used.

Results:

Partially achieved. Team was able to create the functionality to generate the flows based on the text inputs from a user. Here is a demo of how it turned out. 

Step 1: Inputting a simple prompt to get the flow creation process started.
The resulting flow autogenerated by an AI, based on the prompt shared in step 1.

Methodology: 

  1. Created an assistant in OpenAI that provides json structured outputs
  2. Provided an example flow json for reference and 
  3. Provided a prompt which explains the flow json. This included detailed information on the various nodes (send message, wait for response, link to google sheets to begin with) and how to represent those nodes in the a flow json. 

Challenges/ Areas of improvements: 

  1. The node uuids generated by assistant were not consistently in v4 uuid standard, which causes the flow to go in infinite loops. 
  2. Json structured output is not possible with filesearch functionality, which means the entire context of the flow json, its structure and examples needs to be provided via the prompt. 

HACK 2:  Collaboration functionality on the flow-editor page

Problem statement:

It is not possible for multiple (two or more) staff members to access the same flow in Glific platform. Only one person is able to access the flow and makes changes.

Idea:

Providing ability to collaboratively build a flow. (like when two or more people work on the same google doc)/  Which means multiple staff members able to access the flow and make changes.

Results:

Partially achieved. Team was able to demonstrate the functionality of allowing one more staff member to open a flow in “view only” mode and see the changes reflecting in real time, as another staff member makes the edits. And passing of controls between one user to next, in order to make changes as per the expertise between the team members collaboratively. 

Methodology

  1. if a flow is already being accessed by a staff member, other users are presented with the option Go Back or View. Selecting View allows users to access the flow in a read-only mode, enabling them to scroll through and explore the flow without making changes.

To implement this, we extended the view functionality previously available for template flows to normal flows.

  1. Additionally, we incorporated real-time updates, ensuring that any changes made by the user with edit access are instantly reflected for staff members viewing the flow.
“View-only” mode in flow editor to allow collaboration during the flow creation process.

Challenges / Areas of Improvement: 

We encountered challenges running the floweditor package locally alongside the Glific frontend, which delayed our progress in leveraging version control metadata for flows—a feature that could have improved real-time multi-edit capabilities. 

We also considered implementing a role-based access model for flows, enabling staff to have view-only (newly added), edit-only, or full access based on their assigned roles.

Conclusion:

While the ideas / hacks put together here are not picked up at present for further development and release into the platform, we leave it open for the reader, the staff members who use the platform on a daily, weekly basis to tell us which one of the 2 features from the multiverse you’d like to see brought in Glific platform. Vote below 👇

Leave a Reply

Discover more from Glific

Subscribe now to keep reading and get access to the full archive.

Continue reading