
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
Given the universal set $U=\mathbb{R}$, the non-empty set $A=\left\{x\middle| \frac{x-2}{x-(3a+1)} < 0\right\}$, $B=\left\{x\middle| \frac{x-a^{2}-2}{x-a} < 0\right\}$.

$(1)$ When $a= \frac{1}{2}$, find $(\complement_{U}B)\cap A$;

$(2)$ Let proposition $p$: $x\in A$, and proposition $q$: $x\in B$. If $p$ is a sufficient condition for $q$, find the range of the real number $a$.

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