Skip to content

Extract All Entities

🤖 AI Drafted (Not reviewed)

Single-pass extraction of people, places, organisations, dates, events, and keywords. One LLM call per page returns all six types as JSON — 6× fewer calls than the per-type extractors, same downstream shape (KG claims + per-page artifacts).

Tool id extract_all
Category llm
Uses a language model yes
Needs a generative model no
Runs over many items no
Item handling batch
Structured output yes
Human-verified not yet

What it reads

Port Type Required What it is
Text (text) text yes Aggregated text to extract from.
Records (records) array no Optional per-page records [{doc_id, text}, …] from an upstream Aggregate node. When present, claims + artifacts save to PAGE doc_id (page-level KG).

What it emits

Port Type Required What it is
Text (text) text Raw text response
Value (value) any Parsed value
Texts (texts) array Per-item texts
Values (values) array Per-item values
Results (results) json Full results
Records (records) array Per-document text records [{doc_id, text}, …].
Artifacts (artifacts) json Artifact IDs
KG Payload (kg_payload) json Persistable KG write bundle

Options

Option Type Default What it does
choices array Valid choices. (Not shown in the editor.)
chunk_size_chars integer 0 Chunk large input text above this character budget (0=auto).
extraction_mode string oneshot Extraction mode. ‘oneshot’ uses one LLM call per page for all entity types. ‘twostage’ first extracts entity names only, then runs per-entity claim extraction for grounded SVO output. One of: oneshot, twostage.
match_mode string prefer Match mode. One of: prefer, strict, inform.
max_items integer 10 List max items.
max_tokens integer 8192 Max response.
max_words integer 50 Word limit.
metadata_field string Save to field.
model_name string Model name.
ner_model string Optional NER backend model (e.g. en_core_web_sm, en_core_web_trf).
ner_provider string spacy NER hint provider for extractor pre-pass: spacy, llm, or transformers.
output_format string text Response format. One of: text, boolean, choice, number, words, list, json.
output_language string auto Output language. ‘auto’ detects from the source text (English / Spanish today).
persist_kg boolean yes Persist KG rows inline. Set false when an explicit downstream kg_writer node should own the write.
prompt string Custom prompt.
provider_name string LLM provider. One of: openai, anthropic, google, ollama, lmstudio, groq, together, deepseek, mistral, openrouter, dashscope, xai, perplexity, fireworks, deepl.
quality_gate boolean yes Stop the run if output is unreadable.
reference_values object Known values to match. (Not shown in the editor.)
save_to_db boolean yes Save to library.
save_to_file boolean no Export to file.
temperature number 0.7 Creativity.
thinking_mode string off Chain-of-thought reasoning depth. One of: off, short, medium, long.

The prompt it sends

This is what the tool asks a model, with every option left at its default. Changing the options above changes this text.

You are an expert archivist extracting structured entities from a document. Extract evidence, not ontology labels. Do NOT emit generic claims like 'Pedro is a person', 'Colombia is a location', or 'cash is a concept'. Entity type is metadata only. For each useful entity or index term, extract specific SVO facts grounded in nearby text, with source_text as a short exact quote from the page, preserving any [ilegible] / [uncertain] markers exactly as written. Cover repeated useful facts for the same entity when the text supports them. Only include facts the text supports — do not speculate or invent. Keywords are book-index terms for finding this page later: include relevant concepts, subjects, and names only when they help locate the passage; do not pad to a quota. Write prose fields in English. Use verbs from the page context for ordinary claims. Reserve reporting verbs (said, stated, declared, asserted, claimed, testified, petitioned, reported, argued, wrote, denied, requested) for direct quotations or explicitly attributed statements only.

Section-specific guidance:
- people: named people or named groups only. Extract specific facts about what they did, used, worked, produced, relied on, valued, or experienced. Do not use reporting verbs unless the text directly quotes or attributes speech.
- places: named places or geographic regions with a specific relationship stated by the text. This includes geographic and land-use CATEGORIES, not just proper names: 'agricultural zones', 'mining districts', 'territories' all belong here. If a term denotes a location or land area — even a generic one — it is a place, NOT a keyword/concept.
- organizations: named organizations only.
- dates: dates stated in the text, with the event or condition attached to that date.
- events: occurrences explicitly stated by the text. This includes unnamed/generic occurrences: 'accident', 'flood', 'death', 'fire' are events, NOT keywords/concepts. If a term denotes something that happened, it is an event.
- quotes: direct quotations only, where the source gives quoted words or an explicit speaker/writer attribution.
- keywords: the 5-8 MOST SALIENT, distinctive keywords for ABSTRACT ideas only — themes, subjects, time periods, ideologies. Do NOT put places, events, people, or organizations here. If a term names a location (even 'agricultural zones') it belongs in places; if it names an occurrence (like 'accident' or 'flood') it belongs in events. Keywords are concepts, not concrete entities.