# Comprehensive Entity Types Reference

## Observable: Comprehensive Entity Types Reference

### User Intent

"What entity types can Graphlit extract? What properties does each type have?"

### Operation

* **Concept**: Observable entity types (Schema.org-based)
* **GraphQL Enum**: ObservableTypes
* **Entity Types**: 20+ types supported
* **Common Use Cases**: Understanding available entities, choosing extraction types, entity properties

### All Observable Types

Graphlit supports 20+ entity types, all based on Schema.org standards for interoperability.

### Core Entity Types

#### Person

**Type**: `ObservableTypes.Person`\
**Schema.org**: `@type: "Person"`\
**Use For**: People, authors, contacts, team members, contributors

**Properties**:

```typescript
{
  name: string;                    // Full name
  email: string;                   // Email address
  givenName: string;               // First name
  familyName: string;              // Last name
  jobTitle: string;                // Job title/role
  affiliation: string;             // Company/organization
  telephone: string;               // Phone number
  address: string;                 // Physical address
}
```

**Examples**:

* "Kirk Marple, CEO of Graphlit"
* "Maria Garcia, Software Engineer at Microsoft"
* Contact information in emails

#### Organization

**Type**: `ObservableTypes.Organization`\
**Schema.org**: `@type: "Organization"`\
**Use For**: Companies, teams, departments, organizations

**Properties**:

```typescript
{
  name: string;                    // Organization name
  description: string;             // Description
  url: string;                     // Website URL
  foundingDate: string;            // When founded
  location: string;                // Headquarters location
}
```

**Examples**:

* "Graphlit, a context layer for AI agents"
* "Microsoft Corporation"
* "Stanford University"

#### Place

**Type**: `ObservableTypes.Place`\
**Schema.org**: `@type: "Place"`\
**Use For**: Locations, offices, venues, geographic entities

**Properties**:

```typescript
{
  name: string;                    // Place name
  address: {
    streetAddress: string;
    city: string;
    region: string;                // State/province
    country: string;
    postalCode: string;
  };
  geo: {
    latitude: number;
    longitude: number;
  };
  h3: string;                      // H3 geospatial index
}
```

**Examples**:

* "Seattle, Washington"
* "123 Main St, San Francisco, CA 94105"
* "Golden Gate Park"

#### Event

**Type**: `ObservableTypes.Event`\
**Schema.org**: `@type: "Event"`\
**Use For**: Meetings, conferences, appointments, events

**Properties**:

```typescript
{
  name: string;                    // Event name
  description: string;             // Event description
  startDate: string;               // Start date/time
  endDate: string;                 // End date/time
  location: string;                // Where it takes place
  attendees: string[];             // Who attends
  organizer: string;               // Who organizes
}
```

**Examples**:

* "AWS re:Invent 2024"
* "Q4 Planning Meeting"
* "Product Launch Event"

#### Product

**Type**: `ObservableTypes.Product`\
**Schema.org**: `@type: "Product"`\
**Use For**: Products, tools, services

**Properties**:

```typescript
{
  name: string;                    // Product name
  brand: string;                   // Brand/manufacturer
  price: number;                   // Price
  description: string;             // Product description
  manufacturer: string;            // Who makes it
}
```

**Examples**:

* "iPhone 15 Pro"
* "Tesla Model 3"
* "Adobe Photoshop"

#### Repo

**Type**: `ObservableTypes.Repo`\
**Schema.org**: `@type: "SoftwareSourceCode"`\
**Use For**: GitHub/GitLab repositories, source code repos

**Properties**:

```typescript
{
  name: string;                    // Repository name
  url: string;                     // Repository URL
  owner: string;                   // Owner/organization
  description: string;             // Repository description
}
```

**Examples**:

* "graphlit/graphlit-samples"
* "facebook/react"
* "microsoft/vscode"

#### Software

**Type**: `ObservableTypes.Software`\
**Schema.org**: `@type: "SoftwareApplication"`\
**Use For**: Software products, applications, tools

**Properties**:

```typescript
{
  name: string;                    // Software name
  version: string;                 // Version number
  description: string;             // What it does
  manufacturer: string;            // Who makes it
}
```

**Examples**:

* "Python 3.11"
* "Docker"
* "PostgreSQL 15"

