Outlines not working without H3s

1. The problem

Outline Loop does not work for H2 tags that do not have H3s under them. SCM seems to skip over them and does not generate a section for “H2 only” subtopics.

2. Screenshot or task log of the problem

So if I have an outline that looks like this:

<h2>Subtopic 1</h2>
<h2>Subtopic 2</h2>
<h2>Subtopic 3</h2>

No sections are generated.

However, If I have an outline like this:

<h2>Subtopic 1</h2>
<h2>Subtopic 2</h2>
      <h3>Talking Point</h3>
<h2>Subtopic 3</h2>

Then only one section is generated.

How do I set SCM so H2 tags generate sections when there are no H3 tags under them?

Just set H2 at top

<h2>Keyword</h2>
<h3> Point </h3>
<h3> Point </h3>
<h3> Point </h3>
<h3> Point </h3>

I am assuming you are setting the %ai_outline% macro directly.

It requires h2/h3, but you only need to provide one h2.

The prompt for writing each section also assumes there is h2/h3. So not having h3 will break.

Not all articles have H2s with H3s underneath them. In fact, some articles might not have H3s at all. When AI’s create outlines, they don’t always include H3s either under every single H2.

Most articles vary with having H2s and H3s where H3s are optional.

<h2>subtopic 1</h2>
<h2>subtopic 2</h2>
    <h3>point A</h3>
    <h3>point B</h3>
    <h3>point C</h3>
<h2>subtopic 3</h2>
<h2>subtopic 4</h2>
     <h3>point A</h3>
     <h3>point B</h3>
<h2>subtopic 5</h2>

or an article can have no H3s at all … like

<h2>subtopic 1</h2>
<h2>subtopic 2</h2>
<h2>subtopic 3</h2>
<h2>subtopic 4</h2>

It depends on the nature of the article. If you had an article with all H2s and no H3s and you change it to

<h2>main keyword</h2>
    <h3>subtopic 1</h3>
    <h3>subtopic 2</h3>
    <h3>subtopic 3</h3>
    <h3>subtopic 4</h3>

then you are hurting your SEO very badly as google prioritizes H2 keywords over H3s. Besides, most AIs will not create outlines this way. Normally its a variation of both, but not always.

I was wondering why there were missing paragraphs. Can this be fixed?

Can you fix SCM logic?? … so that SCM doesn’t skip H2s that don’t have H3s. The default shouldn’t be that it breaks or it skips.

I think there is confusion between the final article you want to create VS the OUTLINE feature in SCM.

The %ai_outline% isn’t used to output anything to the final articles, its just used to control the <outline> feature.

Put another way, being forced to do h2,h3,h3 is fine because that won’t appear like that directly in your final article.

The outline algo requires h2/h3 in that structure for INPUT parsing into a for loop. It isn’t used to control the final HTML output at all.

The final output can be whatever you like. It doesn’t even have to be HTML forced to h2/h3s.

The outline needing h2/h3 was arbitrary. It could have been
[heading] Keyword
[subheading] Sub topic
[subheading] Sub topic

What are your trying to create though?

It might be easier to explain with an example.

I understand that %ai_outline% is just input for the LOOP. However, it has a big effect on what comes OUT of the outline LOOP.

What I don’t understand is how to control and filter what comes out of the loop. Unfortunately, there is only 1 shot at output from the loop. Within the Macro Box, I can test the AI output and if it fails to meet the quality of what I need, I can send it back to AI to fix it in the next Macro. After a few “macro filters”, the output is near perfect. However, once I’m in the loop, whatever comes out from the AI is in the final article … unless I link the whole article to another article creator task. But I can’t fix or build it at the LOOP “ITEM” level.

For example, the subheading in the loop often gets repeated sometimes once, twice or even 3 times before writing commences, even if I ask the AI not to repeat it. And it looks terrible, and needs to be manually edited every single time. If I had a way to set macros within the loop mechanism prior to output, I could make SCM test and filter properly prior to output same way I do in the filter box.

SEE:

Perhaps you can give me an example of just how to create simple H2s in an outline loop without H3s? When using your example and creating an H2 with main keyword and listing all subtopics as H3s … I get H3s in the output instead of H2s. And maybe you can help figure out how to get SCM to stop repeating the same subheading 2-3 times. (see above)

Ok, I see what you are saying :thinking:.

You want to get rid of the extra H3 that are auto inserted by the outline macro.

Ill make the following changes.

Allow just H2 in outline

Given an ai_outline without h3 and just h2.

eg outline tag
image

The created article correctly prints out the h2 sections
image

H3 header no longer auto insert

Previoulsy outline tag will auto insert a h3 tag for you.

So given the following ai_outline
image

image

When run, the h3 tag is no longer auto inserted unless you provide it.
image

You can provide the h3 tag like this…
image

