# TaskConfig.RetrievalDocument


```
class TaskConfig.RetrievalDocument : TaskConfig
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||
| ↳ | [com.google.mlkit.genai.embedding.TaskConfig](https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/embedding/TaskConfig) ||
|   | ↳ | [com.google.mlkit.genai.embedding.TaskConfig.RetrievalDocument](https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/embedding/TaskConfig.RetrievalDocument) |

*** ** * ** ***

Task type for documents to be indexed or retrieved.

Optimized for representing the content of a document (e.g., an article, book, or web page) to be searched against queries embedded with `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/embedding/TaskConfig.RetrievalQuery`, `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/embedding/TaskConfig.QuestionAnswering`, `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/embedding/TaskConfig.FactVerification`, or `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/embedding/TaskConfig.CodeRetrieval`.

## Summary

| ### Public constructors |
|---|
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/embedding/TaskConfig.RetrievalDocument#RetrievalDocument(kotlin.String)(title: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?)` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/embedding/TaskConfig.RetrievalDocument#title()` The optional title of the document, or `null` if not provided. |

## Public constructors

### RetrievalDocument

```
RetrievalDocument(title: String? = null)
```

## Public properties

### title

```
val title: String?
```

The optional title of the document, or `null` if not provided. Providing a title can improve retrieval quality.