Knowledge Graph Extractor (BYO-key)

Extract entity-relationship triples from LLM output as a knowledge graph.

Use your own OpenAI or Anthropic key to extract subject-predicate-object triples from any text, list every unique entity, and export the result as Graphviz DOT to render an interactive knowledge graph. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is a subject-predicate-object triple?

It is the basic unit of a knowledge graph — two entities connected by a relationship, such as "Ada — invented — algorithm." Extracting text into triples turns prose into a structured graph you can query, visualize, or load into a graph database.

Turn prose into a structured knowledge graph

A wall of text hides the relationships inside it. This tool uses your own API key to extract those relationships as subject-predicate-object triples — the building blocks of a knowledge graph — and lists every unique entity, so you can see at a glance who is connected to what and how.

How it works

You paste text and, optionally, the entity types you care about. The tool sends a structured extraction prompt that asks the model to return only a JSON array of { subject, predicate, object } triples, with consistent entity naming. It then parses that JSON robustly — tolerating code fences and alternate key names like relation or from/to — and renders the triples as a table alongside a count of unique entities. One click exports the whole graph as Graphviz DOT, ready to render in any DOT-compatible viewer.

What a knowledge graph triple looks like

Each triple has three slots:

SlotRoleExample
Subjectthe entity the statement is aboutAda Lovelace
Predicatethe relationship or propertypublished
Objectthe other entity or valueNotes on Babbage’s Analytical Engine

A collection of triples builds a graph where entities are nodes and predicates are labelled edges. For example, three triples from a Wikipedia paragraph might produce: Ada Lovelace → collaborated with → Charles Babbage, Ada Lovelace → is considered → first programmer, Charles Babbage → designed → Analytical Engine. When rendered as a graph, these reveal the relational structure at a glance.

Practical uses

Research synthesis. Drop in a research abstract or literature review section and extract who did what to whom. The entity list quickly surfaces the key actors and concepts without reading every sentence.

Competitive intelligence. Paste a news article or earnings call transcript and extract organisation-to-action relationships: acquisitions, partnerships, product launches.

Ontology and taxonomy building. Use the extracted triples as a first draft for a domain ontology. The predicates reveal the vocabulary that naturally describes the domain.

Graph database population. The subject-predicate-object format maps directly to RDF triples, Cypher relationships (Neo4j), or property-graph edges. Export the DOT, then transform it to your target format.

Tips for better extractions

Naming the entity types you want focuses the model and cuts noise. “people, organizations, products” stops it from extracting trivial grammar relationships (“the — is a — word”). Limit to two or three entity types for clean graphs.

Review the unique-entity list for near-duplicates — the model may write “Ada Lovelace” and “Lovelace” as separate entities despite the consistency instruction. Merge them manually in your downstream tool.

For long documents, extract in sections of a few hundred words and combine the triple lists. Your API key never leaves your browser except to call the provider directly, and it is never stored.