### Classification Types

#### Category

**Type**: `ObservableTypes.Category`\
**Schema.org**: `@type: "Thing"` with category\
**Use For**: Topics, classifications, tags, subjects

**Properties**:

```typescript
{
  name: string;                    // Category name
  description: string;             // Category description
}
```

**Examples**:

* "Machine Learning"
* "Product Development"
* "Financial Reports"

#### Label

**Type**: `ObservableLabel`\
**Schema.org**: `@type: "Thing"` with label\
**Use For**: Tags, labels, keywords

**Properties**:

```typescript
{
  name: string;                    // Label name
  color: string;                   // Label color (optional)
  description: string;             // Label description
}
```

**Examples**:

* "urgent"
* "bug"
* "high-priority"

### Medical Entity Types (12 types)

**All fully supported** - not beta

#### MedicalCondition

**Type**: `ObservableTypes.MedicalCondition`\
**Schema.org**: `@type: "MedicalCondition"`\
**Use For**: Diseases, symptoms, diagnoses

**Examples**:

* "Type 2 Diabetes"
* "Hypertension"
* "COVID-19"

#### MedicalDrug

**Type**: `ObservableTypes.MedicalDrug`\
**Schema.org**: `@type: "Drug"`\
**Use For**: Medications, pharmaceuticals

**Examples**:

* "Aspirin"
* "Metformin"
* "Lisinopril"

#### MedicalDrugClass

**Type**: `ObservableMedicalDrugClass`\
**Schema.org**: `@type: "DrugClass"`\
**Use For**: Drug categories

**Examples**:

* "Antibiotics"
* "Beta blockers"
* "Statins"

#### MedicalProcedure

**Type**: `ObservableTypes.MedicalProcedure`\
**Schema.org**: `@type: "MedicalProcedure"`\
**Use For**: Surgeries, medical procedures

**Examples**:

* "Appendectomy"
* "MRI Scan"
* "Blood Transfusion"

#### MedicalTest

**Type**: `ObservableTypes.MedicalTest`\
**Schema.org**: `@type: "MedicalTest"`\
**Use For**: Diagnostic tests, lab tests

**Examples**:

* "Complete Blood Count"
* "X-Ray"
* "Glucose Tolerance Test"

#### MedicalStudy

**Type**: `ObservableTypes.MedicalStudy`\
**Schema.org**: `@type: "MedicalStudy"`\
**Use For**: Clinical trials, research studies

**Examples**:

* "Phase III Clinical Trial"
* "Longitudinal Study on Heart Disease"

#### MedicalDevice

**Type**: `ObservableMedicalDevice`\
**Schema.org**: `@type: "MedicalDevice"`\
**Use For**: Medical equipment, devices

**Examples**:

* "Pacemaker"
* "Insulin Pump"
* "Stethoscope"

#### MedicalTherapy

**Type**: `ObservableMedicalTherapy`\
**Schema.org**: `@type: "MedicalTherapy"`\
**Use For**: Treatments, therapies

**Examples**:

* "Physical Therapy"
* "Radiation Therapy"
* "Cognitive Behavioral Therapy"

#### MedicalGuideline

**Type**: `ObservableMedicalGuideline`\
**Schema.org**: `@type: "MedicalGuideline"`\
**Use For**: Clinical guidelines, protocols

**Examples**:

* "AHA Heart Disease Guidelines"
* "CDC Vaccination Schedule"

#### MedicalIndication

**Type**: `ObservableMedicalIndication`\
**Schema.org**: `@type: "MedicalIndication"`\
**Use For**: Reasons for treatment

**Examples**:

* "High Blood Pressure"
* "Bacterial Infection"

#### MedicalContraindication

**Type**: `ObservableMedicalContraindication`\
**Schema.org**: `@type: "MedicalContraindication"`\
**Use For**: Reasons to avoid treatment

**Examples**:

* "Pregnancy"
* "Allergy to Penicillin"

### TypeScript (Canonical)

