
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
Elective 4-4: Polar Coordinates and Parametric Equations

In the Cartesian coordinate system $xOy$, the parametric equation of circle $C$ is $\begin{cases}x=\cos \varphi \\ y=1+\sin \varphi\end{cases}$ ($\varphi$ is the parameter). Establish a polar coordinate system with the origin $O$ as the pole and the positive half-axis of $x$ as the polar axis.

$(1)$ Find the polar equation of circle $C$.

$(2)$ The polar equation of line $l$ is $2\rho\sin \left(\theta+ \frac{\pi}{6}\right)=3 \sqrt{3}$. The ray $OM:\theta= \frac{\pi}{6}$ intersects circle $C$ at points $O$ and $P$, and intersects line $l$ at point $Q$. Find the length of segment $PQ$.

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