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

# Intent Detection

> Understanding and configuring intent detection

## Overview

Olis uses sophisticated intent detection to understand user queries and provide relevant responses. The system supports multiple backends for flexibility and performance.

## Detection Modes

<CardGroup cols={3}>
  <Card title="Automatic" icon="wand-magic-sparkles">
    Intelligently selects the best available option based on system capabilities
  </Card>

  <Card title="SLM (Local)" icon="computer">
    Local small language model for privacy-focused, offline operation
  </Card>

  <Card title="LLM (Remote)" icon="cloud">
    Cloud-hosted language model for faster, more powerful processing
  </Card>

  <Card title="NLP (Fallback)" icon="brain">
    Fast heuristic-based detection using pattern matching
  </Card>
</CardGroup>

## Configuration

### Environment Variables

```bash theme={null}
# Model Selection
OLIS_INTENT_MODEL=phi3

# Remote URL (for LLM mode)
OLIS_INTENT_REMOTE_URL=http://localhost:11434

# Model Download (for SLM mode)
OLIS_INTENT_MODEL_DOWNLOAD_URL=https://example.com/model.gguf

# Timeout
OLIS_INTENT_TIMEOUT_MS=30000
```

## How It Works

```mermaid theme={null}
graph TD
    Input[User Input] --> Analyze[Intent Analysis]
    Analyze --> Extract[Extract Key Info]
    Extract --> Context[Gather Context]
    Context --> Generate[Generate Response]
```

## Best Practices

* Use SLM for privacy-sensitive data
* Use LLM for complex queries
* Configure timeout appropriately
* Monitor performance metrics

## Next Steps

<CardGroup cols={2}>
  <Card title="Document Context" icon="file" href="/features/document-context">
    Learn about document context
  </Card>

  <Card title="Integrations" icon="plug" href="/features/integrations">
    Explore integrations
  </Card>
</CardGroup>