image

Because this removes H3 auto inserts, all the outline templates have been updated to have the visible <h3>

I think with both these changes it will allow you to achieve what you need.

Will be available in next update.

After your update, I still could not get the H2 tags to complete any sections if there were no H3s underneath them. However, the H3s did not print unless I actually put them in there.

I used the following Outline:

<h2>Dog Habits</h2>
 <h3>Dog Food</h3>
 <h3>Dog Bed</h3>
<h2>Bird Habits</h2>
<h2>Cat Habits</h2>
 <h3>Cat Food</h3>
 <h3>Cat Bed</h3>
<h2>Fish Habits</h2>
<h2>Hamster Habits</h2>
 <h3>Hamster Food</h3>
 <h3>Hamster Bed</h3>

Content sections for H2-Bird Habits and H2-Fish Habits were still left blank.

SEE

Could you ever make it possible that advanced users set AI macros inside the AI Prompt window for the reasons I pointed out in my previous Oct 26 comment??

This way we could apply macro filters WITHIN the outline loop itself. Currently, there is no way to do this.

The outline tag can print h2s, however it needs a h2/h3 pair in order to send instructions to the AI.

Would require a new feature addition for AI instructions to be sent to h2 and h2/h3.

In this case would need 2 different prompts actually.

1 prompt that runs on H2 and one prompt that runs on H2/H3

Something like

<outline>
<h2_section>[prompt for h2s]</h2_section>
<h3_section>[prompt for h2 - h3]</h3_section>
</outline>

But this means that

<h2>Cat Habits</h2>
 <h3>Cat Food</h3>
 <h3>Cat Bed</h3>

Would generate 3 x prompts.

  1. [cat habits]
  2. [cat food]
  3. [cat bed]

Which can create problems with this:

<h2>Tokyo</h2>
 <h3>Food</h3>
 <h3>Hotels</h3>
  1. [tokyo]
  2. [tokyo food]
  3. [tokyo hotels]

The first prompt is too generic in this case and may not be required.

However we can’t add any if/then control statements to selectively turn on or off, if we want content for h2 or not.

So that is the current limitation.

outline tag will print your h2s, but it requires a h2/h3 pair to send instructions to the AI.

You are asking if you can put <outline> inside another [ prompt ]?

let’s give this some in-depth thought. Maybe we can put our heads together to make thus ultimately flexible/powerful like we did with the webhook idea. Being able to run AI filters makes all the difference in getting high-quality article outputs. I’ve been doing alot of testing.

I’ll come back soon with some ideas.

Yes agreed, will require a new tag or maybe some other method.

Given any h2/h3 outline…

<h2>Tokyo</h2>
 <h3>Food</h3>
 <h3>Hotels</h3>

We generate a list of h2/h3 that we want to generate a prompt for

  1. Tokyo
  2. Tokyo Food
  3. Tokyo Hotels

For items 1 - 4, we can bring in the initial article keyword as support
eg tokyo holiday ideas

  1. Tokyo + Tokyo holiday ideas
  2. Tokyo Food
  3. Tokyo Hotels

As I understand, what you want is the ability to chain prompts together right?
Maybe allow h3_section_xxx and keep it in order so prompts can chain downwards.

<outline>
<h2_section>[h2 + article keyword]</h2_section>
<h3_section>[h2 - h3]</h3_section>
<h3_section_after>[rewrite %h3_section%]</h3_section>
<h3_section_after_2>[rewrite %h3_section%]</h3_section>
</outline>

The only problem is you can’t have just a H2 with/without content in it. Has to be all or nothing. But maybe thats not a bad thing?

But the Outline tag will then produce this.

<h2>Tokyo</h2>
[write something about tokyo + article keyword]
<h3>Food</h3>
[write something about tokyo - food]
[rewrite %h3_section%]
[rewrite again %h3_section%]
<h3>Hotels</h3>
[write something about tokyo - hotels]
[rewrite %h3_section%]
[rewrite again %h3_section%]

Technically we are doing recursion which is just a [prompt [inside prompt]] but nesting [prompts] like that seems a confusing and terrible idea, which is why I don’t allow it inside the ai prompt area and I force it inside the user macro area.

Okay, we’re talking about 2 different topics now … so let’s break it down.

  1. Allowing H2s to generate sections that do not have H3s.
  2. Finding a way nest AI prompts inside the Outline Loop.

STARTING WITH #1
Is it possible in your codebase, to allow H2 sections to generate that do not have an H3? As I previously stated, not every article will have H3s for every H2 … and nor should they. The best solution I can think of to this is if you can allow H2s to generate sections that do not have H3s.

<h2>Dog Habits</h2>
 <h3>Dog Food</h3>
 <h3>Dog Bed</h3>
