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

# AI patterns

> Reusable architectural patterns for building AI-powered apps on FlowX.AI.

Patterns are proven solutions to common challenges when building AI apps on FlowX. Each pattern is extracted from production implementations and can be combined to build complex apps.

## Available patterns

<CardGroup cols={2}>
  <Card title="Intent classification and routing" icon="signs-post" href="./intent-classification-routing">
    Use a TEXT\_UNDERSTANDING node to classify user input and route to specialized handlers. The foundation of any conversational AI app.
  </Card>

  <Card title="Knowledge base RAG" icon="book-open" href="./knowledge-base-rag">
    Ground AI responses in your documents using retrieval-augmented generation with Qdrant vector search and the CUSTOM\_AGENT node.
  </Card>

  <Card title="Fan-out extraction" icon="arrows-split-up-and-left" href="./fan-out-extraction">
    Classify documents by type, then route each to a specialized TEXT\_EXTRACTION node with tailored prompts and schemas. Scale to dozens of document types.
  </Card>

  <Card title="AI comparison and reconciliation" icon="code-compare" href="./ai-comparison-reconciliation">
    Compare AI-extracted document data against system-of-record values and generate structured exception reports with match rates and confidence scores.
  </Card>

  <Card title="Hybrid AI + business rules" icon="scale-balanced" href="./hybrid-ai-rules">
    Combine AI extraction and understanding with deterministic business logic (formulas, eligibility checks, scoring) for auditable decision-making.
  </Card>

  <Card title="Session state management" icon="database" href="./session-state-management">
    Manage conversation history and session state across multi-turn interactions using FlowX Database workflows.
  </Card>
</CardGroup>

***

## How to use patterns

Each pattern page includes:

* **When to use** — the problem it solves and when to reach for it
* **Architecture** — how the workflow nodes connect
* **Implementation** — key configuration: prompts, schemas, fork conditions
* **Real-world example** — where this pattern appears in our tutorials
* **Variations** — common adaptations

Patterns are building blocks. A typical AI app combines 2-4 patterns:

| App type                   | Common pattern combination                                            |
| -------------------------- | --------------------------------------------------------------------- |
| **Conversational advisor** | Intent routing + Knowledge base RAG + Session state + Hybrid AI rules |
| **Document processor**     | Fan-out extraction + AI comparison + Hybrid AI rules                  |
| **Email automation**       | Fan-out extraction + AI comparison + Session state                    |

***

## Pattern origins

These patterns are extracted from two production-grade FlowX apps:

* **Mortgage advisor** — a chatbot that evaluates loan eligibility across 7 banks using conversational AI, document extraction, and financial calculations
* **Logistics document processor** — an email-triggered pipeline that processes 17 document types from carrier emails, reconciles them against a TMS, and surfaces exceptions for review

See the [Tutorials](../tutorials/overview) for full implementations.

***

## Related resources

<CardGroup cols={2}>
  <Card title="Tutorials" icon="graduation-cap" href="../tutorials/overview">
    End-to-end implementations using these patterns
  </Card>

  <Card title="Node types" icon="diagram-project" href="../agent-builder/node-types">
    AI node type reference
  </Card>

  <Card title="Conversational workflows" icon="messages" href="../conversational-workflows">
    Multi-turn chat with session memory
  </Card>

  <Card title="Using agents" icon="play" href="../using-agents/overview">
    Integration and deployment options
  </Card>
</CardGroup>
