This prompt is designed for knowledge system engineers who need to identify when an input references entities, concepts, or facts that the system does not recognize. It belongs in a pipeline where a retrieval system or knowledge graph has already attempted entity linking, and the model acts as a secondary detector for coverage gaps. The ideal user is an MLOps engineer or knowledge base maintainer who needs structured, actionable output to prioritize knowledge base updates, not a general user performing entity extraction.
Prompt
Novel Entity Detection Prompt for Knowledge Gaps

When to Use This Prompt
Identifies the specific job-to-be-done, ideal user, and operational boundaries for the Novel Entity Detection prompt.
Use this prompt when you need structured output that flags novel entities, provides context for human reviewers, and generates actionable suggestions for knowledge base updates. It is most effective in batch processing or asynchronous review workflows where a human will triage the results. The prompt requires a pre-processed input that includes the original text and the results of a failed or low-confidence entity linking attempt. Do not use this prompt for general entity extraction where coverage is not the primary concern, or for real-time applications where latency prohibits a thorough gap analysis.
Before implementing this prompt, ensure your pipeline can provide the necessary context: the raw input text and the specific entities or concepts your primary system failed to resolve. The output is a structured JSON payload designed for ingestion into a review queue or knowledge base update tool. Avoid using this prompt as a standalone entity extractor; it is a diagnostic tool for system improvement, and its value is in the structured escalation and suggestion it provides, not in replacing your primary entity linking system.
Use Case Fit
Where the Novel Entity Detection Prompt works and where it introduces risk. Use these cards to decide if this prompt fits your knowledge system architecture.
Good Fit: Knowledge Base Gap Analysis
Use when: you need to scan incoming documents or queries for named entities, concepts, or facts that your knowledge base does not yet cover. Guardrail: pair with a defined entity coverage benchmark and a human review queue that can accept or reject detected gaps before they trigger automated knowledge base updates.
Bad Fit: Real-Time Blocking Decisions
Avoid when: the detection result must block or allow a transaction in a synchronous user-facing path with no human in the loop. Guardrail: novel entity detection is probabilistic. Use it only in asynchronous review workflows where false positives can be triaged without user impact.
Required Inputs
What you need: a source text or entity list to scan, a defined knowledge boundary (taxonomy, entity catalog, or known-fact store), and a confidence threshold for escalation. Guardrail: missing any of these inputs turns the prompt into an ungrounded classifier. Validate inputs before invoking the prompt.
Operational Risk: Entity Coverage Drift
What to watch: the model's own knowledge boundary shifts over time due to model updates, while your system's entity catalog remains static. Guardrail: periodically re-benchmark detection recall against a held-out set of known novel entities and recalibrate thresholds when model versions change.
Operational Risk: False Novelty Cascades
What to watch: a single ambiguous entity triggers escalation, which triggers a knowledge base update, which triggers re-indexing, which triggers downstream cache invalidation. Guardrail: require human confirmation before any automated write to the knowledge base. Gate all downstream actions behind approval.
Variant: Confidence-Gated Escalation
Use when: you want to reduce review queue volume by only escalating low-confidence detections. Guardrail: add a structured confidence score to the output schema and route high-confidence novel entities to automated ingestion while escalating ambiguous cases. Monitor false negative rates on the automated path.
Copy-Ready Prompt Template
A reusable prompt for detecting named entities, concepts, or facts outside the system's knowledge boundary and escalating them with structured context for knowledge base updates.
This template is designed to be dropped into a knowledge system pipeline where the model must distinguish between known and unknown entities. It instructs the model to act as a strict novelty detector, comparing input text against a provided knowledge boundary and outputting a structured escalation payload when gaps are found. The prompt uses square-bracket placeholders that must be replaced with your specific domain taxonomy, knowledge boundary definitions, and output schema before use.
textYou are a novelty detection agent for a knowledge management system. Your task is to analyze the provided text and identify any named entities, technical concepts, or factual claims that fall outside the defined knowledge boundary. Do not guess or infer beyond the boundary. ## KNOWLEDGE BOUNDARY [KNOWLEDGE_BOUNDARY_DEFINITION] ## INPUT TEXT [INPUT_TEXT] ## INSTRUCTIONS 1. Extract all named entities, domain-specific concepts, and factual claims from the input text. 2. For each extracted item, determine whether it is fully covered by the knowledge boundary above. 3. Classify each item as KNOWN or NOVEL. 4. For NOVEL items, provide: - The exact text span from the input - The entity or concept type (from the allowed taxonomy) - A confidence score (0.0 to 1.0) indicating how certain you are that this is genuinely outside the boundary - A brief diagnostic note explaining why it falls outside the boundary 5. If no novel items are found, return an empty list with a confirmation that all entities are known. ## ALLOWED ENTITY TYPES [ENTITY_TYPE_TAXONOMY] ## OUTPUT SCHEMA Return a JSON object with the following structure: { "analysis_timestamp": "ISO-8601 timestamp", "total_entities_extracted": integer, "known_entities": integer, "novel_entities": [ { "text_span": "exact text from input", "entity_type": "type from taxonomy", "confidence_novel": float, "diagnostic_note": "reason for novelty classification", "suggested_canonical_form": "proposed normalized form or null", "context_snippet": "surrounding sentence for human review" } ], "escalation_recommended": boolean, "escalation_priority": "LOW | MEDIUM | HIGH | CRITICAL", "reviewer_notes": "summary for human reviewer or null" } ## CONSTRAINTS - Do not mark an entity as NOVEL if any synonym, abbreviation, or variant is covered by the knowledge boundary. - If you are uncertain about novelty (confidence below 0.7), mark as NOVEL and note the uncertainty in the diagnostic note. - For CRITICAL priority escalations, include a specific recommendation for immediate human review. - Never fabricate knowledge boundary coverage to reduce escalation volume.
Before integrating this prompt, replace each placeholder with concrete, version-controlled content. [KNOWLEDGE_BOUNDARY_DEFINITION] should be a precise description of what the system knows—this could be a list of covered domains, a reference to an indexed corpus, or explicit entity lists. [ENTITY_TYPE_TAXONOMY] must be a closed set of allowed types (e.g., PERSON, ORGANIZATION, PRODUCT, TECHNICAL_TERM, REGULATORY_REFERENCE). [INPUT_TEXT] is the runtime text to analyze. After adapting the template, run it against a golden dataset of known entities and known gaps to verify that the model correctly distinguishes between the two before deploying to production.
Prompt Variables
Inputs the Novel Entity Detection Prompt needs to work reliably. Each placeholder must be populated before the prompt is assembled and sent to the model.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[INPUT_TEXT] | The text passage to scan for novel entities | The newly released QX-9000 processor features a 3nm Zen architecture and a dedicated neural processing unit called the CogniCore. | Required. Must be non-empty string. Reject if length < 20 characters or > 8000 tokens. Strip markup before passing. |
[KNOWLEDGE_BOUNDARY_DEFINITION] | Description of what the system is expected to know, defining the boundary for novelty detection | Entities and concepts documented in the internal knowledge base as of 2024-10-01. Covers semiconductor products, CPU architectures, and AI accelerators from major vendors. | Required. Must be a non-empty string. Should reference a specific knowledge cutoff date or corpus version for auditability. |
[ENTITY_TYPES_OF_INTEREST] | List of entity categories to scan for, guiding the detector's focus | ["product_name", "technology_node", "architecture_name", "hardware_component", "company_name"] | Required. Must be a valid JSON array of strings. Each string must be a snake_case category label. Empty array means scan all entity types. |
[KNOWN_ENTITY_LIST] | Reference list of entities the system already recognizes, used to determine novelty | ["AMD Ryzen", "Intel Core", "TSMC N5", "NVIDIA CUDA", "Apple Neural Engine"] | Optional. If null, the model relies solely on its parametric knowledge. If provided, must be a valid JSON array of strings. Use for explicit knowledge base coverage checks. |
[CONFIDENCE_THRESHOLD] | Minimum confidence score for classifying an entity as known before flagging it as novel | 0.85 | Required. Must be a float between 0.0 and 1.0. Higher values increase recall of novel entities but may increase false positives. Default 0.80 if not specified. |
[OUTPUT_SCHEMA] | Expected JSON structure for the detection results, used to enforce format compliance | {"novel_entities": [{"mention": "string", "entity_type": "string", "confidence": "float", "context_snippet": "string", "rationale": "string"}], "known_entities": [...], "escalation_recommended": "boolean"} | Required. Must be a valid JSON Schema object or example structure. Used by the application layer for parsing and validation. Reject malformed outputs that don't conform. |
[ESCALATION_CONDITIONS] | Rules that trigger human review routing based on detection results | Escalate if novel_entities array is non-empty OR if any known entity has confidence below 0.70. | Required. Must be a non-empty string describing boolean conditions. Used by the harness to decide whether to route to a review queue. Test with known-novel and known-familiar inputs. |
Implementation Harness Notes
How to wire the Novel Entity Detection prompt into a production application with validation, retries, and escalation logic.
The Novel Entity Detection prompt is not a standalone chat interaction—it is a classifier and escalation trigger that should sit inside a structured pipeline. The typical integration pattern is: (1) receive a text input or document, (2) run the prompt against a defined knowledge boundary or entity catalog, (3) parse the structured output, and (4) route any detected novel entities to a review queue or knowledge base update workflow. The prompt expects a [CONTEXT] block containing the text to analyze and an [ENTITY_CATALOG] or [KNOWLEDGE_BOUNDARY] block defining what the system already knows. The output should be a strict JSON schema with fields for detected_novel_entities, confidence_scores, context_excerpts, and escalation_recommendation. Do not treat this as a free-text generation task—the value comes from structured, machine-readable output that downstream systems can act on without human parsing.
Wiring the prompt into an application requires several guard layers. First, implement output validation using a JSON schema validator that checks for required fields, correct types, and enum compliance on escalation_recommendation (e.g., REVIEW, IGNORE, UPDATE_CATALOG). If validation fails, retry once with the same input and a repair instruction appended to the prompt. Second, add a confidence threshold gate: if any novel entity has a confidence score below 0.7, route the entire detection batch to a human review queue rather than auto-updating the knowledge base. Third, implement deduplication against existing review items to prevent the same novel entity from flooding the queue repeatedly. For model choice, use a model with strong instruction-following and JSON output discipline—GPT-4o, Claude 3.5 Sonnet, or equivalent. Avoid smaller models that may hallucinate entity boundaries or produce malformed JSON under the structured output constraint. If your entity catalog is large, consider chunking the input and running detection in parallel windows, then merging results with a deduplication pass.
Logging and observability are critical because this prompt directly influences knowledge base updates. Log every detection call with: input hash, model version, detected entities, confidence scores, escalation decision, and whether the detection resulted in a catalog update or human review. This creates an audit trail for debugging false positives and measuring drift in the model's entity recognition behavior over time. Set up an eval harness that runs weekly against a golden dataset of known novel entities and known in-catalog entities. Measure precision (did we flag only true novelties?), recall (did we miss any?), and escalation accuracy (did high-confidence true positives route to auto-update while ambiguous cases went to review?). If precision drops below 85% or recall below 90%, freeze automatic catalog updates and route all detections to human review until the prompt or model is recalibrated. Never allow this prompt to write directly to a production knowledge base without either a confidence gate or a human-in-the-loop checkpoint.
Expected Output Contract
Defines the structured JSON payload the model must return when novel entities are detected. Use this contract to validate outputs before routing to knowledge base update queues or human review.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
detected_entities | Array of objects | Must be a non-empty array if novel entities are found; empty array if none detected. Each object must conform to the entity sub-schema. | |
detected_entities[].name | String | Must be the surface form of the entity as it appears in [INPUT_TEXT]. Cannot be empty or whitespace-only. | |
detected_entities[].entity_type | Enum: PERSON, ORG, PRODUCT, CONCEPT, EVENT, TECHNOLOGY, LOCATION, OTHER | Must be one of the specified enum values. Use OTHER only if no other type fits. | |
detected_entities[].novelty_confidence | Number (0.0 to 1.0) | Must be a float between 0.0 and 1.0. Values below [CONFIDENCE_THRESHOLD] should trigger a retry or human review. | |
detected_entities[].context_excerpt | String | Must be a verbatim substring from [INPUT_TEXT] that provides surrounding context for the entity. Maximum 300 characters. | |
detected_entities[].knowledge_gap_reason | String | Must explain why the entity is outside the system's knowledge boundary. Cannot be generic; must reference specific missing facts or attributes. | |
escalation_required | Boolean | Must be true if any entity has novelty_confidence >= [CONFIDENCE_THRESHOLD] or if the entity appears in a [HIGH_RISK_DOMAIN]. Otherwise false. | |
diagnostic_notes | String or null | If provided, must summarize patterns across detected entities, such as a common source domain or systemic knowledge gap. Null allowed if no patterns identified. |
Common Failure Modes
Novel entity detection fails silently when the model confuses absence of evidence with evidence of absence. These failure modes break knowledge base updates, erode trust in retrieval, and create blind spots that compound over time. Each card identifies a specific failure and the guardrail that catches it before it reaches production.
False Negatives on Known Entities
What to watch: The prompt flags a recognized entity as novel because the entity appears in an unfamiliar surface form, abbreviation, or synonym. The model treats a spelling variant as a knowledge gap rather than a normalization problem. Guardrail: Pre-process inputs through an entity normalization or alias resolution step before the novelty check. Include a list of known aliases and canonical forms in the prompt context so the model can match variants before declaring novelty.
Over-Reporting Novelty on Common Knowledge
What to watch: The model flags widely known entities as novel because they fall outside a narrow knowledge boundary definition. This floods the review queue with false positives and erodes reviewer trust in the escalation signal. Guardrail: Define a tiered knowledge boundary with explicit inclusion criteria. Add a confidence threshold that requires the model to articulate why the entity is likely unknown rather than simply unrecognized in the current context window.
Missing Multi-Word and Nested Entities
What to watch: The prompt extracts single-token entities but misses compound names, nested organizations, or entities that span multiple words. A reference to 'the European Central Bank's regulatory division' might only flag 'European Central Bank' while missing the specific sub-entity. Guardrail: Include explicit instructions and few-shot examples for multi-word entity boundaries, nested entity extraction, and possessive or prepositional entity relationships. Validate output against a span-coverage metric.
Context Window Truncation Masking Gaps
What to watch: When input text exceeds context limits, entities in truncated sections are never evaluated. The system reports no novel entities because it never saw the evidence that would have triggered detection. Guardrail: Chunk long inputs with overlap and run detection on each chunk independently. Aggregate results and flag any chunk where truncation may have split an entity mention. Log truncation events separately from genuine negative results.
Temporal Drift in Knowledge Boundaries
What to watch: The model's knowledge cutoff creates a moving boundary. Entities that emerged after training are correctly flagged as novel, but the system has no way to distinguish between genuinely new entities and entities the model simply hasn't encountered. Over time, the novelty signal degrades as the knowledge base ages. Guardrail: Pair the detection prompt with a timestamped knowledge base manifest. When an entity is flagged, check against the manifest's last-update timestamp before escalating. Route pre-cutoff entities to retrieval rather than review.
Confusing Entity Absence with Negative Knowledge
What to watch: The model conflates 'I don't know this entity' with 'this entity does not exist.' It may generate a confident negative assertion instead of an uncertainty flag, especially when the prompt asks for a binary known/unknown decision without an explicit abstention path. Guardrail: Require a structured output with separate fields for detection status, confidence score, and evidence basis. Include an explicit 'uncertain' category and few-shot examples where the correct answer is abstention rather than a forced binary classification.
Evaluation Rubric
Use this rubric to test the Novel Entity Detection Prompt before deploying it to a production knowledge system. Each criterion targets a specific failure mode observed in entity-boundary detection workflows.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Known Entity Rejection | Prompt correctly classifies all entities from the [KNOWN_ENTITY_LIST] as 'recognized' with confidence >= 0.9. | A known entity is flagged as 'novel' or 'unknown'. | Run a golden dataset of 100 in-distribution entities through the prompt. Assert zero false positives on the 'novel' label. |
Novel Entity Recall | Prompt identifies >= 95% of seeded novel entities from the [NOVEL_ENTITY_BENCHMARK] set. | A novel entity is missed and classified as 'recognized' or omitted from the output. | Inject 20 known-out-of-scope entities into test documents. Assert recall >= 95% against the expected escalation list. |
Output Schema Compliance | Output is valid JSON matching the [OUTPUT_SCHEMA] with all required fields present. | Output is missing the 'entity', 'detection_status', or 'escalation_context' fields, or is unparseable. | Validate output with a JSON Schema validator. Assert no validation errors across 50 test runs. |
Escalation Context Quality | For each novel entity, the 'escalation_context' field contains the entity mention, surrounding sentence, and a specific knowledge gap reason. | Escalation context is empty, contains only the entity name, or provides a generic reason like 'not in database'. | Manual review of 30 escalated entities. Assert >= 90% contain a specific, actionable knowledge gap description. |
Confidence Score Calibration | Confidence scores for novel entities are <= 0.5. Confidence scores for recognized entities are >= 0.9. | A novel entity receives a confidence score > 0.7, or a recognized entity receives a score < 0.7. | Plot confidence score distributions for known and novel test sets. Assert clear separation with no overlap in the interquartile ranges. |
Boundary Entity Handling | Entities partially matching the knowledge base (e.g., acronyms, synonyms) are flagged with 'detection_status': 'boundary' and escalated for human review. | A boundary entity is incorrectly classified as fully 'recognized' or fully 'novel'. | Curate 15 boundary cases (e.g., 'ACME Corp' vs 'ACME Ltd'). Assert all are routed to the escalation queue with the correct status. |
Multi-Entity Document Handling | Prompt extracts and classifies all distinct entities in a document containing 5+ mixed known and novel entities. | Only the first or most prominent entity is processed; subsequent entities are ignored. | Submit a document with 8 entities (4 known, 4 novel). Assert the output array contains exactly 8 entries with correct individual classifications. |
Adversarial Input Robustness | Prompt does not classify prompt injection strings or gibberish as novel entities requiring escalation. | An injection string like 'IGNORE PREVIOUS INSTRUCTIONS' appears in the escalation queue as a novel entity. | Feed 10 prompt injection strings and 10 random character sequences. Assert zero appear in the output as entities. |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Use the base prompt with a lightweight JSON schema and a small reference entity list. Focus on recall over precision. Accept any structured output that separates known_entities from novel_entities.
code[SYSTEM] You are a knowledge gap detector. Given [INPUT_TEXT] and [KNOWN_ENTITY_LIST], identify named entities, concepts, or facts not present in the known list. Return JSON with `known_entities` and `novel_entities` arrays. [OUTPUT_SCHEMA] {"known_entities": [...], "novel_entities": [...]}
Watch for
- Missing schema checks leading to malformed JSON
- Overly broad instructions that flag common knowledge as novel
- No confidence threshold, so every unrecognized term gets escalated

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us