<h2>Bird Habits</h2>
<h2>Cat Habits</h2>
 <h3>Cat Food</h3>
 <h3>Cat Bed</h3>

Currently, in SCM the above outline would generate a section for each item, except for Bird Habits. In your codebase, can you make it so it would include Bird Habits, even though it does not have any H3s underneath?

==========================

IN REGARDS TO #2 (above):
Instead of “nesting prompts” inside the outline loop which would get complex, would it be possible to allow advanced users the freedom to set user macros (either with/without AI prompts) inside the TOP “AI Prompts” Box where the Outline Loop resides? I think this would be the easiest and most flexible/powerful solution. If you need it for your codebase, Maybe within special delimiters like “{{{” and “}}}”

AI Prompts: EXAMPLE

<outline>
<h2>%outline_h2%</h2>   <-- would only print when looping H2 Tag
<h3>%outline_h3%</h3>   <-- would only print when looping H3 tag if exists

{{{
%writesection% = [Write a section about %outline_h2%, %outline_h3%]
%filter1% = [Summarize %writesection% into 1 paragraph]
%filter2% = [openai alt1|Llama3.1: Bold important words from %filter1%]
%finaldraft = [openai alt1|Phi3.5: Fix Grammar and Humanize %filter2%]
}}}

%finaldraft%
</outline>

If this is possible, it might be the easiest solution and no nesting required. This would allow us to have far more control over the final output of the outline contents.

Let me know your thoughts.

The current proposed solution has one problem, it will force all H2s to generate a section regardless of if there is a H3 under it or not.

IE

<h2>Dog Habits</h2>
 <h3>Dog Food</h3>
 <h3>Dog Bed</h3>
<h2>Bird Habits</h2>

You get a created section for Dog Habits AND Bird Habits

Not just for Bird Habits.

Yes something like this might work.

However instead of extra {{{ }}} I might just enclose it into another <prompts> tag.

Because there is essentially another user macros list embedded in an outline, not sure if the current parser can handle it without some major rework.

The current parser does recursion already in its algo, so it might require some extra bit of work to make sure the prompts are correctly worked out and the right macros are available.

Please see above about H2 sections always being generated.

It might mean we need to 2 seperate prompts one for h2, and one for h2/h3

Can you programmatically look to see if the “NEXT ITEM” is H2 or H3?

If (CURRENT_ITEM = H3), then create current section.  
If (CURRENT_ITEM = H2 and NEXT_ITEM = H2), then create current section.
If (CURRENT_ITEM = H2 and NEXT_ITEM = H3), then don't create current section.  

Or, BETTER YET …
as you proposed, I think splitting H2 prompts and H3 prompts is an ever BETTER idea …

SOMETHING LIKE …

<outline>

<SCM_H2_EMPTY_PROMPTS>   <-- executes when CURRENT_ITEM = H2 Tag AND NEXT ITEM = H2 tag
<h2>%outline_h2%</h2> 
%writeH2section% = [Write a section about %outline_h2%]
%filter1% = [Summarize %writeH2section% into 1 paragraph]
%filter2% = [openai alt1|Llama3.1: Bold important words from %filter1%]
%finaldraft% = [openai alt1|Phi3.5: Fix Grammar and Humanize %filter2%]

%finaldraft%
</SCM_H2_EMPTY_PROMPTS>

<SCM_H2_FULL_PROMPTS>   <--  executes when CURRENT_ITEM = H2 Tag AND NEXT ITEM = H3 tag
<h2>%outline_h2%</h2> 
%writeH2intro% = [Write an introduction sentence about %outline_h2%]
%finaldraft% = [openai alt1|Phi3.5: Fix Grammar and Humanize %writeH2intro%]

%finaldraft%
</SCM_H2_FULL_PROMPTS>


<SCM_H3_PROMPTS>   <-- would only execute when looping H3 tag, if exists
<h3>%outline_h3%</h3> 
%writeH3section% = [Write a section about %outline_h2%, %outline_h3%]
%filter1% = [Summarize %writeH3section% into 1 paragraph]
%filter2% = [openai alt1|Llama3.1: Bold important words from %filter1%]
%finaldraft% = [openai alt1|Phi3.5: Fix Grammar and Humanize %filter2%]

%finaldraft%
</SCM_H3_PROMPTS>

</outline>

This is even better proposal than my previous post … because it gives user full control over what happens in each of the 3 scenarios you discussed.

Notice that < SCM_H2_FULL_PROMPTS > allows us to create an introduction to H2 sections that has H3s underneath. Something you couldn’t offer in the current < “/outline” > setup … but that most human-written articles do have.

Lastly, you can change the <SCM_H2/H3_PROMPTS> tags to whatever you want … they are for illustration purposes. Just be aware that < "PROMPTS" > tag is overused when users create actual AI prompts so use something more unique like <SCM_H3_PROMPTS>