Generate: Dynamic Elements: Mistral AI

The Mistral AI Dynamic Element is available in Page Generator Pro 4.5.6 and higher, releasing Thursday April 4th 2024 23:59 UTC.  Ensure that your license is valid, not expired and that you’ve updated to the latest version of the Plugin.

The Mistral AI Dynamic Element inserts dynamic, Mistral AI researched content for each generated Page.

It’s different from the Research tool:

Feature Dynamic Element Research
Content Queries Mistral AI when Test or Generate is used, inserting the text result into the generated Page. Queries Mistral AI immediately when used, inserting the text result into the Content Group that is being edited on screen.
Keywords Supports the use of Keywords in the Topic field Does not support the use of Keywords in the Topic field
Spintax Does not insert text as spintax into the generated Page. Provides the option to insert the text result in spintax format into the Content Group, which is then processed when Test or Generate is used.
Performance Slow. Queries Mistral AI for every single generated page, given that the Topic might include a Keyword. Fast. Queries Mistral AI immediately when used, with the text result saved in the Content Group. No queries are made to Mistral AI during generation.
Use case You want to use Mistral AI generated text for parts of each generated page, and/or use a Keyword in the Topic. You want to use Mistral AI as a starting point, possibly to generate spintax, and then make edits to Mistral AI’s content before generating content.

Adding: Classic Editor / TinyMCE

To add Mistral AI content within the Classic Editor:

  • Ensure that you’re using the Visual Editor by clicking the Visual tab:
    Page Generator Pro: Dynamic Elements: TinyMCE: Visual Editor Tab
  • Click the Mistral AI icon in the Visual Editor toolbar:
    Page Generator Pro: Dynamic Elements: Mistral AI: Classic Editor: Toolbar

Adding: Classic Editor / TinyMCE: Text Editor

If you’re using the Text editor instead of the TinyMCE Visual Editor above:
Page Generator Pro: Dynamic Elements: TinyMCE: Text Editor Tab

  • Click the Mistral AI button in the toolbar:
    Page Generator Pro: Dynamic Elements: Mistral AI: QuickTags: Toolbar

Adding: Gutenberg

To add Mistral AI content within Gutenberg:

  • Click the plus icon between two existing blocks, or towards the top left corner of the Gutenberg editor
    Gutenberg: Add Block Button
  • Start typing Mistral AI into the Search for a block field, and click the Mistral AI option that appears within the Page Generator Pro section
  • Follow the Configuration section below for each of the fields displayed in the right hand sidebar’s block panel:
    Page Generator Pro: Dynamic Elements: Mistral AI: Gutenberg Settings

Adding: Page Builders

To add Mistral AI content within any Page Builder that supports a Text Editor widget/module using the Classic Editor (sometimes known as TinyMCE), refer to the Classic Editor instructions above.

Refer to the Dynamic Elements Documentation for details specific to your Page Builder.

If your Page Builder does not provide a Text Editor widget/block that uses the Classic Editor, you can still use Dynamic Elements.  However, you’ll need to manually build the shortcode, inserting it into your Page Builder’s content – for example:
[page-generator-pro-mistral-ai parameter="value" ...]

Parameter Accepted Value Description
topic string or keyword The topic that the content should be written about.
content_type string
  • article: A detailed article, including subheadings and a conclusion based on the topic (e.g. “web design”)
  • faq: Questions and answers based on the topic (e.g. “how to find the best kitchen fitter”)
  • freeform: You want to send a freeform prompt to Mistral AI, with full control. In this setting, the Limit and Language options are ignored.  You’re responsible for prompting the Mistral AI model to return the applicable language and limit, if required.
  • paragraph: A single paragraph of content based on the topic (e.g. “what is the most important quality in a web design company”)
limit int
  • When content_type = article or paragraph: the maximum number of words
  • When content_type = faq: the maximum number of questions
  • When content_type = freeform: the limit is ignored. Any limit imposed is a token limit from Mistral AI, based on the model chosen.
language string Two character language code.
temperature float Number between 0 and 2, in 0.1 steps. A higher value will make the output more random. A lower value will make it the output more focused and deterministic.  See Mistral AI API Docs.
top_p float Number between 0 and 1, in 0.1 steps. Determines the pool of available tokens to choose from, between 0 and 1. An alternative to using Temperature. A higher value will include more, less accurate tokens. A lower value will include fewer, more accurate tokens.  See Mistral AI API Docs.

Configuration: General

Page Generator Pro: Dynamic Elements: Mistral AI: General Settings

Topic

It’s important to ensure the topic does not include newlines. It’s recommended that the prompt be written in English.

The Topic is the topic that the content should be based on.  For example, if the Content Group relates to plumbing services, you might use “how to fix a leak” or “how to find the best plumber”.