```typescript
import { Graphlit } from 'graphlit-client';
import { ObservableTypes } from 'graphlit-client/dist/generated/graphql-types';

const graphlit = new Graphlit();

// Extract all core types
const workflow = await graphlit.createWorkflow({
  name: "Comprehensive Extraction",
  preparation: {
    jobs: [{
      connector: {
        type: FilePreparationServiceTypes.Document
      }
    }]
  },
  extraction: {
    jobs: [{
      connector: {
        type: EntityExtractionServiceTypes.ModelText,
        extractedTypes: [
          // Core types
          ObservableTypes.Person,
          ObservableTypes.Organization,
          ObservableTypes.Place,
          ObservableTypes.Event,
          ObservableTypes.Product,
          ObservableTypes.Repo,
          ObservableTypes.Software,
          // Classification
          ObservableTypes.Category,
          ObservableTypes.Label
        ]
      }
    }]
  }
});

// Extract medical types
const medicalWorkflow = await graphlit.createWorkflow({
  name: "Medical Extraction",
  extraction: {
    jobs: [{
      connector: {
        type: EntityExtractionServiceTypes.ModelText,
        extractedTypes: [
          ObservableTypes.MedicalCondition,
          ObservableTypes.MedicalDrug,
          ObservableTypes.MedicalProcedure,
          ObservableTypes.MedicalTest,
          ObservableTypes.MedicalStudy
        ]
      }
    }]
  }
});
```

### Use Cases by Domain

#### Business Documents

```typescript
extractedTypes: [
  ObservableTypes.Person,           // Employees, contacts
  ObservableTypes.Organization,     // Companies, partners
  ObservableTypes.Place,            // Offices, locations
  ObservableTypes.Event,            // Meetings, conferences
  ObservableTypes.Product           // Products discussed
]
```

#### Legal Documents

```typescript
extractedTypes: [
  ObservableTypes.Person,           // Parties, attorneys
  ObservableTypes.Organization,     // Companies involved
  ObservableTypes.Place,            // Jurisdiction, addresses
  ObservableTypes.Event             // Important dates
]
```

#### Technical Documentation

```typescript
extractedTypes: [
  ObservableTypes.Software,         // Technologies mentioned
  ObservableTypes.Product,          // Products/tools
  ObservableTypes.Repo,             // Code repositories
  ObservableTypes.Organization      // Companies/projects
]
```

#### Medical Literature

```typescript
extractedTypes: [
  ObservableTypes.MedicalCondition,
  ObservableTypes.MedicalDrug,
  ObservableTypes.MedicalProcedure,
  ObservableTypes.MedicalTest,
  ObservableTypes.MedicalStudy,
  ObservableTypes.Person,           // Researchers, authors
  ObservableTypes.Organization      // Research institutions
]
```

#### News Articles

```typescript
extractedTypes: [
  ObservableTypes.Person,           // People mentioned
  ObservableTypes.Organization,     // Companies, orgs
  ObservableTypes.Place,            // Locations
  ObservableTypes.Event,            // News events
  ObservableTypes.Category          // Topics, subjects
]
```

#### GitHub/Code

```typescript
extractedTypes: [
  ObservableTypes.Repo,             // Repositories
  ObservableTypes.Person,           // Contributors
  ObservableTypes.Organization,     // Companies, teams
  ObservableTypes.Software,         // Technologies
  ObservableTypes.Label             // Issue labels
]
```

## All entity types available as enums

