Tutorials

How to use Parsing

1. Introduction

In this tutorial, we will explore the Parsing section of Yala in detail, a powerful tool that integrates artificial intelligence into Google Sheets to automate and optimize your workflows. The Parsing section allows you to extract specific information from the Assistant Output generated by the agent, structuring that data for later use. Understanding how to use this feature is essential to making the most of Yala’s capabilities.

In your sheet (for example, the Nutritionist tab), you might have columns such as Task, Category, Product, Composition, Assistant Output, and then Parsing Prompt / Parsing Output.

2. How Parsing Works

The Parsing section is responsible for analyzing the Assistant Output and extracting relevant details according to your instructions (Parsing Prompt). This is especially helpful when you need to isolate specific data from a broader response or format the information in a structured way.

Operational Flow

Providing the Parsing Prompt
You enter clear instructions on what you want to extract or how you want the data to be formatted.

Processing
Yala uses the Parsing Prompt together with the Assistant Output to generate the Parsing Output.

Using the Data
The Parsing Output can be applied in later workflow stages, such as in Data actions or additional analysis.

Interactions with Other Components

Agent
Parsing relies on the Assistant Output created in the Agent section.

Action
The structured data in the Parsing Output can be used in the Action Prompt to manipulate records in other sheets.

Variables
Any defined variables (Category, Product, Composition) can be referenced in the Parsing Prompt to provide context for data extraction.

3. Required Parameters and Inputs

Input Data

Parsing Prompt
Detailed instructions about what you want to extract from the Assistant Output.

Prerequisites

Assistant Output Available
Ensure that the agent has already generated the text (for instance, the description or summary about a Product) before performing parsing.

Clarity in Instructions
Write a specific Parsing Prompt to achieve more accurate results, especially if you're referencing specific details (e.g., “List the vitamins from this cake recipe.”).

4. Breakdown of the Parsing Columns

Parsing Prompt

Description
Analysis instructions to extract specific details from the Assistant Output.

How to Use

Enter clear instructions about which data you want to extract.

You can request specific formats (e.g., JSON, a bulleted list, a table).

Example: “Transform the Assistant Output into a JSON array with the columns Category, Product, Serving Size, Proteins, Carbs, Fats.”

Parsing Output

Description
Displays the data extracted as defined in the Parsing Prompt.

How to Use

It is automatically filled after processing.

Use the extracted content for subsequent steps (e.g., storing it in another tab via Data).

5. Practical Examples

Example 1: Extracting Specific Data

Scenario
The Assistant Output contains a descriptive text about monthly sales (or nutritional facts), and you only want a particular figure.

Steps

In Parsing Prompt, enter: “Extract the total monthly sales (or total proteins) mentioned in the text.”

Confirm that the Assistant Output indeed contains that information.

Set Status to Pending to start processing.

Result
The Parsing Output will show only the extracted figure (e.g., the total sales or total proteins).

Example 2: Formatting Data into a List

Scenario
The Assistant Output includes several points about a Product, and you want them in a numbered list.

Steps

In Parsing Prompt, enter: “List the main nutritional factors mentioned in the text in numbered format.”

Check if the Assistant Output contains these factors.

Set Status to Pending.

Result
The Parsing Output will have these factors structured as a numbered list.

6. Best Practices

Be Specific in the Parsing Prompt

Clearly detail exactly what you want to extract for more precise outcomes.

Avoid generic instructions like “Extract the important data.”

Consider the Desired Format

Indicate whether you want the data as a table, list, or plain text.

Example: “Organize the information into a table with columns for Product and Composition.”

Review the Assistant Output

Ensure the Assistant Output contains the necessary details.

If not, adjust the User Prompt in the Agent section.

Leverage Variables if Necessary

Reference columns like Category, Product, Composition to add context to the Parsing Prompt.

Example: “Based on Product and its Composition, extract only the vitamins.”

7. Troubleshooting

Empty or Unexpected Parsing Output

Check if the Parsing Prompt is clear and specific.

Verify whether the Assistant Output actually contains the information you want.

Processing Error

If Status changes to Failure, see if there is an error message in the Parsing Output.

Make sure all required fields (e.g., Parsing Prompt) are filled out, and there are no typos.

Incomplete or Incorrect Results

Provide a more detailed Parsing Prompt.

Consider rephrasing the User Prompt for the agent if you need a more detailed Assistant Output.

8. Relationship with the Status

Pending
Set Status to Pending once you have configured the Parsing Prompt, so Yala can process the analysis.

Processing
Indicates that Yala is extracting the data according to your instructions.

Success
The Parsing Output was successfully generated and is ready for future use (e.g., in Data or Action).

Failure
An error occurred. Check your inputs and the Assistant Output to correct the issue.

9. References and Additional Resources

Complementary Guides

Refer to the Agent tutorial to refine the Assistant Output before parsing.

Review the Action tutorial to learn how to use the Parsing Output in data actions.

Support

If you still have questions or problems, contact the Yala support team.

With this understanding of the Parsing section, you can extract and structure specific information from the Assistant Output, making your data more organized and actionable. Experiment with different approaches to parsing to meet your specific needs, and make the most of this feature to optimize your workflows and achieve even better results!