> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Simulator

export const LwTemplate = ({title = "Key questions to get you started", icon = "sparkles", cta = "Powered by Agent Studio", linkHref = "https://lucidworks.com/demo/?utm_source=docs&utm_medium=referral&utm_campaign=docs_cta_ai"}) => {
  const [isLoaded, setIsLoaded] = useState(false);
  useEffect(() => {
    const timer = setTimeout(() => {
      setIsLoaded(true);
    }, 500);
    return () => clearTimeout(timer);
  }, []);
  return <div className="lw-template-container">
      <Card title={title} icon={icon}>
        {isLoaded && <span dangerouslySetInnerHTML={{
    __html: `<lw-template id="a029c1a9-28be-427e-b0e1-5d918920246a"></lw-template
            >`
  }} />}
        <Link href={linkHref} className="agent-studio-link text-left text-gray-600 gap-2 dark:text-gray-400 text-sm font-medium flex flex-row items-center hover:text-primary dark:hover:text-primary-light group-hover:text-primary group-hover:dark:text-primary-light">Powered by Lucidworks Agent Studio</Link>
      </Card>
    </div>;
};

[localhost link]: http://localhost:3000/docs/4/fusion-ai/concepts/query-rewriting/simulator

[mintlify link]: https://doc.lucidworks.com/docs/4/fusion-ai/concepts/query-rewriting/simulator

[old doc.lw link]: https://doc.lucidworks.com/fusion-ai/4.2/484

The Simulator provides an interactive preview of how your staged rules affect relevancy, using your search data and a simple search interface. When you enter a query, the Simulator shows you the triggered rules, in the order in which they were triggered, along with any triggered facets.

<LwTemplate />

<img src="https://mintcdn.com/lucidworks/vupE2UCZdg04NdXx/assets/images/4.2/rules-simulator.png?fit=max&auto=format&n=vupE2UCZdg04NdXx&q=85&s=201cd1056aa9b274115b5a853916623b" alt="Simulator 4.x" width="2562" height="1284" data-path="assets/images/4.2/rules-simulator.png" />

You can edit any of the triggered rules, then re-run the query to see new results. You can also return to the query rewriting dashboard to enable or disable query rewriting strategies.

The Simulator sends requests to the `_rules_simulator` query profile, which you can configure to point to any pipeline and collection in your app.

Opening the Simulator

1. In the Fusion UI, navigate to **Relevancy** > **Query Rewriting**.\
   The query rewriting dashboard appears.
2. Click the **Simulator** button.\
   The Simulator appears:

   <img src="https://mintcdn.com/lucidworks/vupE2UCZdg04NdXx/assets/images/4.2/rules-simulator.png?fit=max&auto=format&n=vupE2UCZdg04NdXx&q=85&s=201cd1056aa9b274115b5a853916623b" alt="Rules Simulator" width="2562" height="1284" data-path="assets/images/4.2/rules-simulator.png" />

From here, you can:

* Enter search terms to see the results, using query rewriting data from the `_query_rewrite_staging` collection
* Edit rules that are triggered by the current query
* Click **Query Rewriting Dashboard** to go to the dashboard, where you can enable or disable query rewriting strategies, then return to the Simulator to see how relevancy is affected
