codebook / potato /ai /prompt /span.json
davidjurgens's picture
Deploy: Potato — Codebook Annotation
aceb1b2 verified
Raw
History Blame Contribute Delete
4.48 kB
{
"hint": {
"prompt": "TASK: Generate guidance for text span highlighting/selection.\n\nINPUT DETAILS:\n- Text to annotate: \"${text}\"\n- Annotation task: ${description}\n- Available labels: ${labels}\n\nINSTRUCTIONS:\n1. Guide toward identifying specific text portions that need highlighting\n2. Focus on boundary detection and span selection criteria\n3. Help distinguish between different types of spans to highlight\n\nHINT REQUIREMENTS:\n- Identify markers that indicate span boundaries (start/end points)\n- Point out different types of spans corresponding to available labels\n- Guide toward precise text selection (not too broad/narrow)\n- Highlight contextual clues for span classification",
"output_format": "default_hint",
"img": "/static/ai_assistant_img/blub.svg"
},
"keyword": {
"prompt": "TASK: Extract boundary markers and span indicators.\n\nINPUT DETAILS:\n- Text: '${text}'\n- Annotation task: ${description}\n- Available labels: ${labels}\n\nOBJECTIVE: Identify text spans that mark boundaries or indicate span types. Spans can be single words, multiple words, phrases, sentences, or any continuous text segment.\n\nSELECTION CRITERIA:\n- Boundary markers (punctuation, transitional words, phrases)\n- Type indicators for different span categories\n- Start/end signals for text segments (can be single words or multi-word expressions)\n- Classification markers within spans (words, phrases, or full sentences)\n- Structural elements that define spans (can span multiple words)\n\nSPAN LENGTH EXAMPLES:\n- Single character: ',' or '.' (punctuation)\n- Single word: 'however' or 'therefore'\n- Multiple words: 'on the other hand' or 'in conclusion'\n- Phrase: 'despite the challenges'\n- Sentence: 'This marks a significant transition.'\n- Paragraph or longer: Any continuous text segment\n\nREQUIRED OUTPUT FORMAT \n- 'label': One of the available labels (${labels})\n- 'start': Zero-indexed character position where span begins\n- 'end': Zero-indexed character position where span ends (exclusive)\n- 'text': Exact text extracted from the input (can be any length)\n- 'reasoning': Brief explanation for the classification\n\nCHARACTER INDEXING RULES:\n- First character is at index 0\n- 'end' is exclusive: text = input.substring(start, end)\n- Single word example: In 'Hello world', 'Hello' = {start: 0, end: 5}\n- Multi-word example: In 'Hello world', 'Hello world' = {start: 0, end: 11}\n- Phrase example: In 'on the other hand', entire phrase = {start: 0, end: 17}\n\nEXAMPLE OUTPUT:\n[{\n 'label': 'boundary_marker', 'start': 5, 'end': 6, 'text': ',', 'reasoning': 'Punctuation marking clause boundary'\n}, {\n 'label': 'transition_phrase', 'start': 10, 'end': 28, 'text': 'on the other hand', 'reasoning': 'Multi-word transitional phrase indicating contrast'\n}, {\n 'label': 'conclusion_sentence', 'start': 30, 'end': 65, 'text': 'This marks a significant transition.', 'reasoning': 'Complete sentence signaling major shift'\n}]\n",
"output_format": "default_keyword",
"img": "/static/ai_assistant_img/highlight.svg"
},
"rationale": {
"name": "Rationale",
"prompt": "TASK: Generate rationales explaining why each span label might apply to portions of this text.\n\nINPUT DETAILS:\n- Text to annotate: \"${text}\"\n- Annotation task: ${description}\n- Available labels: ${labels}\n\nCRITICAL REQUIREMENT:\nYou MUST provide a rationale for EVERY label listed above. Count the labels and ensure your output has exactly that many rationale entries.\n\nINSTRUCTIONS:\nFor EACH available label (ALL of them, no exceptions), provide a brief rationale explaining what types of text spans in this document could be tagged with that label. Even if a label doesn't seem to apply, explain what would need to be present for it to apply.\n\nOUTPUT FORMAT:\nReturn a JSON object with \"rationales\" array containing one object per label, each with \"label\" and \"reasoning\" fields.\n\nEXAMPLE (if labels are: positive, negative, product, quality):\n{\"rationales\": [{\"label\": \"positive\", \"reasoning\": \"Words expressing satisfaction or approval\"}, {\"label\": \"negative\", \"reasoning\": \"Words expressing dissatisfaction or criticism\"}, {\"label\": \"product\", \"reasoning\": \"Names of items being discussed\"}, {\"label\": \"quality\", \"reasoning\": \"Descriptions of attributes or characteristics\"}]}",
"output_format": "default_rationale",
"img": "/static/ai_assistant_img/question.svg"
}
}