LLM Response Parsing
3 requirements
·
16 scenarios
Unified Quote Processing Pipeline
JR-llm-response-parsing-003
The system SHALL provide a
process_quotes_pipeline() function that formats and verifies quotes against source documents.
9 test scenarios
- Quotes formatted as block or inline JR-llm-response-parsing-003.1
- Quotes verified against primary source JR-llm-response-parsing-003.2
- Quotes verified against secondary source JR-llm-response-parsing-003.3
- Verification stored as data attributes JR-llm-response-parsing-003.4
- Rendering applies colors from data attributes JR-llm-response-parsing-003.5
- Mismatch triggers auto-correction for documents JR-llm-response-parsing-003.6
- Mismatch preserved for email body sources JR-llm-response-parsing-003.7
- Duplicate quotes tracked individually JR-llm-response-parsing-003.8
- Corrections threaded through pipeline JR-llm-response-parsing-003.9
Citation Paragraph Auto-Correction
JR-llm-response-parsing-011
When a quote is found in a document/attachment but in a different paragraph than cited, the system SHALL auto-correct the citation to reference the actual paragraph where the quote was found.
4 test scenarios
- Auto-correct for attachment sources JR-llm-response-parsing-011.1
- No auto-correct for email body sources JR-llm-response-parsing-011.2
- Correction data stored in HTML attributes JR-llm-response-parsing-011.3
- Corrections applied during citation rendering JR-llm-response-parsing-011.4
Citation Eligibility Enforcement
JR-llm-response-parsing-012
The system SHALL restrict LLM citations to sources that were actually provided to the LLM in the current turn.
3 test scenarios
- Ineligible sources excluded from LLM prompt context JR-llm-response-parsing-012.1
- Ineligible citations removed or flagged JR-llm-response-parsing-012.2
- Eligibility is tracked once and reused JR-llm-response-parsing-012.3