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

# Domain & Reference Document

> Learn about domains and reference documents in EigenData-CLI.

## What is a Domain?

A **domain** is a bounded context or application area that defines the scope of your data generation. Examples of domains include:

* Customer support for an e-commerce platform
* Email and calendar productivity tools
* Banking and payment processing
* Healthcare appointment scheduling

Each domain has its own set of available functions, user profiles, and business rules that guide how conversational data is generated.

## What is a Reference Document?

A **reference document** is a text file (Markdown or plain text) that provides context and instructions for data generation. It describes:

* The business context and purpose of your application
* Available functions and their typical use cases
* User characteristics and personas
* Constraints, guidelines, and edge cases
* Examples of typical user requests

## Reference Document Example

Here's an example reference document for an email productivity application:

```markdown theme={null}
# Email Productivity Assistant

## Overview
This assistant helps users manage their email, calendar, and tasks
within a corporate environment.

## Target Users
- Office workers managing high email volumes
- Managers coordinating team schedules
- Sales representatives tracking client communications

## Available Capabilities
- Compose, send, and manage emails
- Create and manage calendar events
- Create and track tasks with due dates
- Search across emails, events, and tasks

## Guidelines
- Always confirm before sending emails to multiple recipients
- Respect user timezone preferences for scheduling
- Provide concise summaries for long email threads
- Suggest meeting times based on calendar availability

## Common Scenarios
1. User asks to schedule a meeting with a colleague
2. User needs to draft a follow-up email
3. User wants to create a task from an email
4. User searches for emails from a specific sender
```

## Configuring Reference Document

Reference documents are configured **per task** — each core feature (data-generate, data-repair, etc.) can have its own reference document. This allows you to tailor instructions for different workflows.

When you run a task that uses a reference document, the CLI prompts you interactively:

```
Would you like to provide a reference document? (1) yes (2) no: 1

How would you like to provide it?
(1) File path
(2) Type/paste content

> 1

Reference doc file path: ./my_domain.md
```

You can provide your reference document in two ways:

* **File path** — point to an existing Markdown or text file on disk
* **Paste content** — type or paste the content directly; the CLI saves it to `eigendataDB/input/reference_doc.md` automatically

<Note>
  Once provided, your reference document is saved for that specific task. The next time you run the same task, the CLI reuses your saved reference document without prompting again.
</Note>

## How Reference Documents are Used

When you generate data, EigenData-CLI combines your reference document with additional context:

1. **Function Reference** - Available functions from your [function schema](/products/eigendata-cli/core-concepts/function-schema) are appended automatically
2. **Database Summary** - If you have a database file, user profiles and data samples are included
3. **Tool Environment** - Information about the execution environment (local or [MCP server](/products/eigendata-cli/core-concepts/mcp-server))

This enhanced context helps the AI understand your specific domain and generate more relevant, accurate data.