Keywords are supported in the Topic field.  For example, if your Content Group is for generating Pages for services in locations, and you have Keywords defined for both services and locations, you might use “how to find the best {service} in {location(city_name)}”.  For each generated Page, the Keywords will be replaced with a Term, and the query sent to Mistral AI to return content (for example, “how to find the best bathroom plumber in Birmingham”).

The more detailed the topic, the better quality content that will be returned.  For example, “bathroom plumbing” will generate more generic content vs. “how to find the best bathroom plumber”.

When Content Type is Freeform, the Topic becomes the entire Mistral AI prompt.  Limit and Language options are ignored, therefore you’re responsible for defining these.  For example, you might specify:

Write a 250 word paragraph about how to find the best {service}. The style should be an informative, professional tone, written in French.

Content Type

Content Type determines the form and length of content to produce, depending on how you’re using the Research tool:

  • Article: You want to produce a large amount of detailed content on a topic (such as “how to find the best web designer”), that will form the main content of the Content Group (and therefore generated pages).  This is useful if you have yet to start writing content, and want a good starting point.
  • FAQs: You want to produce a series of questions and answers based on the topic (such as “how to find the best kitchen fitter”), output as the FAQPage structured microdata format compliant with Google.
  • Freeform: You want to send a freeform prompt to Mistral AI, with full control over output, language, formatting, HTML etc.
    • In this setting, the Limit and Language options are ignored.  You’re responsible for prompting the Mistral AI model to return the applicable language and limit, if required.
  • Paragraph: You want to produce a single paragraph or two of content on a more detailed topic (such as “what is the most important quality in a web design company”), that will form part of the content of the Content Group.  This is useful if you have built a block based or page builder layout, and want to inject AI generated content into a specific section.

Limit

The maximum length of the content.

  • For Articles and Paragraphs, this is a word limit.
  • For FAQs, this is the number of questions and answers to generate.
  • For Freeform, the limit is ignored. Any limit imposed is a token limit from Mistral AI, based on the model chosen.

Language

Language will return the created content, translated into the chosen language.

It’s recommended that the prompt be written in English.

Configuration: Tuning

Page Generator Pro: Dynamic Elements: Mistral AI: Tuning Settings

Temperature

Number between 0 and 2, in 0.1 steps. A higher value will make the output more random. A lower value will make it the output more focused and deterministic.  See Mistral AI API Docs.

It’s recommended to only change the Temperature or Nucleus Sample, not both.

Nucleus Sample

Number between 0 and 1, in 0.1 steps. Determines the pool of available tokens to choose from, between 0 and 1. An alternative to using Temperature. A higher value will include more, less accurate tokens. A lower value will include fewer, more accurate tokens.  See Mistral AI API Docs.

It’s recommended to only change the Nucleus Sample or the Temperature, not both.

Performance

The Mistral AI Dynamic Element will query Mistral AI for every single generated Page.  Because Mistral AI can take up to 60 seconds per request, generation times will be much slower, as each generated Page must query Mistral AI one or more times (depending on the number of Mistral AI Dynamic Elements in a Content Group) to dynamically insert content(s).

As such, we do not handle support requests regarding slow generation performance where the Mistral AI Dynamic Element is used.

If faster generation times are essential, you’re welcome to use the Research tool, enabling the Return as Spintax option.  This will query Mistral AI immediately when editing the Content Group, inserting the spintax content result.  Each generated page will then produce a spun variation of this content, with no further queries to Mistral AI required.

Regenerating / Updating Pages

Sometimes, you’ll want to re-generate Pages from a Content Group, whilst retaining the generated Mistral AI Dynamic Elements – that is, not re-running Mistral AI Dynamic Elements a second time.

To do this, we recommend the following workflow when creating a new Content Group:

  1. Install and activate https://wordpress.org/plugins/shortcode-to-display-post-and-user-data/
  2. Edit Content Group, entering Mistral AI Dynamic Element into Custom Field called e.g. mistral-ai
    Page Generator Pro: Dynamic Elements: OpenAI: Custom Field
  3. Edit Content Group, entering shortcode into Content as applicable: [vg_display_data data_source=”post_meta” key=”mistral-ai“]
    Page Generator Pro: Dynamic Elements: OpenAI: Custom Field Shortcode
  4. Generate via Browser. Observe results.
    Page Generator Pro: Dynamic Elements: OpenAI: Generated Page: Backend
    Page Generator Pro: Dynamic Elements: OpenAI: Generated Page: Frontend

To make edits to a Content Group, to re-generate Pages:

  1. Edit Content Group:
    1. Overwrite = Yes, if existing Page generated by this Group
    2. Overwrite Sections: Custom Fields must be unchecked / unticked
    3. Custom Fields: mistral-ai must be removed (we don’t want to run an Mistral AI request again)
      Page Generator Pro: Dynamic Elements: OpenAI: Content Group
  2. Make edits to your Content Group as necessary
  3. Re-generate via Browser
  4. Observe Mistral AI is not run a second time; existing Mistral AI content stored in Custom Field is retained in the existing generated Page/Post.