> For the complete documentation index, see [llms.txt](https://docs.zerve.ai/guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zerve.ai/guide/canvas-view/blocks-and-connections/block-types/logic-gate.md).

# Logic Gate

Logic gate block can be used to set a condition and only when the condyion is met the downstream blocks will be run. Logic gate takes only variables as input.

## Example

In the following example we will ask a question and and score the relevance of the question to New York's taxi trip. If the relevance score is greater than or equal to 5 we will follow a particular flow. If the score is less than 5, we will follow a particular flow. If a condition is not met then the downstream blocks will not run.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIQKNeqjEeOp9UwUcB9R9%2Fuploads%2F5Uc0zT8rSE01jlg8pKNI%2FLogic%20Gate.mp4?alt=media&token=dd098a36-7955-4cd1-9fbf-57acde24ce9a>" %}
