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

# Introduction to Gateway

> Real-time hallucination detection for LLM outputs.

Gateway fact-checks LLM-generated text against your source documents. You provide a claim and sources, and Gateway tells you whether the claim is supported, refuted, or lacks sufficient evidence.

<Tabs>
  <Tab title="AWS">
    ```python theme={null}
    from gateway import TextSource
    from gateway.aws import AwsClient

    client = AwsClient.from_sfn_arn("arn:aws:states:us-east-1:123456789:stateMachine:gateway")

    ruling = client.judge(
        claim="The Eiffel Tower is in Paris and was built in 1889.",
        sources=[
            TextSource(id="doc1", text="The Eiffel Tower is located in Paris, France."),
            TextSource(id="doc2", text="It was completed in 1889."),
        ],
    )

    print(ruling.verdict)  # Verdict.SUPPORTS
    ```
  </Tab>

  <Tab title="Azure">
    ```python theme={null}
    import asyncio
    from gateway import TextSource
    from gateway.azure import AzureClient

    client = AzureClient.from_function_app_url(
        "https://yourprefix-func.azurewebsites.net",
        api_key="your-function-key",
    )

    ruling = asyncio.run(client.judge(
        claim="The Eiffel Tower is in Paris and was built in 1889.",
        sources=[
            TextSource(id="doc1", text="The Eiffel Tower is located in Paris, France."),
            TextSource(id="doc2", text="It was completed in 1889."),
        ],
    ))

    print(ruling.verdict)  # Verdict.SUPPORTS
    ```
  </Tab>
</Tabs>

## How it works

1. **Claim decomposition** - Gateway breaks your claim into individual statements
2. **Evidence retrieval** - Each statement is matched against relevant passages in your sources
3. **Verdict classification** - We determine whether each statement is supported, refuted, or lacks evidence

## Supported clouds

Gateway deploys to your cloud account. We currently support **AWS** and **Azure**.

During onboarding, we provide the SDK and Terraform configuration for your cloud via SFTP.

## Next steps

<CardGroup cols={3}>
  <Card title="Deploy on AWS" icon="cloud" href="/deployment/aws" />

  <Card title="Deploy on Azure" icon="cloud" href="/deployment/azure" />

  <Card title="Install the SDK" icon="terminal" href="/sdk/installation" />
</CardGroup>
