LLM Engine Data Integrity and Guarantees
mainThe LLM engine enforces strict data integrity to ensure no hallucinated text is introduced into the document.
- Text Integrity: No text reaches a document unless it existed in the source. Under
valuesmode, every value is validated against the original token sequence. Underlinesmode, only line numbers are returned. - Parsing Failures: If the engine receives bad JSON or a malformed entry, it retries up to
max_malformed_response_retries(default 1). - Claim Validation: If a model claims a value that is not in the reference or is already claimed by a previous field, the value is dropped and logged to
sciencebeam.dropped_fields. This prevents the model from 'adding' data that wasn't there. - Strict Mode: Using
*_raisessettings (e.g.,unanswered_reference_raises) turns these warnings into fatal errors. - Zero Data Retention (ZDR): Every request enforces zero data retention via settings like
data_collection: denyandallow_fallbacks: falseto ensure privacy and security.