Function Calling
8 requirements
·
35 scenarios
Rich Text Formatting Preservation
JR-function-calling-001
The system SHALL preserve bold, italic, and underline formatting when inserting text into documents. Nested and malformed formatting markup SHALL be handled gracefully without data loss.
5 test scenarios
- Bold formatting applied correctly JR-function-calling-001.1
- Italic formatting applied correctly JR-function-calling-001.2
- Underline formatting applied correctly JR-function-calling-001.3
- Nested formatting preserved JR-function-calling-001.4
- Malformed markup handled gracefully JR-function-calling-001.5
Duplicate Numbering Prevention
JR-function-calling-007
The system SHALL detect and strip redundant section numbers from new content before insertion when the target location uses automatic list numbering. Content that does not duplicate existing numbering SHALL be preserved unchanged.
2 test scenarios
- Redundant number stripped before insertion JR-function-calling-007.1
- Non-matching content preserved unchanged JR-function-calling-007.2
Post-Insertion Numbering Correction
JR-function-calling-008
The system SHALL detect and correct duplicate numbering after paragraph insertion as a safety net. Paragraphs without duplicate numbering SHALL remain unchanged.
2 test scenarios
- Duplicate numbering corrected after insertion JR-function-calling-008.1
- Correct numbering left unchanged JR-function-calling-008.2
Ambiguous Match Resolution
JR-function-calling-011
When the number of text matches exceeds the expected replacement count, the system SHALL consult a language model to decide whether to proceed with all replacements or request a more specific anchor. If the resolution call fails, the system SHALL return a safe error rather than applying incorrect edits.
3 test scenarios
- Bulk replacement approved after review JR-function-calling-011.1
- Narrower anchor requested for precision JR-function-calling-011.2
- Resolution failure returns safe error JR-function-calling-011.3
Edit Formatting Preservation
JR-function-calling-015
The system SHALL analyze the formatting and capitalization patterns of text being replaced and apply corresponding transformations to the replacement text. ALL CAPS, bold, italic, and mixed formatting patterns SHALL be replicated automatically.
5 test scenarios
- ALL CAPS capitalization preserved JR-function-calling-015.1
- Bold formatting replicated JR-function-calling-015.2
- Italic formatting replicated JR-function-calling-015.3
- Mixed formatting span replicated JR-function-calling-015.4
- Plain text edit skips formatting analysis JR-function-calling-015.5
Strict Edit Match Validation
JR-function-calling-018
The document edit tool SHALL enforce strict match count validation by default, failing when the number of matches exceeds the expected replacement count. Edits SHALL proceed only when the match count equals or is below the expected count.
4 test scenarios
- Excess matches rejected by default JR-function-calling-018.1
- Exact match count proceeds normally JR-function-calling-018.2
- Fewer matches than expected proceeds JR-function-calling-018.3
- Zero matches reported as error JR-function-calling-018.4
Pre-Edit Validation Ordering
JR-function-calling-020
Match count validation SHALL occur before any replacement is executed. No document content SHALL be modified until validation passes.
2 test scenarios
- Formatting path validates before replacing JR-function-calling-020.1
- Standard path validates before replacing JR-function-calling-020.2
Context-Aware Paragraph Insertion
JR-function-calling-022
The system SHALL provide a tool for inserting new paragraphs at contextually appropriate positions in documents with correct formatting inheritance. The tool SHALL preserve list numbering continuity, disambiguate table-of-contents entries from body content, and normalize list separators to match the existing document style.
12 test scenarios
- Paragraph inserted after target location JR-function-calling-022.1
- Paragraph inserted before target location JR-function-calling-022.2
- List numbering continuity preserved JR-function-calling-022.3
- Table-of-contents entries distinguished from body JR-function-calling-022.4
- Ambiguous matches reported with context JR-function-calling-022.5
- Formatting anchor matches content level JR-function-calling-022.6
- Subsection content uses correct anchor level JR-function-calling-022.7
- Space separator normalized to match document JR-function-calling-022.8
- Tab separator normalized to match document JR-function-calling-022.9
- Matching separator preserved unchanged JR-function-calling-022.10
- Non-list content handled correctly JR-function-calling-022.11
- All list pattern types supported JR-function-calling-022.12