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

# Intelligence Features

> Advanced AI capabilities including gender detection, smart call end, speaker identification, agentic RAG, and language dialect switcher

## Overview

Intelligence features are optional AI capabilities you can enable per agent in the **Call Settings** section of your configuration. Each can be enabled or disabled independently.

## Gender Detection

Detects the caller's likely gender and injects this context into the conversation, allowing the agent to use appropriate forms of speech. This is especially helpful for Arabic-speaking agents where gendered language forms are common.

**To enable:** Call Settings → User Gender Detection toggle

When enabled, you can instruct your agent how to use this information in your prompt:

```markdown theme={null}
When greeting users, be respectful and use appropriate language.

- If the caller is detected as male: Use "sir" as appropriate
- If the caller is detected as female: Use "ma'am" as appropriate
- If gender is unknown: Use gender-neutral language
```

## Smart Call End

Automatically detects when a conversation is complete and ends the call gracefully, without requiring the user to explicitly hang up.

**To enable:** Call Settings → Smart Call End toggle

The default prompt terminates the call when: (1) all customer inquiries have been resolved, (2) the conversation has reached a natural conclusion, (3) the customer's goal has been achieved, or (4) further conversation would be unproductive.

When enabled, a text area appears below the toggle where you can customize the end-call prompt. A **Restore default** button resets the prompt to the built-in default.

## Speaker Identification <Badge variant="default">Beta</Badge>

Distinguishes between different speakers on the same call and tracks who said what throughout the conversation.

**To enable:** Call Settings → Speaker Identification toggle

Useful for speakerphone calls, family or joint account calls, or any scenario where multiple people are on the line. Works best with clear audio and distinct voices.

<Warning>
  Do not use Speaker Identification for authentication or security purposes.
</Warning>

## Agentic RAG

Enables the agent to decide when to search the knowledge base, rather than searching on every turn. Adds latency but improves accuracy for complex questions.

**To enable:** Knowledge Base section → Agentic RAG toggle

Requires at least one knowledge base item to be attached.

## Language Dialect Switcher

Switches the agent's language or dialect instantly when the user requests a change. For example, an agent configured with Egyptian Arabic can switch to Gulf Arabic mid-conversation if the caller asks.

**To enable:** Call Settings → Language/Dialect Switcher toggle

This feature is designed for Arabic dialect variation. English operates with a single general speech recognition model.

## Next Steps

<CardGroup cols={2}>
  <Card title="Write Effective Prompts" href="./write-prompt">
    Leverage intelligence features in your prompts
  </Card>

  <Card title="Call Behavior Settings" href="./call-behavior">
    Configure timing and interaction controls
  </Card>

  <Card title="Knowledge Base" href="/agents/knowledge-base/introduction">
    Set up a knowledge base for Agentic RAG
  </Card>

  <Card title="Testing Agents" href="/agents/testing/introduction">
    Test your agent before going live
  </Card>
</CardGroup>
