
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
Let the ellipse $E: \frac{x^2}{a^2} + \frac{y^2}{b^2} = 1 (a > b > 0)$ have an eccentricity $e = \frac{1}{2}$, and the distance from the right focus to the line $\frac{x}{a} + \frac{y}{b} = 1$ be $d = \frac{\sqrt{21}}{7}$. Let $O$ be the origin.

$(1)$ Find the equation of the ellipse $E$;

$(2)$ Draw two perpendicular rays from point $O$ that intersect the ellipse $E$ at points $A$ and $B$, respectively. Find the distance from point $O$ to the line $AB$.

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