
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Understanding and Thinking: The whole substitution is a mathematical thinking method. For example, given $x^{2}+x=0$, find the value of the algebraic expression $x^{2}+x+1186$. We substitute $x^{2}+x$ as a whole, then the original expression $=0+1186=1186$. Following the above solution method, complete the following questions:  
$(1)$ If $x^{2}+x-2=0$, then $x^{2}+x+2023=$______;  
$(2)$ If $a+b=5$, find the value of $2\left(a+b\right)-4a-4b+21$;  
$(3)$ If $a^{2}+3ab=20$, $b^{2}+5ab=8$, find the value of $2a^{2}-b^{2}+ab$.

Present the answer in LaTex format: \boxed{Your answer}
user