In this guide, we will explain how to fill in a form hands-free using the AI Voice Agent while the AI provides smart suggestions and validations to the user. As the user speaks, the AI extracts the values, normalises them, and checks each one against the field's rules before filling it. For example, it will not accept a Meter Reading that is below zero or above 100,000, it confirms the Inspection Status from free speech, and it asks for any required fields that are still missing. The AI reads its replies back to the user using audio, and the user can also ask questions about the form, such as what fields exist or what the rules are.
1. INITIAL SETUP:
- Drag and drop a "Voice Agent" and an "AI Prefill" field onto your form to set up the AI Voice Agent.
- Rename the fields as needed.
- Drag and drop three "Hidden" fields onto your form and rename them: "AI Voice Response", "AI Engine Prompt", and "Field Validation & Suggestion Config".
- Drag and drop the fields you want the AI to fill. Here we are using the following fields to capture the Site Inspection details:
- Inspector Name - a "Text" field.
- Inspection Date - a "Date" field.
- Inspection Status - a "Select" field with the options
Pass,Fail, andNeeds Follow-up. - Meter Reading - a "Number" field.
- Inspector Email - an "Email" field.
- Contact Phone - a "Phone" field.
- Inspection Notes - a "TextArea" field.
2. CONFIGURE THE "VOICE AGENT" FIELD:
- Click the pencil icon of the "Voice Agent" field.
- Set up the field:
- Read Text From Field: Here,
b7c1-4e2a-9d3fis the component ID of the "AI Voice Response" hidden field. The agent reads this field aloud to the user. - AI Prefill Component Id: Here,
6f50-ed54-a541is the component ID of the "AI Prefill" field that runs when the user finishes speaking. - Voice Agent Welcome Message: (Optional) Enter the message users hear when the form loads (e.g., "Hello, I am your inspection assistant. Tap Start Speaking and tell me the inspection details, or ask me what information the form needs and what the rules are. I will fill in and check the fields for you.").
3. CONFIGURE THE "AI ENGINE PROMPT" HIDDEN FIELD:
- Click the pencil icon of the "AI Engine Prompt" hidden field.
- Add the AI's system instructions in the "Value" field. This tells the AI how to read the form configuration, extract values, apply the smart suggestions, validate against the rules, and ask for missing required fields.
Please use this example Prompt:
4. CONFIGURE THE "FIELD VALIDATION & SUGGESTION CONFIG" HIDDEN FIELD:
- Click the pencil icon of the "Field Validation & Suggestion Config" hidden field.
- Add a JSON configuration in the "Value" field that defines every field the AI should work with.
- Please use this example configuration:
5. CONFIGURE THE "AI PREFILL" FIELD:
- Click the pencil icon of the "AI Prefill" field.
- Add the AI Prompt. This combines the AI Engine Prompt, the field configuration, and the conversation so far.
- Here,
c9e2-5f3b-a1d4is the "AI Engine Prompt" hidden field,d2f7-8a1c-e5b6is the "Field Validation & Suggestion Config" hidden field, anddd1a-382b-a8ecis the "Voice Agent" field.
Please use this Prompt:
{{c9e2-5f3b-a1d4}}
Form configuration as JSON:
{{d2f7-8a1c-e5b6}}
Conversation so far as a JSON array, where type user is the person speaking and type assistant is you:
{{dd1a-382b-a8ec}}- Map Data Key (AI output values) to Form field:
- inspector_name -
a045-6bc0-f02c(Inspector Name) - inspection_date -
3f9b-f2cb-bc67(Inspection Date) - inspection_status -
effd-4735-fdf9(Inspection Status) - meter_reading -
46dc-7a99-8baa(Meter Reading) - inspector_email -
e1a2-3b4c-5d6e(Inspector Email) - contact_phone -
f7a8-9b0c-1d2e(Contact Phone) - inspection_notes -
a3b4-5c6d-7e8f(Inspection Notes) - agent_response -
b7c1-4e2a-9d3f(AI Voice Response)
6. TEST THE FUNCTIONALITY:
- Try the Form.
- Click the "Start Speaking" button. The assistant greets you with the welcome message.
- Give the voice instructions to fill out the fields (e.g., "I'm John Smith, the meter reading is 45000, the inspection passed."). The assistant normalises and fills the valid values.
- To test a validation, speak an invalid value (e.g., "the meter reading is minus five" or "the reading is 250000"). The assistant does not fill the field, explains the rule aloud, and suggests a valid value.
- To test the form help, ask a question about the form (e.g., "What fields do I need to fill?" or "What are the rules for the meter reading?"). The assistant answers using the configuration without changing any field values.
For any questions, please contact us - [email protected] or the Formyoula in-app chat. 🙂