Skip to content
Novus Examples
jsonl3 KB

Prompt Library (JSONL)

A reusable prompt library in JSON Lines — 20 templated prompts for summarization, translation, extraction, code, and more, each with a task label, tags, and {curly-brace} placeholders. A fixture for prompt-management tools and JSONL parsers.

Preview — first 21 linesjsonl
{"id": "pl-000", "task": "summarize", "prompt": "Summarize the following text in three concise bullet points:\n\n{text}", "tags": ["summarization"]}
{"id": "pl-001", "task": "translate", "prompt": "Translate the text below into {target_language}. Preserve tone and formatting.\n\n{text}", "tags": ["translation"]}
{"id": "pl-002", "task": "classify", "prompt": "Classify the sentiment of this review as positive, negative, or neutral. Reply with one word.\n\n{text}", "tags": ["classification"]}
{"id": "pl-003", "task": "extract", "prompt": "Extract every email address and phone number from the text as a JSON object.\n\n{text}", "tags": ["extraction"]}
{"id": "pl-004", "task": "rewrite", "prompt": "Rewrite the passage below in plain, friendly language for a general audience.\n\n{text}", "tags": ["rewriting"]}
{"id": "pl-005", "task": "codegen", "prompt": "Write a {language} function that {task}. Include a short docstring and one example.", "tags": ["code"]}
{"id": "pl-006", "task": "explain", "prompt": "Explain the following code to a junior developer, step by step.\n\n{code}", "tags": ["code", "explanation"]}
{"id": "pl-007", "task": "sql", "prompt": "Given this schema:\n{schema}\nWrite a SQL query that {request}.", "tags": ["sql", "code"]}
{"id": "pl-008", "task": "qa", "prompt": "Answer the question using only the context. If the answer isn't present, say 'not found'.\n\nContext: {context}\nQuestion: {question}", "tags": ["qa"]}
{"id": "pl-009", "task": "title", "prompt": "Suggest five concise, engaging titles for an article about {topic}.", "tags": ["brainstorm"]}
{"id": "pl-010", "task": "keywords", "prompt": "List the 8 most important keywords in the text, comma-separated.\n\n{text}", "tags": ["extraction"]}
{"id": "pl-011", "task": "tone", "prompt": "Rewrite this message to sound more {tone} while keeping the meaning.\n\n{text}", "tags": ["rewriting"]}
{"id": "pl-012", "task": "outline", "prompt": "Create a structured outline for a {length}-minute talk about {topic}.", "tags": ["brainstorm"]}
{"id": "pl-013", "task": "json-fix", "prompt": "The following JSON is invalid. Return only the corrected, valid JSON.\n\n{json}", "tags": ["code", "repair"]}
{"id": "pl-014", "task": "steps", "prompt": "Break the goal below into a numbered, actionable checklist.\n\nGoal: {goal}", "tags": ["planning"]}
{"id": "pl-015", "task": "compare", "prompt": "Compare {a} and {b} across cost, speed, and ease of use in a small table.", "tags": ["analysis"]}
{"id": "pl-016", "task": "regex", "prompt": "Write a regular expression that matches {pattern_description}. Explain each part.", "tags": ["code"]}
{"id": "pl-017", "task": "email", "prompt": "Draft a polite, {length}-sentence email that {purpose}.", "tags": ["writing"]}
{"id": "pl-018", "task": "faq", "prompt": "From the document below, generate five FAQ question-and-answer pairs.\n\n{document}", "tags": ["generation"]}
{"id": "pl-019", "task": "sentiment-batch", "prompt": "For each line of input, output the line number and its sentiment label.\n\n{lines}", "tags": ["classification"]}

Specifications

Prompts
20
Schema
id, task, prompt, tags[]
Placeholders
{curly_brace}

What is a .jsonl file?

JSONL (JSON Lines) is a text format where each line is a complete, independent JSON value, allowing records to be streamed and appended without parsing the whole file. It is not itself a JSON array and each line must stand alone. It is common in logging, machine learning datasets, and data pipelines.

How to use this file

Use an example JSONL to test line-by-line streaming parsers, append-and-resume ingestion, and batch pipelines that process one record per line.

Code examples

import json

with open("prompt-library.jsonl") as f:
    rows = [json.loads(line) for line in f]
print(len(rows), rows[0])

Generated by generation/ai_datasets.py. Free for any use, no attribution required — license.