diff --git a/docs/assets/jotform_demo.gif b/docs/assets/jotform_demo.gif new file mode 100644 index 00000000..8248460c Binary files /dev/null and b/docs/assets/jotform_demo.gif differ diff --git a/docs/docs/use-cases/forms.md b/docs/docs/use-cases/forms.md new file mode 100644 index 00000000..48183457 --- /dev/null +++ b/docs/docs/use-cases/forms.md @@ -0,0 +1,49 @@ +# Fill out forms + +LaVague can be used to fill out simple forms automatically! Just provide the necessary information and ask LaVague to fill event registration forms, job applications, etc. + +We have created a [sample job application form](https://form.jotform.com/241363523875359) you can use to try this use case. + +Here is our framework going through the form and filling it after being given the instruction: **"Fill out this form, my name is: John Doe, my email is john.doe@gmail.com, etc..."**. + + +!["notion_demo"](../../assets/jotform_demo.gif) + +On the left, you can see our agent navigating and highlighting the next elements to be interacted with. On the right, the reasoning and the low level instructions generated for our Action Engine (which controls the browser). + +## Try it yourself + +After [installation](../get-started/quick-tour.md), create a new .py file and run this code to try LaVague with Notion! + +```py +from lavague.core import WebAgent, WorldModel, ActionEngine +from lavague.drivers.selenium import SeleniumDriver + +selenium_driver = SeleniumDriver() +action_engine = ActionEngine(selenium_driver) +world_model = WorldModel.from_hub("data_entry_example") + +agent = WebAgent(action_engine, world_model) + +agent.get("https://form.jotform.com/241363523875359") + +instruction = """ +Fill out this form +Data: +- job: product lead +- name: john doe +- email: john.doe@gmail.com +- phone: 555-123-4567 +- cover letter: Excited to work with you! +""" + +agent.run(instruction) +``` + +For now we suggest running this code in a Jupyter Notebook while we work on ways to improve the experience when running LaVague locally. + +## Tell us more about your use cases! + +Discover community use cases and share yours on our [product feedback space](https://lavague.canny.io/lavague-use-cases). We review your ideas daily to continuously improve LaVague's performance and accuracy on a wide range of tasks. + +You can also drop a message on our [Discord](https://discord.gg/SDxn9KpqX9) to chat if you have any questions! \ No newline at end of file diff --git a/examples/knowledge/data_entry_example.txt b/examples/knowledge/data_entry_example.txt new file mode 100644 index 00000000..039d9b90 --- /dev/null +++ b/examples/knowledge/data_entry_example.txt @@ -0,0 +1,47 @@ +Objective: Submit the responses for the form +Thought: +- I am on a Google Form titled "Customer Feedback". +- The form contains various questions with different input types (text, multiple choice, checkboxes). +- I have filled out all required fields, and the 'Submit' button is visible at the bottom of the form. +- To complete the objective, I need to click the 'Submit' button to send the responses. +Instruction: Locate the 'Submit' button at the bottom of the form and click on it. + +Objective: Fill in the form +Thought: +- I am on a Google Form titled "Event Registration". +- The form has required fields labeled "Email Address", "First name", "Last name" and "Phone". +- To proceed with the form, I need to enter info in all input boxes. +- This action requires typing the first name, last name, email and phone into the corresponding fields. +Instruction: Locate the input element labeled "Email Address" and type in "example@example.com". Locate the input element labeled "First name" and type in "John". Locate the input element labeled "Last name" and type in "Doe". Locate the input element labeled "Phone" and type in "555-555-5555". + +Objective: Select "Yes" for the question "Do you have any dietary restrictions?" +Thought: +- I am on a Google Form titled "Conference RSVP". +- The form includes a question "Do you have any dietary restrictions?" with "Yes" and "No" as options. +- To answer this question, I need to select the "Yes" option. +- This action involves clicking the radio button next to "Yes". +Instruction: Locate the question "Do you have any dietary restrictions?" and click the radio button next to "Yes". + +Objective: Choose "Vegetarian" from the dropdown menu for the question "Meal Preference" +Thought: +- I am on a Google Form titled "Workshop Signup". +- The form contains a question "Meal Preference" with a dropdown menu offering multiple options. +- To specify the meal preference, I need to select "Vegetarian" from the dropdown list. +- This action involves clicking the dropdown menu and choosing the appropriate option. +Instruction: Locate the question "Meal Preference", click the dropdown menu, and select "Vegetarian". + +Objective: Provide additional comments in the text area +Thought: +- I am on a Google Form titled "Service Feedback". +- The form includes a section for additional comments with a text area for responses. +- To complete this section, I need to type my comments into the provided text area. +- This action requires entering text into the designated box. +Instruction: Locate the text area for additional comments and type in "Great service, very satisfied with the experience." + +Objective: Mark all applicable options for the question "Which services did you use?" (Checkboxes) +Thought: +- I am on a Google Form titled "Facility Usage Survey". +- The form contains a question "Which services did you use?" with several checkboxes for multiple selections. +- To answer this question, I need to mark all relevant options. +- This action involves clicking the checkboxes next to the appropriate services. +Instruction: Locate the question "Which services did you use?" and click the checkboxes next to "Gym", "Pool", and "Spa". \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index d8626a08..73d64cd1 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -118,6 +118,8 @@ nav: - ✅ Use cases: - Knowledge Retrieval: - Navigate through Notion: "docs/use-cases/notion.md" + - Data Entry: + - Fill out forms: "docs/use-cases/forms.md" - 🤗 Contributing: - Overview: "docs/contributing/contributing.md"