Overview
Domain commands help you manage separate research projects (“domains”), each with its own entity types, extraction prompts, and data outputs. Each domain is isolated from others.Commands
just init
Initialize a new domain configuration by copying the template.
Name for the new domain. Must be alphanumeric (letters and numbers only, no spaces or special characters).Examples:
guantanamo✅vietnam_war❌ (contains underscore)coldwar✅my-project❌ (contains hyphen)
scripts/init_domain.py
Usage Examples
What Gets Created
When you runjust init <domain>, the system:
Process Template Files
Finds all
.template files and:- Replaces
{DOMAIN_NAME}with your domain name - Replaces
{DOMAIN_DESCRIPTION}with auto-generated description - Removes
.templateextension
Directory Structure
After runningjust init myproject, you’ll have:
Configuration Files
Main Config: config.yaml
Defines domain-level settings:
configs/myproject/config.yaml
Entity Type Schemas: types/*.yaml
Define fields for each entity type:
types/people.yaml
Extraction Prompts: prompts/*.txt
LLM prompts for entity extraction:
prompts/people.txt
Tag Taxonomies: tags/*_tags.yaml
Controlled vocabularies for categorization:
tags/people_tags.yaml
Listing Domains
just domains
List all available domain configurations with descriptions.
scripts/list_domains.py
Output Example
Domain Information
For each domain, the command shows:- Name: Domain identifier used in commands
- Description: From
config.yamlin the domain directory
If a domain config file is malformed, you’ll see a warning instead of the description.
Working with Domains
After Creating a Domain
Customize Configuration
Edit
configs/<domain>/config.yaml to set:- Data paths
- Output directories
- Merge thresholds
- Concurrency settings
Customize Entity Types
Edit files in
configs/<domain>/types/ to define the fields you need for each entity type.Write Extraction Prompts
Customize prompts in
configs/<domain>/prompts/ to guide the LLM on what information to extract and how.Define Tag Taxonomies
Edit
configs/<domain>/tags/ to create controlled vocabularies for categorizing entities.Switching Between Domains
Process different domains by specifying the--domain flag:
Domain Isolation
Each domain is completely isolated:| Aspect | Isolation |
|---|---|
| Config | Separate configs/<domain>/ directory |
| Data | Separate data/<domain>/ directory |
| Entities | Separate Parquet files per domain |
| Processing status | Separate processing_status.json per domain |
| Cache | Separate extraction_cache/ per domain |
Advanced Configuration
Custom Data Paths
Override the default data path for a domain:Per-Domain Concurrency
Tune processing speed per domain:configs/high-volume/config.yaml
Per-Domain Thresholds
Adjust entity merging sensitivity:configs/strict-matching/config.yaml
Template Domain
Thetemplate domain in configs/template/ serves as the blueprint for new domains.
To modify the template:
- Edit files in
configs/template/ - Use
{DOMAIN_NAME}and{DOMAIN_DESCRIPTION}placeholders - Add
.templateextension to files that need placeholder replacement
configs/template/config.yaml.template
Error Reference
Domain name must be alphanumeric
Domain name must be alphanumeric
Cause: Domain name contains spaces, hyphens, underscores, or special characters.Solution: Use only letters and numbers (e.g.,
coldwar, vietnam1965).Domain already exists
Domain already exists
Cause: A directory with that domain name already exists in
configs/.Solution: Choose a different name or delete the existing domain directory if you want to recreate it.Template directory not found
Template directory not found
Cause:
configs/template/ is missing from the repository.Solution: Ensure you have a complete clone of the repository. The template should be in configs/template/.Failed to initialize domain
Failed to initialize domain
Cause: Permissions error or disk space issue.Solution: Check that you have write permissions in the
configs/ directory and sufficient disk space.Command Reference Summary
| Command | Purpose | Example |
|---|---|---|
just init <name> | Create new domain | just init coldwar |
just domains | List all domains | just domains |
just process --domain <name> | Process specific domain | just process --domain coldwar |
just process-domain <name> | Shortcut for domain processing | just process-domain coldwar |
See Also
- Process & Extraction - Process articles for a domain
- Configuration Reference - Complete config options
- Entity Types - Define custom entity schemas