extraction\_types = \[ ObservableTypes.PERSON, ObservableTypes.ORGANIZATION, ObservableTypes.PLACE, ObservableTypes.EVENT, ObservableTypes.PRODUCT, ObservableTypes.REPO, ObservableTypes.SOFTWARE, ObservableTypes.CATEGORY, ObservableTypes.LABEL, # Medical types ObservableTypes.MEDICAL\_CONDITION, ObservableTypes.MEDICAL\_DRUG, # ... etc ]

````

**C#**:
```csharp
using Graphlit;

// All entity types available as enum
var extractionTypes = new[]
{
    ObservableTypes.Person,
    ObservableTypes.Organization,
    ObservableTypes.Place,
    ObservableTypes.Event,
    ObservableTypes.Product,
    ObservableTypes.Repo,
    ObservableTypes.Software,
    ObservableTypes.Category,
    ObservableLabel,
    // Medical types
    ObservableTypes.MedicalCondition,
    ObservableTypes.MedicalDrug,
    // ... etc
};
````

### Developer Hints

#### Choose Relevant Types

```typescript
//  Don't extract everything
extractedTypes: [
  /* all 20+ types */
]
// Slow, expensive, noisy

// ✓ Extract what you need
extractedTypes: [
  ObservableTypes.Person,
  ObservableTypes.Organization
]
// Fast, focused, relevant
```

#### Schema.org Compliance

```typescript
// All types map to Schema.org
// Enables:
// - JSON-LD export
// - Standard property names
// - Interoperability with other tools
// - SEO-friendly structured data
```

#### Medical Types Fully Supported

```typescript
// Not beta - production ready
// All 12 medical types work
extractedTypes: [
  ObservableTypes.MedicalCondition,
  ObservableTypes.MedicalDrug,
  ObservableTypes.MedicalProcedure,
  // ... all 12 types available
]
```

### Common Issues & Solutions

**Issue**: Too many entities extracted (noise) **Solution**: Narrow down entity types

```typescript
//  Too broad
extractedTypes: [
  /* all types */
]

// ✓ Focused
extractedTypes: [
  ObservableTypes.Person,
  ObservableTypes.Organization
]
```

**Issue**: Missing entities **Solution**: Check if type is included

```typescript
// If you want products, must include:
extractedTypes: [
  ObservableTypes.Product  // Don't forget to add
]
```

**Issue**: Want custom entity types **Solution**: Currently limited to Schema.org types

```typescript
// Cannot create custom types
// Use closest Schema.org type
// Or use Category/Label for custom classifications
```

### Production Example

```typescript
async function demonstrateEntityTypes() {
  console.log('\n=== ENTITY TYPE DEMONSTRATION ===\n');
  
  // Create workflows for different domains
  
  // 1. Business workflow
  const businessWorkflow = await graphlit.createWorkflow({
    name: "Business Entity Extraction",
    extraction: {
      jobs: [{
        connector: {
          type: EntityExtractionServiceTypes.ModelText,
          extractedTypes: [
            ObservableTypes.Person,
            ObservableTypes.Organization,
            ObservableTypes.Place,
            ObservableTypes.Event,
            ObservableTypes.Product
          ]
        }
      }]
    }
  });
  console.log('✓ Created business workflow');
  
  // 2. Technical workflow
  const techWorkflow = await graphlit.createWorkflow({
    name: "Technical Entity Extraction",
    extraction: {
      jobs: [{
        connector: {
          type: EntityExtractionServiceTypes.ModelText,
          extractedTypes: [
            ObservableTypes.Software,
            ObservableTypes.Repo,
            ObservableTypes.Product,
            ObservableTypes.Organization,
            ObservableTypes.Person
          ]
        }
      }]
    }
  });
  console.log('✓ Created technical workflow');
  
  // 3. Medical workflow
  const medicalWorkflow = await graphlit.createWorkflow({
    name: "Medical Entity Extraction",
    extraction: {
      jobs: [{
        connector: {
          type: EntityExtractionServiceTypes.ModelText,
          extractedTypes: [
            ObservableTypes.MedicalCondition,
            ObservableTypes.MedicalDrug,
            ObservableTypes.MedicalProcedure,
            ObservableTypes.MedicalTest,
            ObservableTypes.MedicalStudy,
            ObservableTypes.Person,
            ObservableTypes.Organization
          ]
        }
      }]
    }
  });
  console.log('✓ Created medical workflow');
  
  console.log('\nEntity type counts by workflow:');
  console.log(`  Business: 5 types`);
  console.log(`  Technical: 5 types`);
  console.log(`  Medical: 7 types`);
  
  console.log('\nAll available types:');
  const allTypes = [
    'Person', 'Organization', 'Place', 'Event', 'Product',
    'Repo', 'Software', 'Category', 'Label',
    'MedicalCondition', 'MedicalDrug', 'MedicalDrugClass',
    'MedicalProcedure', 'MedicalTest', 'MedicalStudy',
    'MedicalDevice', 'MedicalTherapy', 'MedicalGuideline',
    'MedicalIndication', 'MedicalContraindication'
  ];
  console.log(`  Total: ${alllength} types`);
  console.log(`  ${alljoin(', ')}`);
}

await demonstrateEntityTypes();
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.graphlit.dev/api-guides/use-cases/knowledge-graph/observable-entity-types-comprehensive.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
