Prompt Library
Overview
The Prompt Library is a centralized, auditable repository of LLM prompts in DataWorkz. Prompts are composable assets (a System Prompt that defines AI persona/constraints and a User Prompt that defines the input template) that can be reused across tasks. Primary uses:
Standardize extraction and transformation behavior (platform default prompts).
Allow teams to author domain prompts (custom prompts) for question generation, entity extraction, summarization, etc.
Reuse prompts across Entity Extraction tasks and Knowledge Graph creation tasks to ensure consistent outputs and predictable schemas.
Prompt Library — features, creation, and workflow
Features (what the library provides)
Default prompts (platform-supplied, shown as Required): required for certain ontologies or templates. Example cards: EntityPrompt, ArticlePrompt
Custom prompts (user-created): full authoring UI (Category, Name, Description, System Prompt, User Prompt).
Preview: modal that shows full System + User prompts and any JSON schema / instructions. Useful to inspect machine-readable schema requirements.
Attach prompts to tasks: prompts can be added to extract/graph tasks via Create new prompt (inline) or Add from library.
Usage visibility: each prompt card shows “Active in N workflows” so authors know adoption before editing or deleting.
Prompt creation — step-by-step
Navigate to Settings → AI Config → Prompt Library. (See: library list view)
Click Add Prompt (top-right) to open the Add prompt modal.
Required fields:
Category — select or type a category tag (helps filter).
Name — unique, descriptive name (e.g., QuestionGeneratorPrompt).
Description — one-line summary of intent.
System Prompt — define role, constraints, required output schema (e.g., precise JSON).
User Prompt — runtime template with placeholders (e.g., ${text}, ${n}).
Click Create Prompt to save. If fields are missing the UI will show validation (required markers).
Preview or edit after creation: open the prompt card and choose Preview or Edit. Use Preview to confirm model-facing instructions and schema.
3. Use Prompt Library for Entity Extraction
4. Use Prompt Library to Create a Knowledge Graph
If you need to change extraction behavior, update or version prompts in the Prompt Library and re-run the job. If many jobs use a prompt, create a new version rather than editing inline.
Default prompts vs. custom prompts (governance & impact)
Default prompts are provided by DataWorkz and are auto-attached for certain template/ontology types (shown as Required). Don’t remove them — they guarantee minimal platform behavior.
Custom prompts let clients tune behavior. Always version custom prompts and test them in sandbox runs before attaching to recurring tasks.
Operational best practices & troubleshooting
Best practices
Schema-first: enforce strict JSON in the System Prompt for deterministic outputs.
Version prompts: PromptName_v1, PromptName_v2.
Preview/test: always preview and run small test batches with the prompt before scheduling recurring jobs.
Monitor adoption: check the “Active in N workflows” metric and plan changes carefully.
Troubleshooting common issues
Malformed JSON outputs — tighten System Prompt (e.g., “Return only JSON matching schema: ...”) and test with sample input.
Unexpected extraction results — add example inputs in User Prompt and include acceptance rules in System Prompt.
Last updated

