nocodebots.ai

This is the nocodebots.ai instance for the Open Justice Legaltech project 2024.

NoCodeBots is a "no-code" web-based application that allows you to build and hold conversations with your users.

Using intuitive drag-and drop tools you define sequences of tasks that then enable your users to achieve learning goals or that guide them to specific advice or information.

For further details please see www.nocodebots.ai or contact This email address is being protected from spambots. You need JavaScript enabled to view it..

 

 

 < 9: Forms and Formfill Blocks  Documentation index 10: Compute blocks and Formula rules >

A PDF form is a file that typically contains spaces in fixed positions into which information must be entered. This ensures that data can be identified by its position on official forms, but it's not as flexible when the test has to flow, such as in a letter.

 The process to create a Form that a chatbot can populate with entered data is:

  1. Create a Form and upload the PDF file
  2. Mark up the positions of the fields to be filled on the Form

Step 1: Creating a Form

If you are using a PDF form you must upload it first, so that you can then identify where the fields should be placed on the form using nocodebots.ai.

Follow these steps to create a new Form:

  1. Click "Forms" on the sidebar menu, then "New"
  2. Enter a Description for the Form
  3. Click "Save" - this is important: you can't upload a form until you do this.
  4. Click the "Upload" button that appears in the top menu
  5. Click "Choose files" and select the PDF file that contains the form.
  6. Click "Start upload"

This will upload the file and then exit to the list of Forms, where you can see the one you've just created.

 Step 2: Mark up the fields

To edit any aspect of a PDF Form (description or Fields), click on the name in the list of Forms. This will display the attached form, which can then be marked up.

 

The buttons above the form have these functions:

  • Hide/Show fields: toggle between hiding and displaying the marked-up fields
  • Show/Hide grid: toggle between showing and hiding a grid on the form - this is useful if you want to align fields with titles on a form with a blank background, such as a template letter.
  • Previous page/enter page number/Next page: navigate multi-page forms
  • +/-: zoom in and out

Marking a new Field

Marking a Field is very simple once you get the hang of it - follow these steps to become an expert!

  • You need to click on the diagonally opposite corners of the rectangle that outlines the field: in other words click the top-left corner then the bottom-right one (or "bottom-left/top-right" or "top-right/bottom-left" or "bottom-right/top-left").
  • After the first click a dashed blue rectangle will follow your mouse to show the position of the new field until you either click on the opposite corner to define the marked-up area or hit the "Escape" key to cancel adding the new field.
  • Once you have clicked the second point you'll be asked to complete the following parameters for the Field:
Parameter Options Description
Shortcode The default is FIELD_x_y where x and y are the coordinates of the top-left corner of the field. You should change this to match the shortcode of the block in the flow that will be used to populate this field on the form.
Input selection

Merge the full answer (default)

This will write the whole answer onto the field in the form.

Merge part of the answer

This will allow you to extract part of the answer, e.g. to split a date.

Valid formats for the "part" field are:

1. single digit: extract that character from the answer (starting from 1)

Examples, using answer="24/10/2023":

  • 10 = '3'
  • 11 = '' (no character 11)
  • -1 = '3' (last character)
  • -2 = '3' (second-last character)

2. range: extract from the first character to the second (starting from 1)

