Skip to main content

What are Triples?

Triples are the building blocks of your knowledge graph. Each triple represents a fact in the form:
For example:
  • “Tesla” → “headquarters_in” → “Austin, Texas”
  • “Elon Musk” → “founded” → “SpaceX”
  • “SpaceX” → “founded_year” → “2002”

Creating Triples

Single Triple

Batch Creation

Create multiple triples in one request:
Batch creation is more efficient than individual requests. Use it when storing multiple facts at once.

Querying Triples

By Subject

Get all facts about a specific entity:

By Predicate

Get all facts of a specific type:

By Entity ID

Query using the resolved entity IDs:
Search across subject, predicate, and object:

Filter by Graph

Get triples from a specific graph:

Combining Filters

Updating Triples

Update an existing triple by ID:
You can update:
  • subject, predicate, object
  • confidence
  • source
  • graph_id

Deleting Triples

Single Delete

Batch Delete

Best Practices

Predicate Naming

Use consistent, lowercase, snake_case predicates:

Confidence Scores

Be realistic with confidence scores:

Sources

Always include sources when possible:

Entity vs Literal

Use the correct object type:

Response Example

API Reference

See the complete Triples API documentation.