Examples, using answer="24/10/2023":

  • 1:2  = '24' (characters 1 and 2)
  • 2:4  = '4/1' (from character 2 to 4)
  • 4:    = '10/2023' (from character 4 to the end)
  • -4:  = '1979' (from 4th last character to the end
Text colour Black (default) Select the font colour to use when writing this field on the form
Text font Helvetica (sans serif, default)
Times (serif)
Courier (fixed-width)
Symbol
ZapfDingbats
Select the font to use when writing this field on the form

 

Text size 12 (default) Enter the size of the text to write on the form
Text style Normal (default)
Bold
Italic
Bold+Italic
Select the font style to use when writing this field on the form
Background colour White (default) Select the background colour to use when writing this field onto the form

 

Change the values as required and then click the "Save this field" button at the bottom of the popup.

If you decide not to keep the field, click the "Close" button instead.

 

Editing a Field

To edit a Field just click on it, then update and save the values in the same way as adding a new field.

 

Deleting a Field

To delete a Field, click on it, then click the "Delete this field" button on the popup and confirm that you want to delete it when prompted.

 

 You can continue to work on the Fields you want to define but remember that the changes you make are only saved to the nocodebots.ai server when you click the "Save" or "Save & Close" buttons at the top of the screen. If you want to discard all of the changes you made since the previous save, just click the "Cancel" button instead.

The marked-up form will look something like the one below.

 

 

 

PDF forms with embedded fields

Many PDF forms are simple image documents that are intended to be printed out and filled in by hand. However some PDF forms contain embedded fields for the user to type into, for example using a PDF plugin in a browser. This is often the case if a form is downloaded from a government website for example. You can tell whether the form contains embedded fields by displaying the form in a browser and testing whether you can enter text into the fields on it.

Embedded fields are removed when the form is completed by a FormFiller block, because otherwise the text that is inserted is hidden by the embedded field, which sits 'on top'' of the file background. In order to ensure that the forms generated by a FormFiller block are as visually similar as possible to the original, you should use the embedded fields as a guide when marking out the fields to be filled, and you should select the same colour as the Background Colour when editing the Field Parameters.

 

 


 < 9: Forms and Formfill Blocks  Documentation index 10: Compute blocks and Formula rules >
 < 1: Getting started; Folders  Documentation index 3: Building a flow-based chatbot: basic Blocks & Rules >

Responders are uncomplicated chatbots that are very suitable for answering a range of open questions rather than drilling down to find the answer to a specific problem that requires information to be collected first.

The key benefits of this approach are that it lets users ask questions in normal language, which can make the interaction feel more natural than following a set of prompts, and the output is limited to the answers that are designed into the chatbot so it is highly predictable. To ensure that your chatbot is able to anticipate the different questions that users could ask you just provide some sample questions for each response rather than the impossible task of trying to think of every possible combination of words that they might use.

Intent-based chatbots try to figure out what the user's intents are - what they intend to do when they come to use the chatbot. They do this using an AI approach called supervised machine learning to construct a language model from the example questions. This model is then used to work out the meaning of the user questions, by comparing them to the meanings extracted from the sample questions. Once the closest match has been found the corresponding answer is returned.

 To get a feel for how a responder works we'll create one that introduces itself then attempts to answer questions about a restaurant, such as opening times, dietary requirements and so on.

Step-by-step

Click on "Responders" in the sidebar menu and then the "New" button in the top menu to start with a blank canvas.

Choose a Folder to store the Responder in, then enter a description of the Responder. The next pieces of information are:

  1. the first greeting to show the user
  2. the question to ask after each response
  3. the fallback question to ask if no matches are found

 

To learn how to embed images in these prompts please see The Block list view: advanced Block features

You can just use the default settings for the value at the bottom: the NLU (Natural Language Understanding) threshold specifies how closely the meaning of the user's question has to match example questions in this responder for an answer to be returned, and a value of 40% works well in almost all situations.

Next click on the "Intents" tab to display this screen:

 An "intent" is an answer to a question that a user "intends" to find out when they use your chatbot. It's made up of the answer and a set of sample questions that are used to figure out the meaning of the user's enquiry.

Add as many as you want, using the green "+" symbols to add new intents and sample questions. The "+" symbol in the heading sections adds a new item at the end, and the one next to each item adds a new one after that item.

You can delete intents and sample questions using the "-" symbol beside the item you want to remove.

Just click "Save & Close" when you've completed this version of your Responder.

You can now use this Responder to create a new chatbot by skipping ahead to Creating and launching chatbots, or continue to the next section to find out about how to create Flows.


 < 1: Getting started; Folders  Documentation index 3: Building a flow-based chatbot: basic Blocks & Rules >